On 5/13/05, Erik Westra <[EMAIL PROTECTED]> wrote: > Hello, some questions :)
Answers inline... > 1: > _measuredWidth > _measuredHeight > _measuredPreferredWidth > _measuredPreferredHeight > __width > __height > etc. > > Is there anywhere a list of these kind of properties that can be used > with the development of a custom component in actionscript. I would be > interested in knowing wich properties are available and what effect they > have in the framework. I searched Google for "_measuredPreferredWidth" and unfortunately found only a single page of results. :( http://www.google.com/search?q=_measuredPreferredWidth http://search.yahoo.com/search?p=_measuredPreferredWidth Anyway, here's a nice article about how to create components: http://www.macromedia.com/support/documentation/en/flex/1_5/createcomponents/ > 2: > > <MyCustomComponent> > <mx:TextArea /> > </MyCustomComponent> > > The above piece of xml creates a child on the MyCustomComponent. Im > wondering what code is used to determine wich childs must be created. If > u extend container, either the container createChildren function or the > View container function takes care of this creation. But how does it > work? When the MXML is compiled to ActionScript internally, the container (MyCustomComponent) gets a bunch of object descriptors specifying what children it must contain and what properties and styles the children must have. Then when the container is getting initialized, it looks at the object descriptors and created its children using createChild() You can see how the descriptors are set up by setting the following option in flex-config.xml <!-- write xxx-generated.as file to disk --> <!-- These files are generated by the compiler during mxml translation. --> <keep-generated-as>true</keep-generated-as> Then you can open the MyMXMLFile-generated.as file to see the translated AS code. Look for "Descriptor" in that file to get an idea. > 3: > > In (for instance) the accordion class the visibility of childs is > explicitly set with setVisible(false, true). This is not documented, but > an importend part of the framework. Im wondering how many of these (for > component development) usefull functions there exists. There may be many, but if they are not in the ASDoc then one has to assume they were not meant for public use. > 4: > > mx.effects.EffectManager > mx.core.UIObjectDescriptor > mx.container.Box; > mx.container.VBox; > mx.container.HBox; > > These classes are not included in the FlexForFlash.zip file while they > can be valuable to the development of good UI components. Does any1 know > why? No idea. :-/ > 5. > > Does any1 know how a Box determines the size of its children? I mean > when u resize a child within a box, the positions of the other childs > (and sometimes their sizes) are recalculated. How does this process > exactly work. When you resize a child in the box, its parent's "layout" needs to be redone, so Flex remembers this and calls the parent's layoutChildren() on the next frame. In the layoutChildren() of the Box container, it calculates the sizes of its children and lays them out accordindly. This happens for any Container, not just Box. > 6. > > In the documentation of the V2 architecture I miss the overview. I see a > lot of examples of parts of the framework, but I don't see a list of > goals connected to the theory of its implementation. It seems in the > general documentation everything is ordered by feature and in component > creation documentation all simple features are included and minimaly > explained (think init, createChildren, measure, etc.). > > Im missing a structured view of how the framework is tied together. From > concepts all the way down to parts of implementation code in components. Have you read this book? http://www.amazon.com/exec/obidos/tg/detail/-/0321255666/qid=1116262210/sr=8-2/ref=pd_csp_2/002-2276896-9552008 I haven't, but I hear it's great. Some of the chapters are now becoming available online too. http://www.macromedia.com/devnet/flex/articles/component_reuse.html 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/

