The Omni Group
These forums are now read-only. Please visit our new forums to participate in discussion. A new account will be required to post in the new forums. For more info on the switch, see this post. Thank you!

Go Back   The Omni Group Forums > Developer > Omni Frameworks
FAQ Members List Calendar Search Today's Posts Mark Forums Read

 
OmniInspector Thread Tools Search this Thread Display Modes
I have managed to put together the code to create a tabbed inspector with the views I need. I have implemented the OIInspectableController protocol in one of the objects in the responder chain.

I don't, however, understand how to trigger the updating of the inspector contents. I tried [OIInspectorRegistry updateInspector], but this doesn't seem to do what I thought it should.

So what causes the inspection system to think that the selection has been changed?
 
Calling +updateInspector should do the trick. Perhaps the update is breaking down further on (in the build of the inspection set in your inspectable controller or in the -inspectObjects: method on your inspector)?
__________________
CTO, The Omni Group
 
There were two non-obvious things I had to do to get the inspector going. I added an Inspector menu with an menu item of type OIDynamicInspectorMenuItem, titled "Inspectors Placeholder". This caused my inspector windows to show up. Then I posted a OIInspectorSelectionDidChangeNotification whenever my application's selection changed. This keep the inspected object up to date.
 
Creating the global inspector menu is definitely helpful (for the UI at least), but posting the notification should be optional. When that notification fires, OIInspectorRegistry will get called with:

- (void)_selectionMightHaveChangedNotification:(NSNo tification *)notification;
{
[self _inspectWindow:[NSApp mainWindow] queue:YES onlyIfVisible:YES updateInspectors:YES];
}

But, if you look at +updateInspector, it does the same thing (in fact, maybe one should call the other...).

Perhaps registering the menu item cause setup to happen earlier than it would have otherwise and that alone would be sufficient. Or perhaps some other change made the selection change code start firing.

Anyway, hopefully all is working well for you now! Thanks for the update!
__________________
CTO, The Omni Group
 
 


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to use OmniInspector framework pronvit Omni Frameworks 2 2008-01-15 03:47 PM


All times are GMT -8. The time now is 10:05 AM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2024, vBulletin Solutions, Inc.