bug-gnustep
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSMenuView and popups (was: Re: [PATCH] Menus in lowerleft corner)


From: Willem Rein Oudshoorn
Subject: Re: NSMenuView and popups (was: Re: [PATCH] Menus in lowerleft corner)
Date: 17 Mar 2003 07:56:15 +0100
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2

Fred Kiefer <FredKiefer@gmx.de> writes:

> Hi Wim,
> 
> Willem Rein Oudshoorn wrote:
> >>Since the NSMenuViewWindowTitleBar-thingie is created in NSMenuView's
> >>initWithFrame, and the NSMenu creating the NSMenuView doesn't know its 
> >>owned by
> >>a popup until right after its init, we are slightly screwed. I suppose we 
> >>could
> >>catch this on the first sizeToFit in NSMenuView -- like we catch the left
> >>offset?

> > NSMenuView class into two:  GSPopupMenuView and GSMenuView.
> > But your suggestion is easier and Fred Kiefer might object
> > to the split.
> 
> looks as if there was some misunderstanding. I am strongly in favour
> of such a change. If there is sufficent difference between these cases
> split them up!
> What I don't like is, that you came up with a new protocoll for
> NSMenuView, which is not there in MacOSX nor Openstep and which is
> also not required for this change, as both classes will have the
> superclass NSMenuView.

Is there any other reason why you are against the protocol instead
of not being present in OpenStep / MacOSX?  
Also note that I see it more as an informal protocol codifying 
the interaction between NSMenuView with NSMenu, NSMenuItem and other 
NSMenuView's.

The disadvantage if inheriting from NSMenuView are the methods:

- setHorizontal
- setWindowFrameForAttachingToRect:onScreen:preferredEdge:popUpSelectedItem:

which are not always appropriate for the different kind of menus.
or methods like:

- attachedMenu

which should belong to NSMenu.


Also in my opinion the hierarchy should look like:


    GSMenuView  (implements informally the NSMenuView protocol)
       |
       |
   +---+--------------+
GSPopupMenuView   NSMenuView


Instead of:

   NSMenuView
      |
   GSPopupMenuView

Because what do you imagine that setHorizontal: YES on 
the GSPopupMenuView should do?

Also, remember that according to the documentation the 
NSMenuView class and friends do not work and are depricated.

Any comments?


Wim Oudshoorn.






reply via email to

[Prev in Thread] Current Thread [Next in Thread]