discuss-gnustep
[Top][All Lists]
Advanced

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

Re: simulating user action to initialize a panel


From: Wolfgang Lux
Subject: Re: simulating user action to initialize a panel
Date: Fri, 20 Nov 2009 09:09:37 +0100

Riccardo Mottola wrote:

I have the following problem:
I have an accessory view where some controls modify or send messages to other controls. For example selecting an item makes another disabled or moving a slider writes its current value inside a textfield.

I created all items, now I want after loading to "touch" all items so that the respective relationships get updated.

For a slider it is easy: a performClick message will simulate the user clicking on it and the value will be displayed.

My problem is now a NSPopUpMenu: depending on the selection other items get selected or no.

I don't know how to create the event! I tried to set the selected item, but it does not trigger any event. I tried selecting forcily another item and then the intended item back again, but that doesn't work either (and it would be not what I want anyway, it would be suboptimal, I do not want to hard-code the default item of the menu). Perform click "opens" the menu, but does not select. Two clicks do not help either..


How could I accomplish what I need? Of course I could instantiate the view "hardwired" so that everything is set with the correct state and default, but that is I think very inflexible.

[popUp sendAction: [popUp action] to: [popUp target]]

Wolfgang






reply via email to

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