OmniAppKit's Licky Inspectors - Help!
OmniAppKit's Licky Inspectors - Help!
- Subject: OmniAppKit's Licky Inspectors - Help!
- From: Demitri Muna <email@hidden>
- Date: Thu, 3 Jul 2003 19:20:44 -0700
I'm trying to implement Omni's "licky" inspectors (the ones in
OmniGraffle), and I'm having a little trouble. I think I've figured out
most of the details, and actually do have them running in my app.
They're talking to me, and I'm talking to them.
The problem I am having is adding a second inspector panel. The second
one shows up in my app, but it behaves erratically. When I drag one,
the motion is very jerky. It drags the other one along with it, even
when they are not connected. Closing one will slide both away from the
mouse.
I think I am not wholly clear on the concept of the InspectorGroups, or
the meaning of the numbers returned by "defaultDisplayGroupNumber", or
else I may be loading them incorrectly. This is what I'm doing to load
them (keep in mind that this is about 90% reading the code, and 10%
guesswork!).
OAInspectorController *oaic; // this will be reused
OAInspectorGroup *inspectorGroup = [[[OAInspectorGroup alloc] init]
autorelease];
InspectorControllerA *inspectorControllerA;
inspectorControllerA = [[InspectorControllerA alloc] init];
[inspectorControllerA autorelease];
// load first inspector
if (![NSBundle loadNibNamed:@"InspectorA" owner:inspectorControllerA])
{
NSLog(@"error");
} else {
oaic = [OAInspectorRegistry registerInspector:inspectorControllerA];
//only call once after 1st inspector registered
[OAInspectorRegistry controllerStartRunning:nil];
[oaic loadInterface];
[inspectorGroup addInspector:oaic]; //no longer need oaic pointer
}
// load second inspector
InspectorControllerB *inspectorControllerB;
inspectorControllerB = [[InspectorControllerB alloc] init];
[inspectorControllerB autorelease];
if (![NSBundle loadNibNamed:@"InspectorB" owner:inspectorControllerB])
{
NSLog(@"error");
} else {
oaic = [OAInspectorRegistry registerInspector:inspectorControllerB];
[inspectorGroup addInspector:oaic];
}
// assume for our purposes here that all nibs loaded ok
// finish...
[OAInspectorRegistry showAllInspectors];
// update inspectors in case anything is currently selected
[defaultNotificationCenter
postNotificationName:OAInspectorSelectionDidChangeNotification
object:nil];
Also, how do I keep the Color panel hidden if I don't need it in my
app? Any help would be greatly appreciated!
Thanks in advance,
Demitri
_______________________________________________
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.