Q: I've created a loadable palette for InterfaceBuilder according to the instructions in the Release Notes. I then created an inspector, and wrote all of the appropriate routines. Now, I'm trying to use this from within InterfaceBuilder. If I drag my object from the palette, and then modify some of its attributes and select OK, the inspector doesn't remember the settings when I select the object again at a later time. Why?
A: This isn't documented, but within the ok:sender method for your inspector object, you should call the ok: method for its super class, and return that value. Here's a template for your ok: method.
ok:sender
{
/* do a bunch of stuff in here */
return [super ok:sender];
}
This is also true for the revert: method. You should call the super class's revert: method from within the object's. Like this:
revert:sender
{
/* do a bunch of stuff in here */
return [super revert:sender];
}
QA750
Valid for 2.0, 3.0