Hello!

I'm getting started with a custom Flex component (based on 
ComboBox), and running into a bit of difficulty.  

I bought, the "developing rich clients with macromedia flex" book, 
and have to say it comes very close in helping but I'm still stuck.  
BTW thanks Steve & Alistair for writing a great book.

I've developed a previous Flash application that has a custom 
dropdown component which already takes the following XML to 
initialize itself.  (XML generated outside of the Flash 
application), I'd like to take the exact same XML and wrap it into a 
Custom Flex Component, but XML structure below is presenting some 
problems...

One of the issues is that while I can create a class named Prefix to 
match the <Prefix> tag...The Prefix class cannot take attributes on 
itself, I get an error message if I try, "Property elements may not 
have attributes.".  I would have to have them in another child tag.  
This is somewhat like the Portfolio and Account Objects described on 
page 61 of the book, except my "Account" tag was not embedded in 
a "CurrentAccount" tag.

I understand I could wrap these in either my own tags where the 
attributes would be in another child tag, or <mx:object> tags, or 
put the whole Component XML in an <mx:xml> tag, but all of these 
require changing my existing XML structure which I don't really want 
to do.

I'm also having trouble with the <Name> tag in a similar fashion.  I 
tried using an instance variable of type object, or string, but that 
won't work, I pretty much need a class for it, but since there is no 
attribute holding it's value, I'm stuck there as well.

Please help!
Thanks,
Jason

<DropDownBox Width="86" Scrolling="false" 
Id="DropDownBox_OFGTZRQZVUI" height="30" >
           <Tooltip></Tooltip>
           <Name>myDropdown</Name>
           <Value></Value>
           <SelectedKey>b</SelectedKey>
           <Prefix prefix_visible="true" prefix_style="GRAPHIC" />
        <Items>
                <DropDownItem>
                   <Value>a</Value>
                   <Key>a</Key>
                   <Action ActionUrl="myframe1.xml" 
ActionTarget="Frame1" />
               </DropDownItem>
               <DropDownItem>
                    <Value>b</Value>
                    <Key>b</Key>
                    <Action ActionUrl="URL2.xml" 
ActionTarget="Frame1" />
              </DropDownItem>
        </Items>
</DropDownBox>








 
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/
 


Reply via email to