[flexcoders] createClassObject || Create dynamically series of buttons in AS components
Hi everybody, I need your advises concerning the development of customized component. I would like totransform this following code that I did in my mxml component into a in actionscript coded component : mx:Repeaterid="rpTreeExpandCollapse"dataProvider="{ arrTreeExpandCollapseBtn }" cp:CustomizedButtonid="btnTreeExpandCollapse"styleName="button"icon="{ arrTreeExpandCollapseBtn[rpTreeExpandCollapse.currentIndex].icon }"toolTip="{ arrTreeExpandCollapseBtn[rpTreeExpandCollapse.currentIndex].tooltip}"width="28"mouseOverEffect="Fade"tabEnabled="true" /mx:Spacer width="3" //mx:Repeater Do I have to use the loop for(var i:Number=0; imyArray.length;I++) { // Here the component CustomizedButtonif (CustomizedButton== undefined)createClassObject(CustomizedButton,"myButton",3,{text: myArray[i],}); } or do I have to create a Repeater in which I'm going to use createClassObject() or createChildren(). Thanks in advance for your help. David ** Coface facilite les echanges entre les entreprises partout dans le monde. Pour cela, elle offre a toutes les entreprises des solutions pour gerer, financer et proteger leur poste client, en leur permettant d'externaliser tout ou partie de la gestion et des risques lies a leurs relations commerciales. Coface est notee AA par Fitch Ratings et Aa3 par Moody's. Pour en savoir plus, http://www.coface.fr Coface facilitates business-to-business commerce worldwide. It offers all size companies an array of solutions to manage, finance, and protect their accounts receivables affording them the option of fully or partly outsourcing trade relationship management and attendant risks. Coface is rated AA by Fitch ratings and Aa3 by Moody's. More about Coface, http://www.coface.com WARNING : - Soyez conscient que notre systeme Anti-Spam peut parfois rejeter des messages, soit parce que certains mots et types de fichiers ne sont pas acceptes, ou bien parce que le mail n'a pas ete identifie correctement. - Be aware that from time to time our Anti-Spam system may reject mails either because some words and types of files are not allowed or because mails are misidentified. ** -- 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 Visit your group "flexcoders" on the web. To unsubscribe from this group, send an email to:[EMAIL PROTECTED] Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
[flexcoders] createClassObject
Hi, I have a cellRenderer that creates a number of children in the createChildren. When profiling I noticed that this is taking a considerable amount of time as I have a 20x20 grid. I create the objects in the createChildren method as: imgE = createClassObject(Image,imgE, getNextHighestDepth()); As each cell contains 5 objects it is taking over 20 seconds to render the initial grid. What can I do to improve performance ? 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] createClassObject bug?
I think the problem is that creatClassObject() wants a third param -- the depth for the child, which must be unique for each child. By not specifying it, you are effectively passing 'undefined' for the depth. This probably gets interpreted as 0 and you get a depth collision. Each successively created object blows away the previous one at depth 0. - Gordon -Original Message- From: Scott Barnes [mailto:[EMAIL PROTECTED] Sent: Wednesday, April 13, 2005 10:26 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] createClassObject bug? I've got a few components that extend mx.core.UIObject, and from a parent object i want to create two children objects (in that they all extend UIObject). ie: function parent() { this.child01 = this.createClassObject(com.SynergyFLEX.child01,child1); this.child02 = this.createClassObject(com.SynergyFLEX.child02,child2); } yet, it only creates the last one in the stack? in that if i debug or try and reference this.child01 it shows up null? If i use createChild() (forcing my parent container to now extend mx.core.View) it works fine. Yet that has me confused as doesn't createChild use createClassObject anyway? Wort's the G.O ? -- Regards, Scott Barnes http://www.mossyblog.com http://www.flexcoder.com (Coming Soon) Yahoo! Groups Links 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] createClassObject bug?
Ahhh.. of course you are right. I assumed UIObject would auto-find a depth if none is provided (much like createChild). sure enough, it works now. thanks Gordon. On 4/14/05, Gordon Smith [EMAIL PROTECTED] wrote: I think the problem is that creatClassObject() wants a third param -- the depth for the child, which must be unique for each child. By not specifying it, you are effectively passing 'undefined' for the depth. This probably gets interpreted as 0 and you get a depth collision. Each successively created object blows away the previous one at depth 0. - Gordon -Original Message- From: Scott Barnes [mailto:[EMAIL PROTECTED] Sent: Wednesday, April 13, 2005 10:26 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] createClassObject bug? I've got a few components that extend mx.core.UIObject, and from a parent object i want to create two children objects (in that they all extend UIObject). ie: function parent() { this.child01 = this.createClassObject(com.SynergyFLEX.child01,child1); this.child02 = this.createClassObject(com.SynergyFLEX.child02,child2); } yet, it only creates the last one in the stack? in that if i debug or try and reference this.child01 it shows up null? If i use createChild() (forcing my parent container to now extend mx.core.View) it works fine. Yet that has me confused as doesn't createChild use createClassObject anyway? Wort's the G.O ? -- Regards, Scott Barnes http://www.mossyblog.com http://www.flexcoder.com (Coming Soon) Yahoo! Groups Links Yahoo! Groups Links -- Regards, Scott Barnes http://www.mossyblog.com http://www.flexcoder.com (Coming Soon) 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/
[flexcoders] createClassObject bug?
I've got a few components that extend mx.core.UIObject, and from a parent object i want to create two children objects (in that they all extend UIObject). ie: function parent() { this.child01 = this.createClassObject(com.SynergyFLEX.child01,child1); this.child02 = this.createClassObject(com.SynergyFLEX.child02,child2); } yet, it only creates the last one in the stack? in that if i debug or try and reference this.child01 it shows up null? If i use createChild() (forcing my parent container to now extend mx.core.View) it works fine. Yet that has me confused as doesn't createChild use createClassObject anyway? Wort's the G.O ? -- Regards, Scott Barnes http://www.mossyblog.com http://www.flexcoder.com (Coming Soon) 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/