discuss-gnustep
[Top][All Lists]
Advanced

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

Re: NSPopUpButton


From: Georg Fleischmann
Subject: Re: NSPopUpButton
Date: Mon, 8 Oct 2001 21:42:28 +0100

Hi Fred,

> As for the GModel, the problem might either come from the big warning,
> that is in that code itself.

The warning seems to be for encoding only, and except for the selectedItem  
popup menus are converted (nib2gmodel) quite well.


> Or be just caused by the code for creating
> entries to a popup button being order dependent. Currently you have to
> set the action and target first and should only than add entries to the
> menu.

I played with the order in [GMAppKit -initWithModelUnarchiver] without success.
I think the problem is related to the setTarget or setAction method of  
NSMenuItem. During loading the gmodel the target and action of a menu item are  
set to nil (at least in my case). What seems to happen is, that in [NSMenuItem  
update] the application is asked for a target and returns nil, which results in 
 
the item being disabled.


Another new problem with pop up menus is, that the NSPopUpButton returns the  
priviously selected item instead of the current selection (if asked inside the  
action method).

Hope this helps.

Georg



reply via email to

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