Custom palette questions
Custom palette questions
- Subject: Custom palette questions
- From: "E. Wing" <email@hidden>
- Date: Thu, 11 Nov 2004 18:52:09 -0800
Hello, I've been trying to make a custom palette for one of my OpenGL
views so I can expose some bindings and use it in a more convenient
manner through Interface Builder. But I have a couple of questions
that I can't find documentation about.
First, is it possible to add additional Target/Action or Outlets to my
palette to be exported? For example, I have a Target/Action method I
would like to export called takeBackgroundColorFrom. This method
changes the glClearColor in my specialized OpenGL widget. The idea is
that I want the end user of my palette to be able to connect an
NSColorWell via Target/Action to my palette and change the color. I
want this connection to be available in the actual application (say in
a preferences window), not in the Inspector Panel.
I tried adding an "Action Name" called takeBackgroundColorFrom through
my class inspector, but after everything was built and I tried using
my palette, this action was not displayed. (Only fax and print were
available.)
However, if added the action in the project using the palette (not the
project creating the palette), I was able to call my
takeBackgroundColorFrom method.
So this works, but it requires the end user of the palette to know
that this action exists, and they must enter it manually. I would like
to know if there is a way to automatically export this so the user
need not know about all these things.
My second question is, how I can draw something in my palette so it
isn't just a blank white rectangle. Because my view is a subclass of
an NSOpenGLView, I have defined my drawRect method. But in Interface
Builder, it doesn't seem to render my OpenGL calls. So I get a white
rectangle. I've seen examples of proxy images used for palettes that
are not NSViews, but my palette is an NSView and I have been
unsuccessful at applying non-view those techniques. Can somebody
recommend a solution for this?
Thanks
_______________________________________________
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