You can export object definitions to Unicode text files. The text files contain all the information that defines the objects. The files are virtually identical syntactically to the source forms that are stored in libraries for all objects.
You might want to export object definitions in the following situations:
You want to store the objects as text files
You want to move objects to another computer as text files
Caution The primary use of the Export feature is exporting source code, not modifying the source. You can use the Source editor to modify the source code of an object directly, but modifying source in a text file is not recommended for most users. See “Using the Source editor”.
To export entries to text files:
Select the Library entries you want to export.
You can select multiple entries in the List view.
Do one of the following:
Select Export from the pop-up menu
Click the Export button on the PainterBar
Select Entry>Library Item>Export from the menu bar
The Export Library Entry dialog box displays, showing the name of the first entry selected for export in the File Name box and the name of the current directory. The current directory is the target’s directory or the last directory you selected for saving exported entries or saving a file using the File editor.
PocketBuilder appends the file extension .srx, where x represents the object type.
Specify the file name and directory for the export file. Do not change the file extension from the one that PocketBuilder appended.
Click OK.
PocketBuilder converts the entry to Unicode file format, stores it with the specified name, then displays the next entry you selected for export.
If a file already exists with the same name, PocketBuilder displays a message asking whether you want to replace the file. If you say no, you can change the name of the file and then export it, skip the file, or cancel the export of the current file and any selected files that have not been exported.
Repeat steps 3 and 4 until you have processed all the selected entries.
If the Library painter is set to display files, you can see the saved files and double-click them to open them in the File editor.
You can import source files for PocketBuilder objects to a library in the current workspace. The files you import can be in either ANSI or Unicode format. You select the files you want to import from the Select Import Files dialog box.
Figure 4-6: The Select Import Files dialog box
To import text files to library entries:
In the System Tree or Library painter, select the library into which you want to import an object.
Select Import from the pop-up menu, or, in the Library painter only, click the Import button on the PainterBar.
The Select Import Files dialog box displays, showing the current directory and a list of files with the extension .sr* in that directory. The current directory is the target’s directory or the last directory you selected for saving exported entries or saving a file using the File editor.
Select the files you want to import. Use Shift+Click or Ctrl+Click to select multiple files.
Click Open.
PocketBuilder converts the specified text files to PocketBuilder format, regenerates (recompiles) the objects, stores the entries in the specified library, and updates the entries' timestamps.
If a library entry with the same name already exists, PocketBuilder replaces it with the imported entry.