Instantiation attempted of a non-constructor

October 28th, 2010 by admin » (0) » AS3

Something that might help you save some precious time of your life.
If you get this error with (perhaps) a class you’ve coded, try this:

Don’t give the variable the same name as the class you want to instantiate…

var MyClass = MyClass();

is bad.

var varName = MyClass();

will probably work.

Scotch on the Road 2009 Munich

October 20th, 2009 by max » (0) » Conferences and Events


On October 19th, the famous Scotch-On-The-Rocks conference swapped over the channel to Europe: Andy Allen and his bunch of experts gave the honor to tell the german CF-community about ColdFusion9, Flash Builder, Flash Catalyst, Flex and a whole lot more.

It was an informative, enlightening, delighting and well organised event, I would recommend every one in or near Zurich (sold out), Milan, Amsterdam (sold out), Brussles and London (sold out) to register – it is even free (Update: see below for Gary’s post)! Unfortunately a nasty headache kept me away from an after-event-beer :-(

The sessions in detail:

  • Keynote by Terry Ryan, Platform Evangelist for ColdFusion (Blog / Twitter)
    Terry talked about new features and CF9 (some of them aren’t thaaaat new, some of them aren’t thaaaat helpful (but cool).
  • »ColdFusion with Microsoft Office, SharePoint and Exchange« by Terry Ryan again
    Super interesting for all those corporate peope out there, that had problems with a MS infrastructure in the past.
  • »Flash Professional, Flash Catalyst, and Flash Builder: Facts, Features and (Work)Flows« by Serge Jespers, Platform Evangelist for Flash (Blog / Twitter)
    Funny and enjoyable as every time Serge presented how designers, interaction designers and developers could easily cooperate using Flash Catalyst.
  • »CSI: Who killed ColdFusion?« by Darren Pywell, CTO at Intergral Information Solutions
    Darren showed how development-fails can bring servers to an end, how to (stress-)test correctly and gave interesting insights into the admin-problems, that developers like me (luckily) never have to deal with.
  • »CF Envy – Sharing the love with AIR and Flex« by Andy Allen (Twitter)
    Amusing as ever, Scotsman Andy presented his very funny but informative slides and »live«-coded (actually »clicking-on-snippets«) some Flex. Bonus: mocking on some of Adobe’s products.
  • »ColdFusion 9: Server Administration« by Claude Englebert, EMEA ColdFusion Product Specialist (Twitter)
    Again a session more for admins than for me.
  • »Taking ColdFusion Applications Off-line with Adobe AIR« by Sven Ramuschkat, CTO of Herrlich & Ramuschkat
    Sven showed an example for an On/Offline synchornisation of an AIR app with a CF-Server. He became ecstatic, when he told us about the Platinum Support, which is so much cheaper with ColdFusion, than with other products (but don’t forget, he is a reseller ;-)
  • »Introduction to ColdFusion ORM« by Terry Ryan again
    In the last session, Terry (who was severly jetlagged) showed examples of the new ORM-feature that would have impressed me even more, if the Cossack king behind by forhead would have stopped hammering against it for a few minutes.

As soon as the presentations and slides are available, I will post the links here.

UPDATE: Gary writes about the free conference as a double edged sword in his blog.

Pitfalls with mailto-Links in Flash

October 20th, 2009 by max » (3) » AS3

In my last project I had some issues with IE8 (at customer-side), Mail (on agency-side) and my way of placing mailto-links.

In this project, the email-address and the subject come from a XML. This was my first setup:


<node contactAddress="" contactSubject="Kontakt über Homepage">

(Please notice: the german »Umlaut« in the subject)

AS3 (excerpt)

private function mailto(e:MouseEvent):void {
var mailaddress:String=XML.node.attribute("contactAddress");
var mailsubject:String=XML.node.attribute("contactSubject");
navigateToURL( new URLRequest( "mailto:"+mailaddress+"?subject="+mailsubject));

So, let’s see, what happened with different clients on different OS:

IE7, IE6, FF, Safari on WinXP worked without any problems (with Outlook Express). IE8 on WinXP opens a new Window with an error message (»Navigation wurde abgebrochen« / »Navigation to the webpage was canceled«), but opens Outlook (Express and Outlook 2007) with correct recipient and correct subject.
Every browser on Mac opens up Mail, but didn’t open a new eMail with recipient or subject.

To cut a long debugging-story short: please no german umlauts in mailsubject, so changing the XML-node the following mail, solved the problem:

<node contactAddress="" contactSubject="Kontakt per Homepage">

Nice, but still IE8 opens up a ugly window with the cancelation message. The solution here was the target-attribute of the navigateToUrl-Method: default is “_blank”, which I thought was the correct way to handle it, because I didn’t want the page to unload, if the mailto-Link was clicked. Turned out, that when you use the code in following way, the page doesn’t unload and new tabs/windows are surpressed.

private function mailto(e:MouseEvent):void {
var mailaddress:String=XML.node.attribute("contactAddress");
var mailsubject:String=XML.node.attribute("contactSubject");
navigateToURL( new URLRequest( "mailto:"+mailaddress+"?subject="+mailsubject), "_self");

Conclusion: don’t use Umlauts (and probably no other special characters) with OS X, don’t use “_blank” or default.