Adobe Dreamweaver Forums



Last 10 THreads :         Re: I can´t start photoshop cs4 error:Photoshop CS4 stopped working. (Last Post : roft@adobeforums.com - Replies : 0 - Views : 1 )           »          Networked Webcams (Last Post : VirginiaBeachCity - Replies : 0 - Views : 1 )           »          Preloading a game (Last Post : trigger2160 - Replies : 0 - Views : 1 )           »          FAO: Murray RE: Mailchimp (Last Post : joeq - Replies : 5 - Views : 6 )           »          PS CS4 "Save As ..." format choices appear in duplicate (Last Post : Dan_Dill@adobeforums.com - Replies : 0 - Views : 1 )           »          Re: Colour differences on the web (Last Post : g_ballard@adobeforums.com - Replies : 0 - Views : 1 )           »          Re: SFW and date created (Last Post : Ann_Shelbourne@adobeforums.com - Replies : 0 - Views : 1 )           »          Re: sRGB vs. Adobe (1998) RGB (Last Post : Neil_Keller@adobeforums.com - Replies : 0 - Views : 1 )           »          help my flash site opens pop ups? (Last Post : Awebus - Replies : 2 - Views : 3 )           »          Flash IDE randomly creating Symbols (Last Post : MediaMackenzie.com - Replies : 0 - Views : 1 )           »         


User Info Statistics
Go Back   Adobe Dreamweaver Forums > Macromedia Software > Flex
 
Tags:



Reply
  #1 (permalink)  
Old 11-04-2008, 09:02 AM
iceflex
 
Posts: n/a
Diggs:
Default ClassFactory

hello,
I need to dynamically change the state of my DataGridColumn's itemRenderer,
which is a ComboBox.
In respond to a click, I need to set selected item to "Accepted". For some
reason it setting the correct value only once in 5-10 clicks.
Here is my code:

public function onAcceptAll():void{
var factory:ClassFactory =
new ClassFactory(com.myname.components.MyComboBox);
factory.properties = { text: 'Accepted' };
col.itemRenderer = factory;
}

<mxataGridColumn headerText="Accept/Reject" textAlign="center" id="col"
dataField="status"
itemRenderer="com.myname.components.MyComboBox"/>

Does anyone know if I have to add anything else, like refresh or invalidate?

Thanks,
Michael.




Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 11-04-2008, 09:02 AM
Amy Blankenship
 
Posts: n/a
Diggs:
Default Re: ClassFactory


"iceflex" <webforumsuser@macromedia.com> wrote in message
news:ge7b83$hpm$1@forums.macromedia.com...
> hello,
> I need to dynamically change the state of my DataGridColumn's
> itemRenderer,
> which is a ComboBox.
> In respond to a click, I need to set selected item to "Accepted". For some
> reason it setting the correct value only once in 5-10 clicks.
> Here is my code:
>
> public function onAcceptAll():void{
> var factory:ClassFactory =
> new ClassFactory(com.myname.components.MyComboBox);
> factory.properties = { text: 'Accepted' };
> col.itemRenderer = factory;
> }
>
> <mxataGridColumn headerText="Accept/Reject" textAlign="center" id="col"
> dataField="status"
> itemRenderer="com.myname.components.MyComboBox"/>
>
> Does anyone know if I have to add anything else, like refresh or
> invalidate?


The ClassFactory is like a rubber stamp that the dataGrid uses to create all
of the itemRenderers. Changing the stamp doesn't change the images the
stamp has already made, so I'm amazed you've had any success at all with
this.

Try reading up on Q2 in the FAQ

http://www.magnoliamultimedia.com/fl...s_Flex_FAQ.pdf


Reply With Quote
  #3 (permalink)  
Old 11-04-2008, 09:02 AM
iceflex
 
Posts: n/a
Diggs:
Default Re: ClassFactory

Thank you, Amy
Reply With Quote


  #4 (permalink)  
Old 11-04-2008, 09:02 AM
Amy Blankenship
 
Posts: n/a
Diggs:
Default Re: ClassFactory


"iceflex" <webforumsuser@macromedia.com> wrote in message
news:ge7id1$rnl$1@forums.macromedia.com...
> Thank you, Amy


You're welcome :-)


Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



© Camley Interactive (camley.info) 2008 - all logos and images are copywrite their respective owners.
Proud member of the Camley Interactive Network
All times are GMT. The time now is 12:24 AM.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.1.0 ©2007, Crawlability, Inc.
Inactive Reminders By Mished.co.uk