Re: drawer toggle
Re: drawer toggle
- Subject: Re: drawer toggle
- From: Simon Stapleton <email@hidden>
- Date: Sat, 4 Jan 2003 19:37:44 +0100
Subject: drawer toggle
From: "John Q." <email@hidden>
To: email@hidden
Hi,
If I had a button on a drawer, when I press this button I would toggle
to another drawer!!
If I make a connection from the button to the new drawer on toggle, the
new drawer opens behind the first drawer!!
What make I false?
If I understand you correctly, what you want is the first drawer to
close and the second to open, no? In that case, you need to create a
new action in your controller class that triggers both toggle actions
and connect your button to that, as you can't connect to two actions at
once.
Something like this:
@interface myController : NSWindowController {
IBOutlet NSDrawer * drawerOne;
IBOutlet NSDrawer * drawerTwo;
}
- (IBAction) toggleDrawers: (id) sender;
@end
@implementation myController
- (IBAction) toggleDrawers: (id) sender {
[drawerOne toggle];
[drawerTwo toggle];
}
@end
In order for this to work, your drawers need to be connected to the
outlets in IB.
My second question is, If I make a connection in the IB to a drawer or
else, can I wirte in PB something in this connection, like open the
drawer(from IB) and then in the PB I would like to start in this open
connection the scanner with a twain funktion too!! Is this possible?
Now you have access to your drawers through the outlets set up above,
it's as simple as calling
[drawerOne toggle];
or whatever method you wish.
Oh, and your '.' key is broken. It seems to be emitting '!!' every
time you press it, which is going to give you lots of compile errors
when you try accessing members of structs.
Simon
--
PGP Key Id : 0x50D0698D
--
Well, we finally have an indoor toilet. But what new disasters have
struck the Alpenproject?
Find out at : <
http://www.tufty.co.uk/Move/index.html>
_______________________________________________
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.