[squeak-dev] Re: The Trunk: System-mha.167.mcz
Igor Stasenko
siguctua at gmail.com
Wed Nov 18 07:37:27 UTC 2009
2009/11/18 Andreas Raab <andreas.raab at gmx.de>:
> Michael Haupt wrote:
>>
>> On the other hand, there is now a preference to toggle displaying a
>> menu item for updating from the server at the top level of the World
>> menu, just above all the Save and Quit items.
>
> Two comments on that: First, preferences are a bane. The update menu should
> be either in one place or another, but not depending on preference, day of
> the week, or phase of the moon ;-) (personally I think we should redo the
> entire desktop menu but that's just me)
>
> Secondly, instead of continuing to create new dependencies to Preferences
> which are hard to initialize, maintain and remove, you might want to use a
> pragma instead. To do this, add a class var (say IncludeUpdateInHelpMenu)
> and then these two methods:
>
> TheWorldMenuClass>>includeUpdateInHelpMenu
> <preference: 'Update menu in Help'
> category: 'morphic'
> description: 'Governs whether the update button is shown in the help
> menu'
> type: #Boolean>
-- ^IncludeUpdateInHelpMenu ifNil:[false] "or true"
++ ^IncludeUpdateInHelpMenu == true
:)
>
> TheWorldMenuClass>>includeUpdateInHelpMenu: aBoolean
> "Preference setter"
> IncludeUpdateInHelpMenu := aBoolean
>
> Voila, the pain of creating, initializing removing preferences is gone. You
> can find other examples by browsing the senders of
> preference:category:description:type:
>
> Cheers,
> - Andreas
>
>
--
Best regards,
Igor Stasenko AKA sig.
More information about the Squeak-dev
mailing list
|