[squeak-dev] The Inbox: Morphic-phite.428.mcz

Philipp Tessenow phite at nada1.de
Mon Apr 26 07:45:19 UTC 2010


Hello Hannes,

thank you for your comments. I am on the way to commit an addition,
which alows to add MEnuEntries to the WorldMenu as well. (This is
already done).
You are right, we need some class comments and examples. I'll add this
asap :)

  Philipp

Am 26.04.2010 06:28, schrieb Hannes Hirzel:
> Hello Philipp
>
> I loaded your contribution Morphic-phite.428.mcz into a fresh image
> updated to #10012.
>
> Then I typed
>     Docking
> into the search bar and thus found the class
>     TheWorldMainDockingBar
>
> Then I clicked onto the class comment tab. What I saw is
>
>       A TheWorldMainDockingBar is xxxxxxxxx.
>
>       Instance Variables
>
>
>
> I was expecting at least one or two sentences about your addition.
> What does this thing and how do I add menu entries.
>
> OK, you have given the indication in your mail above in this thread.
> So I went to the search bar again and typed
>      menuEntrySpecification
>
> A message name browser came up but had nothing in it.
>
> I was asking myself - What do I do next?
>
> I decided to stop and write this email.
>
> My three remarks
>
> 1) A comment in the class TheWorldMainDockingBar is necessary (if this
> is the proper class)
>
> 2) An example / test case is necessary as well
>
> 3) I like the idea of having MenuEntrySpecs. They fit nicely with the
> ToolBuilder approach.
>
>
> Note: Bert wants to discuss in another thread this approach
> (MenuEntrySpecs) and the solution proposal by Steve Wessels (Pragma
> based).
>
> Conclusion: I think your proposal needs to be a bit more worked out so
> that people can easily see how it works.
>
> --Hannes
>
> On 4/25/10, Philipp Tessenow <phite at nada1.de> wrote:
>   
>> Hi,
>>
>> I refactored the docking bar to be extendable with custom menu entries.
>> Every class may implement #menuEntrySpecification to answer a
>> MenuEntrySpec - see:
>>
>> ^ MenuEntrySpec newFrom: (Dictionary newFromPairs: #(
>>         #contents 'Well... hello?'
>>         #help 'Displays the Hello World'
>>         #location #('Help')
>>         #target MenuMorph #selector #inform: #arguments #('Hello World!')
>>         #position #first))
>>
>> Which adds a menuEntry 'Well... Hello?' in the first slot of the Help-menu.
>> It is possible to select as many subMenus as you like.
>> MenuEntries can be position within a menu by defining it's position
>> (#first, #last, #(#before 'aMenu'), #(#after 'aMenu')
>>
>> As MenuEntrySpecs can are created with a Dictionary you can leave field
>> you don't want to declare. (As is did with #icon and #selectedIcon in my
>> example).
>>
>> Comments please :)
>>
>> regards,
>>   Philipp



More information about the Squeak-dev mailing list