2009/3/4 Stéphane Ducasse <[email protected]>: > Thanks > this is strange that exactly the same week where we talk about that > and where > we discuss about announcements, such topics got interesting from some > other people. > We are probably not that wrong. ;) > Thanks cedric keep us informed.
no problems, I can do that ;) you see that's exactly why I find Pharo forks as the right decision... First, it frees you (and this is huge)... Second people indirectly accepts/pick ideas/participate to what's discussed... :) So now, in a certain way, we have "le beurre et l'argent du beurre" ;) Cheers > > Stef > > On Mar 4, 2009, at 11:26 AM, Cédrick Béler wrote: > >> As some of us are unregistered, I thought it could be of interest ;) >> >> >> ---------- Forwarded message ---------- >> From: Andreas Raab <[email protected]> >> Date: 2009/3/4 >> Subject: [squeak-dev] [ANN] Preference pragmas >> To: The general-purpose Squeak developers list >> <[email protected]> >> >> >> Folks - >> >> I wanted to make the property whether to show individual processes in >> MessageTally a preference and couldn't recall any of the three >> gazillion methods to create one ;-) So I decided enough is enough and >> added the ability to register a preference via Pragma. In other words, >> you specify two class side accessors (using MessageTally as example): >> >> showProcesses >> "Indicates whether to show each process separately or >> cumulatively." >> <preference: 'Show Processes in MessageTally' >> category: 'debug' >> balloonHelp: 'If enabled, each profiled process is >> shown individually in MessageTally' >> type: #Boolean> >> ^ShowProcesses >> >> showProcesses: aBool >> "Indicates whether to show each process separately or >> cumulatively." >> ShowProcesses := aBool. >> >> and then register the preference in the class initialization method >> via: >> >> initialize >> "MessageTally initialize" >> "By default, show each process separately" >> ShowProcesses := true. >> "Register preferences" >> Preferences addPreferencesFor: self. >> >> The nice thing about this scheme is that the preference is local to >> the code where it's used and that there are no more generated >> accessors which mess up Monticello packages etc. What could probably >> be improved is the self-registration; I left it that way for now since >> I don't know how expensive it would be to scan all classes for new >> preferences when one opens a preference browser. There is also an >> example class PreferenceExample that illustrates the different types >> of preferences (textual, numeric, color, boolean) you can use. >> >> To install, just execute the following from Squeak 3.10.2: >> >> Installer mantis fixBug: 7306. >> >> Enjoy! >> - Andreas >> >> >> >> >> -- >> Cédrick >> >> _______________________________________________ >> Pharo-project mailing list >> [email protected] >> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project >> > > > _______________________________________________ > Pharo-project mailing list > [email protected] > http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project > -- Cédrick _______________________________________________ Pharo-project mailing list [email protected] http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
