I want to make an inspector window, like the inspector window of Preview mac application where I have a NSManagedObject model subclass and want to inspect it's properties
I've a main window, contains table of objects, and another window to show the properties of the selected object from the main window
my model is: (and it must be generic, the inspector must be able to inspect any NSManagedObject subclass instance, so the properties names aren't given)
@interface Metadata : NSManagedObject
@property (nonatomic, retain) NSString * title;
@property (nonatomic, retain) NSString * name;
@property (nonatomic, retain) NSString * mail;
@end
the inspector window's table is intended to be like this:
-------------------------------------------------
|type name value |
|-------------------------------------------------|
|NSString title "sample" |
|NSString name "sample" |
|NSString mail "sample@mail"|
|_________________________________________________|
and of course changing in the inspector window will update values in the main window and vice versa
The problem is that I can't bind the inspector window to the model directly, because I want to bind to it's properties, so I have a model that have 3 properties to be viewed in a 3 rows table, each property in a row
if I create a new Class to hold the properties of the managed model, I'll lose the binding reference and may not even work
The problem is: I can't display the properties of a single (NSManagedObject subclass, in this case, Metadata) instance as a table, not only a columns, but a row for every property