Re: 3 IB Qs: actions; view tags; NSWindow setFrame
Re: 3 IB Qs: actions; view tags; NSWindow setFrame
- Subject: Re: 3 IB Qs: actions; view tags; NSWindow setFrame
- From: David Remahl <email@hidden>
- Date: Fri, 21 Feb 2003 16:14:39 +0100
1) Multiple action targets?
Interface Builder doesn't allow controls to be connected to more than
one
target, for example a button that sends the same action message to
more than
one object. I guess this is by design? What is the suggested approach:
send the
message to a controller-type object for further propagation?
It is by design. Connect the action to a method in your controller, and
in the controller do this:
- (IBAction)someButtonClicked:(id)sender {
[target1 someButtonClicked:sender];
[target2 someButtonClicked:sender];
}
2) No tags for custom views?
Interface Builder doesn't allow a "tag" value to be assigned to a
custom view.
The Attributes panel is empty and marked as "Not Applicable". Tags are
part of
NSView so it seems that they *could* be applied. Just an oversight?
Report it as a bug with Apple.
3) NSWindow setFrame:
NSWindow setFrame: is supposed to set size+origin of recipient window
... but
although my window size changes, its location on screen never does.
Why?
NSWindow isn't documented to -setFrame:. It does respond to
-setFrame:display:. That is the method you should use (with YES) as the
second argument. Alternatively, you may want to use
-setFrame:display:animate:.
/ Rgds, David
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.