Thanks guys

I guess this falls into the same kinda thing as Sebastian's Manager idea, 
but here goes:

I was just playing around with adding all the necesary field objects to a 
global array (one for each window) just after I add the fields to their 
parent.

When the window closes, loop through the global array for that window and 
setValue to zip.

But considering the arrays hold objects, I won't need to worry about what 
their parents are.

Does this sound OK?(Note that I don't know much about memory leaking so 
don't know if this is a bad idea). 5 lines of code, works fine and I have 
total control over what fields to register. Also doubles up as a tidy way of 
looping through all fields when I want to send the input data to the server.

Aaron


----- Original Message ----- 
From: "Sebastian Werner" <[EMAIL PROTECTED]>
To: "qooxdoo Development" <[email protected]>
Sent: Friday, November 17, 2006 10:29 AM
Subject: Re: [qooxdoo-devel] Resetting all fields


> Upps. :( you want to reset them. I have overseen this. A manager would
> probably a good option, too. But you must inherit from the default
> object manager and add some function to reset the values of the assigned
> objects.
>
>
> Sebastian Werner schrieb:
>> The most elegant way in my opinion would be to add all instances to a
>> separate manager instance (qx.manager.object.ObjectManager). This
>> instance than allows you to enable/disable all added/registered widgets,
>> objects, etc.
>>
>> Sebastian
>>
>>
>> Aaron Cooper schrieb:
>>> Is there an official way to reset all fields on a qooxdoo 'form'?
>>>
>>> I have a window for data entry, when the user clicks the 'Save' or 
>>> 'Home' button, the data entry window closes, and the Home window opens 
>>> again.
>>>
>>> If you navigate back to the data entry window, any data typed before is 
>>> still there.
>>>
>>> Obviously the windows for this app are loaded from the start, and are 
>>> only closed when not needed. Rather than being totally destroyed and 
>>> reloaded each time.
>>>
>>> Would using window.dispose() be a better option to get what I'm after?
>>> And what does window.restore() do exactly?
>>>
>>> I ask as I've tried the above method (dispose/restore) unsuccessfully.
>>>
>>> If manually coding each feild and setting the value to blank when the 
>>> window closes is the only way then I'll do that, but I was hoping for 
>>> something more like document.getElementsByTagName or the like as there 
>>> are over 30 fields, it'd be nice just to have a loop.
>>>
>>> Cheers
>>> Aaron
>>>
>>>
>>> ------------------------------------------------------------------------
>>>
>>> -------------------------------------------------------------------------
>>> Take Surveys. Earn Cash. Influence the Future of IT
>>> Join SourceForge.net's Techsay panel and you'll get the chance to share 
>>> your
>>> opinions on IT & business topics through brief surveys - and earn cash
>>> http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
>>>
>>>
>>> ------------------------------------------------------------------------
>>>
>>> _______________________________________________
>>> qooxdoo-devel mailing list
>>> [email protected]
>>> https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
>>
>>
>> -------------------------------------------------------------------------
>> Take Surveys. Earn Cash. Influence the Future of IT
>> Join SourceForge.net's Techsay panel and you'll get the chance to share 
>> your
>> opinions on IT & business topics through brief surveys - and earn cash
>> http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
>> _______________________________________________
>> qooxdoo-devel mailing list
>> [email protected]
>> https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
>
>
> -------------------------------------------------------------------------
> Take Surveys. Earn Cash. Influence the Future of IT
> Join SourceForge.net's Techsay panel and you'll get the chance to share 
> your
> opinions on IT & business topics through brief surveys - and earn cash
> http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
> _______________________________________________
> qooxdoo-devel mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel 


-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
qooxdoo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel

Reply via email to