You need ri:highlight instead of just highlight.  Property tags should match the namespace of the class declaration tag.

 

Matt

 

-----Original Message-----
From: Dirk Eismann [mailto:[EMAIL PROTECTED]
Sent: Friday, June 04, 2004 2:08 AM
To: [email protected]
Subject: RE: [flexcoders] Bindings and custom properties

 

Hmm, unfortunately it sill doesn't work. Code snippet looks like this:

<ri:DateChooserEx id="cal" >
  <highlight>
    <mx:Array>
      <mx:Number>1</mx:Number>
      <mx:Number>14</mx:Number>
    </mx:Array>
  </highlight>
</ri:DateChooserEx>

The compiler complains that the property highlight "is not a known type
or a property of de.richinternet.controls.DateChooserEx". Internally,
the class uses a private member _highlight and a getter/setter pair
called "highlight" that works on the _highlight member - so all ahould
be fine. Seems as if the compiler is looking for a public member
"highlight" instead when using the above syntax.

BTW: my custom component is not a SWC but a MXML component so I am not
quite sure if the typed Array issue fits here?

Dirk.

-----Original Message-----
From: Yukari Machiyama [mailto:[EMAIL PROTECTED]
Sent: Thursday, June 03, 2004 9:00 PM
To: '[email protected]'
Subject: RE: [flexcoders] Bindings and custom properties


I think I've already logged the bug for this (bug #84502) and it is
addressed in the doc in Creating Custom Components in Flash section as
follow:

If your custom SWC has properties typed Array, do not use data-binding
to supply initial values
for that array properties. For example, if your custom SWC has a labels
property which is typed
Array, do not use data-binding in the MXML as shown below:
<yourSWC labels={myArray}/>
<mx:Script>
<![CDATA[
var myArray=["cat", "dog", "bird"];
]]>
</mx:Script>
The problem is that Flex instantiates the SWC before data binding
occurs. Instead, you define the
the array using the <mx:Array> tag, as the following example shows:
<yourSWC>
<labels>
<mx:Array>
<mx:String>cat</mx:String>
<mx:String>dog</mx:String>
<mx:String>bird</mx:String>
</mx:Array>
</labels>
</yourSWC>

Thank you,
-Yukari
-----Original Message-----
From: Matt Chotin [mailto:[EMAIL PROTECTED]
Sent: Thursday, June 03, 2004 10:05 AM
To: '[email protected]'
Subject: RE: [flexcoders] Bindings and custom properties


OK, sounds bug-worthy.  Can you send a bug report into
[EMAIL PROTECTED] with your class and an example of how it
doesn't highlight along with your workaround?

Thanks,

Matt

-----Original Message-----
From: Dirk Eismann [mailto:[EMAIL PROTECTED]
Sent: Thursday, June 03, 2004 4:55 AM
To: [email protected]
Subject: RE: [flexcoders] Bindings and custom properties

I already tried doLater() but to no effort - even after the doLater call
the inner controls don't seem to be finished. My workaround right now is
to set up a timer with setInterval that after a few ms calls the
highlightDays() method.

Dirk.

> As far as the events firing before internal components are ready I'm
> honestly not sure why that would be.  In general
> creationComplete means that everything is good to go,
> but maybe you need to wait a little after that
> using a doLater?






Yahoo! Groups Sponsor
ADVERTISEMENT






Yahoo! Groups Links

To visit your group on the web, go to:
http://groups.yahoo.com/group/flexcoders/
 
To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
 
Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.


Reply via email to