Search code examples
objective-cgrails-ormgnustep

GNUstep/Objective-c and nib files


I don't think I fully understand how the objects and their source file interact with Gorm. When you subclass a class like NSObject, it seems to store a snapshot of that object according to how you configure it with outlets and actions.

My first question is where is this class stored (before it's instantiated into the nib, because it's not the implementation file and it's not in the nib yet?

enter image description here

Where is the configuration for AppController (my custom subclass) stored as it is located in the image above? Is it a temporary file, because it exists before instantiation.

Now once it is instantiated it seems to be a snapshot of that class, but you haven't implemented it yet, so how is it freeze dried into the nib, if you can configure after you have save the *.gorm file?

enter image description here

In the picture above, the icon for AppController seems to be the object, but I haven't written the implementation yet, so at what point and how are the two bonded. Is AppController in the nib act like a proxy for the object, or is the object serialized into the nib when I compile it?

Sorry if this is confusing, I tried to explain my question as good as I could. I greatly appreciate any help. :-)


Solution

  • They are bonded whe the nib is loaded at runtime. The nib contains the name of the class (not a persisted instance); an instance will be created whe the nib is loaded. As part of that, the nib loader will also connect that new instance up with any actions you've told it should be connected to it.