discuss-gnustep
[Top][All Lists]
Advanced

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

Re: NSPopUpButton behaviour


From: Enrico Sersale
Subject: Re: NSPopUpButton behaviour
Date: Sat, 8 Sep 2001 02:40:40 +0300 (EEST)

On Fri, 7 Sep 2001, Enrico Sersale wrote:

> With the last cvs, a strange behaviour has appeared.
> Selecting a item from a NSPopUpButton, I get:
>
> NSInvalidArgumentException: NSMenuItem does not recognise
> titleOfSelectedItem
>
> Some items are dimmed, too.
>
> ...
>

After more tests I think that, somewere, a bug was added.
Some simple code that had always worked, now, doesn't work anymore.

Try to create a simple window with a NSPopUpButton in its contentView,
then:

  with this code:

    [popup addItemWithTitle: @"Enrico"];
    [popup addItemWithTitle: @"Mihaela"];
    [popup setTarget: self];
    [popup setAction: @selector(popupAction:)];

  the menu works but all the items looks, gray, dimmed.

  and with this:

    [popup setTarget: self];
    [popup setAction: @selector(popupAction:)];
    [popup addItemWithTitle: @"Enrico"];
    [popup addItemWithTitle: @"Mihaela"];

  all the menu items looks well but the app segfaults with:

#7  0x403c96ee in -[NSObject doesNotRecognizeSelector:] (self=0x8247088,
    _cmd=0x4048b110, aSelector=0x804c3f0) at NSObject.m:850
#8  0x403c9861 in -[NSObject forwardInvocation:] (self=0x8247088,
    _cmd=0x8053748, anInvocation=0x8123350) at NSObject.m:867
#9  0x40421a2a in GSInvocationCallback (callback_data=0x404a2560,
    args=0xbfffe764) at GSFFCallInvocation.m:868
#10 0x404c5ab9 in __vacall_r () at eval.c:41
#11 0x403c9f2f in -[NSObject performSelector:withObject:] (self=0x80b4ba8,
    _cmd=0x4025bb38, aSelector=0x804c3a0, anObject=0x8247088)
    at NSObject.m:1049
#12 0x400b3da0 in -[NSApplication sendAction:to:from:] (self=0x8069f48,
    _cmd=0x40283bf8, aSelector=0x804c3a0, aTarget=0x80b4ba8,
sender=0x8247088)
    at NSApplication.m:1281
#13 0x4013bf50 in -[NSMenu performActionForItemAtIndex:] (self=0x82457d0,
    _cmd=0x40285710, index=2) at NSMenu.m:754
#14 0x4014242a in -[NSMenuView trackWithEvent:] (self=0x8246220,
    _cmd=0x40285790, event=0x8241bc0) at NSMenuView.m:909
#15 0x401427c0 in -[NSMenuView mouseDown:] (self=0x8246220,
_cmd=0x402a85f8,
    theEvent=0x825dcb8) at NSMenuView.m:962
#16 0x401b8dac in -[NSWindow sendEvent:] (self=0x8245850, _cmd=0x4028bd50,
    theEvent=0x825dcb8) at NSWindow.m:2458
#17 0x4015336c in -[NSPopUpButton mouseDown:] (self=0x8241cb8,
    _cmd=0x402a85f8, theEvent=0x8254290) at NSPopUpButton.m:346
#18 0x401b8dac in -[NSWindow sendEvent:] (self=0x82294c0, _cmd=0x4025bad0,
    theEvent=0x8254290) at NSWindow.m:2458
#19 0x400b397e in -[NSApplication sendEvent:] (self=0x8069f48,





reply via email to

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