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

Eliot Miranda eliot.miranda at gmail.com
Mon Apr 26 18:48:25 UTC 2010


On Mon, Apr 26, 2010 at 5:26 AM, Nicolas Cellier <
nicolas.cellier.aka.nice at gmail.com> wrote:

> 2010/4/26 Hannes Hirzel <hannes.hirzel at gmail.com>:
> > Thank you for the explanations. In particular reading the comment in
> > the Pragma class was helpful. I feel now much more comfortable with
> > the idea of using them. However I still think they are more related to
> > VM primitives and configuration issues. The menu is a GUI related
> > thing and having a MenuSpec feels somewhat more natural....
> >
> > --Hannes
> >
> > P.S. There are currently 854 methods which have a pragma in them.
> >
>
> That's why we should name them (Method) Annotation rather than Pragma...
>

OK, so Pragma is bad; its historical from "primitive pragma".  But
Annotation doesn't capture the potentially executable flavour of pragmas.
 How about MethodMetaMessage?  (mmm, yum :) )  We could talk about
meta-messages for short.  "Add a meta-message that does ..." etc...


>
> Nicolas
>
> > On 4/26/10, Levente Uzonyi <leves at elte.hu> wrote:
> >> 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!!')
> >>>              ))
> >>> ! !
> >>>
> >>>
> >
> >
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20100426/b99fc22c/attachment.htm


More information about the Squeak-dev mailing list