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

Levente Uzonyi leves at elte.hu
Mon Apr 26 11:03:17 UTC 2010


On Mon, 26 Apr 2010, Hannes Hirzel wrote:

> Hello Philipp
>
> I took a fresh 4.1 image, updated it to 10012, and loaded Morphic-phite.429.mcz.
>
> As the comments were fine I was quickly able to write an example (code below).
>
> Then I had to choose 'Rebuild menus'
>
> It worked fine.
> The question is now (see another thread by Bert) if we should go or
> your solution (MenuSpec based) or the one by Steve Wessels (Pragma
> based).

It's Balázs Kósi who implemented the registration method with pragmas
(http://lists.squeakfoundation.org/pipermail/squeak-dev/2010-April/149534.html 
).

>
> I do not feel too comfortable with pragmas yet whereas the MenuSpec is
> something I easily understand. And in addition I have the gut feeling
> that pragmas are meant for some more basic things (a kind of compiler
> directive, see http://en.wikipedia.org/wiki/Directive_%28programming%29)

Pragmas in Squeak are not directives (though they can be used as 
directives) but a way to add metadata to a method. So the wikipedia page 
is irrelevant. If take a look at the class comment of Pragma, you'll 
feel more comfortable with them.
(I think that we should convert all preferences to pragma-style. It could 
be a goal for 4.2.)

>
> Like Bert  I would like to see some discussion **on this issue, but
> not too along as I would like to start using this feature asap.

We should review both methods, consider the benefits and 
drawbacks and then make a decision.


Levente

>
> Hannes
>
> ** The thread started by Bert at
> http://lists.squeakfoundation.org/pipermail/squeak-dev/2010-April/149563.html
>
> -----------------------
> Model subclass: #MyReallyNiceApplication
> 	instanceVariableNames: ''
> 	classVariableNames: ''
> 	poolDictionaries: ''
> 	category: 'MyMenuTests'!
>
> "-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- "!
>
> MyReallyNiceApplication class
> 	instanceVariableNames: ''!
>
> !MyReallyNiceApplication class methodsFor: 'as yet unclassified'
> stamp: 'hjh 4/26/2010 08:52'!
> menuEntrySpecification
> 	"Test to add another entyr in the Help menu"
>
>
> ^MenuEntrySpec newForDockingBarFrom: (Dictionary newFromPairs: #(
> 		#contents 'Hello?'
> 		#location #('Help' 'a subMenu' 'another subMenu')
> 		#target MenuMorph #selector #inform: #arguments #('Hello World!!')
> 		))
> ! !
>
>


More information about the Squeak-dev mailing list