On Thursday, September 18, 2003, at 02:39 PM, Randall Randall wrote:
On Thursday, September 18, 2003, at 12:54 PM, Matt Feifarek wrote:Randall Randall wrote:I need to create a number of forms that depend on how many objects there are to modify. If there are 3, there need to be 3 forms, one of which will be used.
This should be no problem; we do it all the time. Just make sure that you're using different submit methods (actions) for each one.
That seems tricky; I'd had every form using the same submit method and the method was cycling through every form in self._forms to find the successful one that had called it.
So, to do this, I'd need to define a generic method and use setattr to set the name of each copy to the name of the submit button as it's generated?
It turns out that this works for me. Those extra forms still crept into self._forms, but simply checking to see whether the new submit method was registered for each iteration of creating a form was sufficient to weed it out.
I'm still not very clear on the "recommended" way to create forms in awake(), since the way I'm doing it, by manipulating self._forms, doesn't seem very natural. If this is the right way, I can create an example for your Examples folder. If not, and you find the time before the next release, an example of a form created in awake() would be helpful, I think. :)
Thanks!
-- Randall Randall <[EMAIL PROTECTED]> "When you advocate any government action, you must first believe that violence is the best answer to the question at hand." -- Allen Thornton
------------------------------------------------------- This sf.net email is sponsored by:ThinkGeek Welcome to geek heaven. http://thinkgeek.com/sf _______________________________________________ Webware-discuss mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/webware-discuss