What may be put into "myNiceApp_prefix.pch" file?

In my _Prefix.pch file, there are three lines which seem to be a compiler directive:

#ifdef OBJC
#import <Cocoa/Cocoa.h>
#endif

Is it possible (and would it be a good practice?) to put into this file all the properties of my script? Or to put them into a file (say "myNiceApp_Properties.pch) and to include it into my script code, like:

script myNiceAppDelegate

#import myNiceApp_Properties.pch

on applicationWillFinishLaunching_(aNotification)

That’s because there are lots of properties in my script, there is no “folding” possibility for them, so I’d prefer open them separately on the editor. Or does someone have a better idea?

Thanks

Hi,

properties (aka instance variables) belong to a specific class, while a precompiled prefix header is a global file which is automatically included at the head of every class.

A better way (and a purpose of object oriented programming) is to create multiple classes.
For example in a larger project the AppDelegate class should include only the application delegate methods.

Personally I don’t touch the .pch file, I’m using a “Globals.h” header file for global (static) variables, global headers, #import statements for linked frameworks, global enumerations and macros. Often I’m using also an extra controller class for the GUI.