Re: IBOutlet SEL?
Re: IBOutlet SEL?
- Subject: Re: IBOutlet SEL?
- From: j o a r <email@hidden>
- Date: Sat, 9 Jul 2005 23:47:48 +0200
Mostly I simply don't get what you're talking about. Perhaps you can
try to explain it again from some other angel? Usually it's a good
idea to try to explain *what* you want to do, and not *how* you think
you should do it.
On 9 jul 2005, at 18.13, Sammi Williams wrote:
I'd like to have a custom object instantiated in my NIB that has a
number of 'targetable' attributes - ie
@interface Blah : NSObject {
IBOutlet SEL method;
IBOutlet id target;
IBOutlet id arg;
}
@end
To me this doesn't make any sense. IBOutlets are things that you want
to connect to UI elements in IB. A selector or method argument are
not things that you can hook up in IB. You can of course still have
any number of non-outlet instance variables for the objects you
instantiate via nib files.
This is so that I can have a generic reusable class which can fire
off multiple events for a single button click, for example. The
only possible way I can think of achieving this is having a hidden
window with a 'NSTextField' with the name of the selector and
pulling that out whenever I want to execute the selector on the
target.
But, this seems bad. What other solutions exist? It seems that
there are many problems with IB when you want to create even a
mildly complex user interface. Things like having multiple
[sequentially activated] targets seems like a given.
Setting up a button with a target+action that allows you to configure
at runtime what happens when the action is triggered is not a very
difficult thing to accomplish. But it's difficult for me to give any
sort of example, as I'm not nearly sure what you're looking for.
j o a r
Attachment:
smime.p7s
Description: S/MIME cryptographic signature
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden