You can't write a constructor for an MXML component because the MXML compiler autogenerates one. What do you need to do in the constructor?

 

- Gordon

 


From: flexcoders@yahoogroups.com [mailto:flexcoders@yahoogroups.com] On Behalf Of tobiaspatton
Sent: Tuesday, September 26, 2006 8:58 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re: MXML Constructor

 

I think you just need a public function in your component with the same
name as the component with no arguments. This will be called as the
constructor of your component. You can't have a constructor that takes
parameters though.

eg.

MyComp.mxml

<mx:Script>
<![CDATA[
public function MyComp()
{
super();

// do some constructor stuff
}
]]>
</mx:Script>

--- In [EMAIL PROTECTED]ups.com, "Marvin Froeder" <[EMAIL PROTECTED]> wrote:
>
> Is possible to create a Constructor in MXML files?
>
> Marvin
>

__._,_.___

--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com





SPONSORED LINKS
Software development tool Software development Software development services
Home design software Software development company

Your email settings: Individual Email|Traditional
Change settings via the Web (Yahoo! ID required)
Change settings via email: Switch delivery to Daily Digest | Switch to Fully Featured
Visit Your Group | Yahoo! Groups Terms of Use | Unsubscribe

__,_._,___

Reply via email to