Home | Categories | Alphabetical | Classes | All Contents | [ < ] | [ > ]

Generating Files


The IDL GUIBuilder generates the following two types of files:

Generating Resource Files

The *.prc files contain the resource definitions for the graphical interface. You can open *.prc files in the IDL GUIBuilder and modify the interface at anytime. Do not attempt to modify this file directly.

To save a *.prc file for the first time, choose Save or Save As from the IDLDE File menu. This opens the "Save As" dialog, which allows you to select a location and indicate a file name for the *.prc file.

To have the .prc file generate code for a project, open the .prc file and do the following for your platform:

Generating IDL Code

The IDL GUIBuilder can generate these two kinds of *.pro IDL source code files:

To save both the widget code and the event handler *.pro files, select File ® Generate .pro from the IDLDE menu. This opens the "Save As" dialog, which you can use to select a location and indicate a name for the widget code. The event code file name is based on the name specified for the widget code. For example, if you enter app1.pro in the File name field, the event code file will be named app1_eventcb.pro.

Note
Never modify the generated *.pro interface file. If you decide to modify the application interface, use the IDL GUIBuilder, then regenerate the file. When you regenerate the widget code, the file is overwritten.

Note
When you save both files, IDL puts the RESOLVE_ROUTINE procedure in the generated widget code. The procedure contains the name of the related *_eventcb.pro event-handler file so that it will be compiled and loaded with when you run the widget code.

Notes on Generating Code a Second Time

When you modify an interface and save the *.prc file, it is overwritten, which should not be a problem. If you decide to change your interface, however, you will need to regenerate the widget code and thus overwrite the *.pro widget code file.

Note that if you regenerate either of the *.pro files, they are overwritten. When writing code, you should modify only the generated event-handling file (*_eventcb.pro). You should never modify the generated widget code (the *.pro file). This allows you to change the interface and regenerate the definition code without losing modifications in that file. This should simplify the procedures you need to take to update or change an interface.

Because it is modular, the event-handler code is simple to modify after you change the interface definitions. When you regenerate the IDL source code files, any new event handler code is appended to the end of the file.


Home | Categories | Alphabetical | Classes | All Contents | [ < ] | [ > ]