you can try your code in

initialize(), or pre-initialize() depending on your requirement

best regards
dinukx

On Thu, Nov 5, 2009 at 8:15 AM, pradeep gorijavolu <
[email protected]> wrote:

> Yes i agree with that
>
> 1)can we restrict the dafault constructor in .as because if i want to write
> a constructor in mxml?
>
> Reagrds,
> Pradeep.
>
>
> On Wed, Nov 4, 2009 at 8:24 PM, saurabh goel <[email protected]>wrote:
>
>> Hi,
>>
>> Flex does't support OverLoading of function and constructor. When u create
>> custom component using MXML than it automatically called constructor.
>>
>> Regards
>> Saurabh Goel
>>
>> On Wed, Nov 4, 2009 at 9:34 AM, pradeep gorijavolu <
>> [email protected]> wrote:
>>
>>> Thanx for the information
>>>
>>> Yes at the compile time IDE wll convert mxml into .as file, IDE wll
>>> generate a default constructor.
>>>
>>> Here My Doubts are....
>>>
>>> 1)when i have a requirement to implement a code in a constructor through
>>> mxml is it possible?
>>> 2)Why the error becomes like Multiple constructor definitions found".So
>>> constructor overloading not support in AS?
>>>
>>> Please let me clear one thing when i have a one constuctor like this
>>> ComponentA(var str:String,userDtl:UserVO)
>>>
>>> when i invoke a constructor like this ComponentA() or
>>> ComponentA("pradeep") with default constructor or with one paramater it wll
>>> work
>>>
>>> Please let me know what is the bottom line behind this.
>>>
>>> Regards,
>>> Pradeep
>>>
>>>
>>>
>>>
>>>
>>>
>>> On Wed, Nov 4, 2009 at 2:45 AM, Mayur Bais <[email protected]> wrote:
>>>
>>>> Hi,
>>>> That  is because compiler has already generated .as files for you with
>>>> the class name as a name of your mxml component.
>>>> if you use "-keep" as  compiler tag you will get to see all generated
>>>> action script.
>>>>
>>>> Hence it very correctly shows the error as "Multiple constructor
>>>> definitions found".
>>>>
>>>> You will also notice that only UIcomponent can be added to mxml file
>>>> using a declarative sytanx like : <mx:abc../>
>>>> and dispatches multiple event during their life cycle , like initialize,
>>>> creationComplete etc.  which can be tracked in Application.
>>>>
>>>> Rest of tags that can be added to MXML ex :  RemoteObject,
>>>> RadioButtonGroup, ArrayCollection etc implements IMXMLObject and hence can
>>>> be added like <mx:.../>
>>>>
>>>> Read more about "IMXMLObject interface" very interesting stuff to know
>>>> :)
>>>>
>>>> Hope this helps .
>>>>
>>>> Regards
>>>> Mayur
>>>>
>>>>
>>>> On Mon, Nov 2, 2009 at 10:02 PM, pradeepflex <
>>>> [email protected]> wrote:
>>>>
>>>>>
>>>>> Hi all,
>>>>>
>>>>> This is pradeep,
>>>>> i have little bit confuse is
>>>>> when we create mxml component mycanvas extends like canvas
>>>>> in actionscipt we can write a constructor for mycanvas
>>>>> but in case of mxml if i write in the script tag it shows an error.
>>>>>
>>>>> Please let me know the bottom line of this core conecpt.
>>>>>
>>>>> Regards,
>>>>> Pradeep.
>>>>>
>>>>>
>>>>>
>>>>
>>>>
>>>>
>>>
>>>
>>>
>>
>>
>>
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Flex 
India Community" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/flex_india?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to