[flexcoders] Extended ComboBox can't use mx:dataProvider /

2005-07-19 Thread Darron J. Schall
I've run into an interesting situation.  I needed to extend the 
combobox, and in doing so, I'm not longer able to nest the 
mx:dataProvider tag.

For example, the following code doesn't work.

controls:MyCustomComboBox
mx:dataProvider
mx:Array
mx:StringItem 1/mx:String
mx:StringItem 2/mx:String
mx:StringItem 3/mx:String
/mx:Array
/mx:dataProvider
/controls:MyCustomComboBox

If I replace my custom combobox with mx:ComboBox, the above code works 
fine.

However, the following code *does* work as expected:

mx:Array id=dp
mx:StringItem 1/mx:String
mx:StringItem 2/mx:String
mx:StringItem 3/mx:String
/mx:Array
controls:MyCustomComboBox dataProvider={dp} /

So, the data provider isn't broken at all, but rather the compiler just 
can't process the nested dataProvider tag.  The error message is:  
Error: Don't know how to parse element 
http://www.macromedia.com/2003/mxml:dataProvider;.  It is not a known 
type or a property.

... which is odd, because as a subclass of ComboBox, it shoudl be one in 
the same.  I tried extending via an ActionScript file and an MXML file, 
and both yielded the same results.

Is this something that I would need to modify the schema for to be able 
to nest the mx:dataProvider tag in my extended combobox component?  
Anyone have any ideas?  It looks like a bug to me, but I don't think I 
know enough about it to say that it is for sure.

On a related topic, the regular combobox doesn't seem to respect 
Stage.height when loaded into another Flex .swf.  I thought this was 
fixed?  I have a ComboBox opening below the Stage, and no amount of 
_lockroot seems to solve it.

-d




--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com 
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:
http://docs.yahoo.com/info/terms/
 




RE: [flexcoders] Extended ComboBox can't use mx:dataProvider /

2005-07-19 Thread Alistair McLeod
Hi Darron,

Change mx:dataProvider to controls:dataProvider

Because dataProvider is a property of the ComboBox, it should use the same
namespace as its parent.

Cheers,

Ali

--
Alistair McLeod
Development Director
iteration::two
 
[EMAIL PROTECTED]
Office: +44 (0)131 338 6108
 
This e-mail and any associated attachments transmitted with it may contain
confidential information and must not be copied, or disclosed, or used by
anyone other than the intended recipient(s). If you are not the intended
recipient(s) please destroy this e-mail, and any copies of it, immediately.
 
Please also note that while software systems have been used to try to ensure
that this e-mail has been swept for viruses, iteration::two do not accept
responsibility for any damage or loss caused in respect of any viruses
transmitted by the e-mail. Please ensure your own checks are carried out
before any attachments are opened.
-Original Message-
From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Darron J. Schall
Sent: 19 July 2005 09:29
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Extended ComboBox can't use mx:dataProvider /

I've run into an interesting situation.  I needed to extend the 
combobox, and in doing so, I'm not longer able to nest the 
mx:dataProvider tag.

For example, the following code doesn't work.

controls:MyCustomComboBox
mx:dataProvider
mx:Array
mx:StringItem 1/mx:String
mx:StringItem 2/mx:String
mx:StringItem 3/mx:String
/mx:Array
/mx:dataProvider
/controls:MyCustomComboBox

If I replace my custom combobox with mx:ComboBox, the above code works 
fine.

However, the following code *does* work as expected:

mx:Array id=dp
mx:StringItem 1/mx:String
mx:StringItem 2/mx:String
mx:StringItem 3/mx:String
/mx:Array
controls:MyCustomComboBox dataProvider={dp} /

So, the data provider isn't broken at all, but rather the compiler just 
can't process the nested dataProvider tag.  The error message is:  
Error: Don't know how to parse element 
http://www.macromedia.com/2003/mxml:dataProvider;.  It is not a known 
type or a property.

... which is odd, because as a subclass of ComboBox, it shoudl be one in 
the same.  I tried extending via an ActionScript file and an MXML file, 
and both yielded the same results.

Is this something that I would need to modify the schema for to be able 
to nest the mx:dataProvider tag in my extended combobox component?  
Anyone have any ideas?  It looks like a bug to me, but I don't think I 
know enough about it to say that it is for sure.

On a related topic, the regular combobox doesn't seem to respect 
Stage.height when loaded into another Flex .swf.  I thought this was 
fixed?  I have a ComboBox opening below the Stage, and no amount of 
_lockroot seems to solve it.

-d




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



 



--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com 
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:
http://docs.yahoo.com/info/terms/