Note that there are some explanatory texts on larger screens.

plurals
  1. POhow to bind NSManagedObject properties to another window's table?
    text
    copied!<p>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</p> <p>I've a main window, contains table of objects, and another window to show the properties of the selected object from the main window</p> <p>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)</p> <pre><code>@interface Metadata : NSManagedObject @property (nonatomic, retain) NSString * title; @property (nonatomic, retain) NSString * name; @property (nonatomic, retain) NSString * mail; @end </code></pre> <p>the inspector window's table is intended to be like this:</p> <pre><code> ------------------------------------------------- |type name value | |-------------------------------------------------| |NSString title "sample" | |NSString name "sample" | |NSString mail "sample@mail"| |_________________________________________________| </code></pre> <p>and of course changing in the inspector window will update values in the main window and vice versa</p> <p>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</p> <p>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</p> <p>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</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload