Re: Drawer examples?
Re: Drawer examples?
- Subject: Re: Drawer examples?
- From: Seth Willits <email@hidden>
- Date: Sat, 19 Jul 2008 16:42:46 -0700
On Jul 19, 2008, at 1:53 PM, Ashley Perrien wrote:
I've just learned how to directly access custom views and am not
trying to set up an application with a drawer that has a custom view
in it (along with a few other items). I can get the drawer to work
properly but am having no luck with getting the custom view within
the drawer to redraw except by closing and reopening it. I throw
setNeedsDisplay: YES at it from everywhere I can think of and it
just won't redraw.
You're drawing from within the drawRect: method in your custom view
subclass, correct?
The larger problem is I can create and set up the drawer in IB and
set up bindings with text fields but I've no idea how to go about
accessing the various items in the drawer. I can't figure out how or
even if I need to wire up the connections like with normal windows.
I create IBOulets and actions and when control dragging they don't
show up.
What are you trying to connect to? NSDrawer isn't going to have
outlets for your views and such, naturally. You should be connecting
from Files Owner or whatever other controller object to the controls
in the drawer's content view. (Not the drawer itself).
It's almost exactly the same as a window, except that instead of there
being a prefabbed content view inside of the drawer like there always
is with NSWindow, it's up to you to create the content view.
--
Seth Willits
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden