Login  Register

Re: How pragma works to create menu?

Posted by Mark Rizun on Jul 10, 2014; 2:28pm
URL: https://forum.world.st/How-pragma-works-to-create-menu-tp4767409p4767417.html

Ok, thanks)


2014-07-10 16:21 GMT+02:00 Nicolai Hess <[hidden email]>:
2014-07-10 15:45 GMT+02:00 Mark Rizun <[hidden email]>:

In the NautilusRefactoring class we have a method on a class side:

sourceCodeRefactoringMenu: aBuilder
        <nautilusGlobalSourceCodeMenu>
        | target |
        target := aBuilder model.
        target selectedClass ifNotNil: [:selectedClass | selectedClass
sourceCodeRefactoring: aBuilder ]

I'd like to understand how this line works: target := aBuilder model. I
mean, how aBuilder initializes a model?
Because, if you change the pragma from <nautilusGlobalSourceCodeMenu> to
another one, you will get another result using this particular line.

Mark


aBuilder is constructed from a PragmaMenuBuilder, this PragmaMenubuilder calls all methods with
pragma <nautilusGlobalSourceCodeMenu>.

The model is initializes in for example, in AbstractNautilusUI classMenuBuilder.


Nicolai



 


--
View this message in context: http://forum.world.st/How-pragma-works-to-create-menu-tp4767409.html
Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.