[vwnc] menuBar in subcanvas

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

[vwnc] menuBar in subcanvas

Shiro Ogawa
James showed how to implement the toolBar in a subcanvas in
http://www.cincomsmalltalk.com/casts/stDaily/2007/smalltalk_daily-06-05-07.html

I tried a similar approach without understanding the mechanism. I
changed the #tools code for #menuBar

menuBar
        ^menuBar isNil
                ifTrue: [ | lookPolicy |
                        lookPolicy := LookPreferences widgetPolicy lookPolicyClass new.
                        menuBar := lookPolicy menuBarClass menu: self class menuBar performer: self]
                ifFalse: [menuBar]

and assign #menuBar for ViewHolders View:, then GUI Painter got an
error as Menu does not understand #container: method.

James, is it possible to use menuBar in subcanvas?

Thanks

Shiro Ogawa
_______________________________________________
vwnc mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc
Reply | Threaded
Open this post in threaded view
|

Re: [vwnc] menuBar in subcanvas

James Robertson-7
mm, I'm not really sure; I'd have to look.  While the toolbar and  
menubar use similar APIs, they aren't the same object

James Robertson
Cincom Smalltalk Product Evangelist
http://www.cincomsmalltalk.com/blog/blogView
Talk Small and Carry a Big Class Library




On Apr 21, 2009, at 1:08 AM, Shiro Ogawa wrote:

> James showed how to implement the toolBar in a subcanvas in
> http://www.cincomsmalltalk.com/casts/stDaily/2007/smalltalk_daily-06-05-07.html
>
> I tried a similar approach without understanding the mechanism. I
> changed the #tools code for #menuBar
>
> menuBar
> ^menuBar isNil
> ifTrue: [ | lookPolicy |
> lookPolicy := LookPreferences widgetPolicy lookPolicyClass new.
> menuBar := lookPolicy menuBarClass menu: self class menuBar  
> performer: self]
> ifFalse: [menuBar]
>
> and assign #menuBar for ViewHolders View:, then GUI Painter got an
> error as Menu does not understand #container: method.
>
> James, is it possible to use menuBar in subcanvas?
>
> Thanks
>
> Shiro Ogawa
> _______________________________________________
> vwnc mailing list
> [hidden email]
> http://lists.cs.uiuc.edu/mailman/listinfo/vwnc
>

_______________________________________________
vwnc mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc