On 10/26/05, Mark Wales <[EMAIL PROTECTED]> wrote:

> I'd like to create components at runtime (a technique well-understood
> and well-documented) but then retain the list of created components so
> that, upon subsequent start-up, those same components are
> re-instantiated. I'm certainly not trying to be as far-reaching as SAP
> with Netweaver, but the general idea is the same.
>
> I've considered custom classes that extend existing components but are
> "serializable" to XML using the upcoming E4X capabilities, but curious
> to know of anyone out there has any more elegant/interesting thoughts.

So are you saying you want to save the current state of the UI and
restore it when the application is restarted?

I think I would do it by just recursively iterating over the children
of the application and saving the bits I care about in an XML file. 
These needn't be custom components.  I'd know which properties to save
to XML by looking up a configuration file that contains the names of
the properties (for example, if I'm saving a TextInput I want to save
the value of its 'text' property).

Upon startup I'd load the XML file, parse it (E4X), create the
component instances dynamically and assign the properties -- almost
exactly what Flex does anyway.

All theory.  No code to back it up, sorry.


------------------------ Yahoo! Groups Sponsor --------------------~--> 
Fair play? Video games influencing politics. Click and talk back!
http://us.click.yahoo.com/T8sf5C/tzNLAA/TtwFAA/nhFolB/TM
--------------------------------------------------------------------~-> 

--
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/
 


Reply via email to