On 14 March 2010 17:12, Lukas Renggli <[email protected]> wrote: >>> startupLevel >>> ^ 100 >>> >>> method >>> >> err, but you still need to have a method, where this pragma will be located >> :) > > Yes, in the startup method itself. > > The #startUp, #shutDown, #cleanUp protocol is quite strange. They are > all defined as empty methods in Behavior, but for #startUp and > #shutDown a registration is required. This registration is missing in > some cases. #cleanUp does not require a registration. In all cases > cleanUp just delegates to one or more other methods that do the actual > cleanup. > > What I propose is to use pragmas for that. This allows to drop all the > existing implementors of #startUp, #shutDown, and #cleanUp and give > them intention revealing names. Also I envision getting rid of these > ugly boolean flags that are never quite clear what they do and what is > the default. I imagine the following 6 annotations: > > <systemStartup: aPriorityInteger> > <systemResumption: aPriorityInteger> > > <systemShutdown: aPriorityInteger> > <systemSuspension: aPriorityInteger> > > <systemCleanup: aPriorityInteger> > <systemCleanupAgressive: aPriorityInteger> > > This means for example that HandMorph > class>>#clearCompositionWindowManager could simply look likes this: > > HandMorph class>>clearCompositionWindowManager > <systemStartup: 100> > > CompositionWindowManager := nil > > The #startUp and the code that registers and unregisters from the > startup list is no longer necessary. >
Good point. > Lukas > > -- > Lukas Renggli > http://www.lukas-renggli.ch > > _______________________________________________ > Pharo-project mailing list > [email protected] > http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project > -- Best regards, Igor Stasenko AKA sig. _______________________________________________ Pharo-project mailing list [email protected] http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
