Thread View: comp.sys.next.programmer
1 messages
1 total messages
Started by Michael B. Johnson
Mon, 05 Oct 1992 07:23
some IB questions (non-View palettes, etc.)
Author: Michael B. Johnson
Date: Mon, 05 Oct 1992 07:23
Date: Mon, 05 Oct 1992 07:23
70 lines
3659 bytes
3659 bytes
Hi folks. The last few days I've been looking into palettizing some objects
of mine, and have come up with a few questions about IB that I thought people
here might be able to answer.
In /NextLibrary/Documentation/NextDev/DevTools/18_CustomPalette, the doc says
that in 3.0, palettes can be objects other than subclasses of View. In my
case, I have a whole bunch of subclasses of Object that I want to put on a
palette. Unfortunately, the nicely detailed example they give is only for
a subclass of View. There are a few cryptic comments for the non-view case:
(In the description of the ProgressPalette.[hm] files) "For other types
of palettes [than Views], one or more methods must be implemented."
"At a minimum, a custom palette object must be able to draw, archive, and
unarchive itself; thus, the drawSelf::, write:, and read: methods above."
So, the first question is: does anyone have an example of a custom palette
which is just a subclass of Object? Would you be willing to let me look at
it?
The next question comes from the observation that it seems that not all id's
in a given object's definition show up as outlets in the Connections inspector
in IB. My (obviously flawed) understanding was that when IB parsed an object
header file, any instance variable that was of type id was considered an
outlet, and any method of the form methodName:sender was considered an action.
But if you go into IB, select Document->New Module->New Palette, select the
file owner of the NIB file (which is an IBPalette), bring up the Connections
inspector in IB, you will see that IB only gives you one outlet for that
class, "orginalWindow".
If, however, you look in /usr/include/apps/InterfaceBuilder.h, you will find
the following definition:
@interface IBPalette:Object {
id paletteDocument;
id originalWindow;
id paletteView;
id draggedView;
id paletteInfo; // private
}
Now of those id's, only originalWindow is available to be set in IB. Why
is that?
The next question is moot unless I get the first question answered, but I'll
ask it anyway: assuming I can drag an object from the palettes window into
the files window of my nib file, is there a way to set the icon to be other
than the shiny yellow shadowed ball? Window and Menu sure seem to be able
to do it... The reason this is important is that I'd like to construct
most, if not all, of my program from inside IB, and I should be able to do
it if I can just palettize my objects (thereby giving me an inspector panel
which I can frob the interior state of my objects) and drop them into a nib
file. Since I plan to be dropping lots of non-view objects into the nib
file, it would be nice if I could see the class of the object easily by
having it be a different object than the shiny yellow sphere...
Anyway, there are some other oddities in IB, but I'll see if anybody is willing
to answer these three questions first...
Thanks.
--
--> Michael B. Johnson
--> MIT Media Lab -- Computer Graphics & Animation Group
--> (617) 253-0663 -- wave@media-lab.media.mit.edu
--> NeXT Mail accepted at wave@nordine.media.mit.edu
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads