On Thu, Apr 19, 2007 at 02:21:50PM +0200, Udo Giacomozzi wrote: > Hello strk, > > Thursday, April 19, 2007, 2:13:42 PM, you wrote: > >> I *think* it should restore the state of the character in which it was > >> after creation (or after it has been placed on a display list). > > s> Does this mean also calling onLoad and onConstruct events ? > s> What about frame init actions ? > > million dollar question... > as long restart() is intended to be the same as destroy/create, then > yes.
We decide what is it intended for. I wouldn't use a special function to mimic destroy/create I'd rather actually destroy and create instead. If that's all we need we might even trash the 'restart' method. > s> Why not really recreating it ? > > probably to avoid useless re-initialisation of the character. > don't know if there really is any (any useless I mean) I don't think it'd be a bottleneck .. > s> Do we need to retain syntetized instance names ? > > in case of buttons: no > but again, restart() may be designed for other purposes! restart is currenlty *only* used by GUI and buttons. Oh, there's a use in DisplayList::replace_character but I don't think it makes any sense as character feed to that function are always just-created. > s> I can describe what the function does, but I'm not sure it makes sense, > s> we're not reverse engeneering Gnash itself :) > > does it come from gameswf? somebody must have created this beast after > all It was in gameswf, and I modified it for fixing some button stuff when we were looking at it togheter. Then I used it for GUI. We never provided automated testcases for button, so for me we can safely trash everything as I assume everything is still broken until we have automatic testcases showing the contrary. > s> I used ::restart for the GUI menu item MovieControl->Restart. > s> Might be a completely wrong thing to do and we might instead > s> remove the top-level movie and recreate from scratch instead. > > which *maybe* has the same effect... Surely won't trash builtin getter-setters and is likely to do some other needed initialization. > note there is no such command in the propriertary player (rewind does > *not* destroy variables) Good to know. --strk; _______________________________________________ Gnash-dev mailing list [email protected] http://lists.gnu.org/mailman/listinfo/gnash-dev

