XSdk Assistant System

alpha version, October 2000

The task of creation new projects is made as easy as possible in the XSdk. Actually, the XSdk system contains a quite generic "application generator", which can prepare the project skeleton based on programmer's needs. For expressing those needs easy-to-use and intuitive GUI assistant panels are used. That is why there is currently not a support for the assistant system for a command-line based XSdk releases (we shall add it to future XSdk versions, so as all the ports offer equal services).

Therefore, you would seldom use some of the example projects as a template, for making a new one is in most cases more convenient.

Contents

Generic Assistant Frame

All the assistants use a common panel with a number of standard tools. It looks more or less like this:

GenericAssistant

From the top left corner to the right and bottom, there are the following controls:

The template system

Firstly it should be pointed out that you do not need to know the template system: quite the contrary, it is designed to serve you through the GUI panels, as simple and intuitive way as possible. Therefore, unless you really want to know how the template system is implemented, you do not need to read the rest of this document!

There are two reasons we document the template system at all:

Information placement

Almost all the template-relevant information is placed in each project type's Resources folder, inside its AssistantTemplates subfolder.

A few information with project-wide scope is also put into the standard project type's Info.table (which lays directly in the Resources folder).

The placement of the project types themselves depends on the host operating environment. Of the currently supported ones,

Info.table contents

Currently the only entry of the Info.table relevant for the template system is a list of default UID values. There is an array value in the Info.table for key "XSdkUIDSetting". The array must contain exactly three items, corresponding to the UID1, UID2, and UID3. The available values are:

For example, for a bundle project type the array is defined this way:

XSdkUIDSetting = (268435577,"Interface ID","0,Vendor ID");

ensuring that the bundle (ie. polymorphic interface DLL)'s UID1 will be a fixed number 268435577, for the UID2 will be automatically allocated a free temporary UID (editable later as an "Interface ID", and the UID3 will be initialized to zero, but editable later as a "Vendor ID". The UID2 will be stored in the XSdk UID datbase, whilst the UID3 will not.

AssistantTemplates contents

The generic structure of the AssitantTemplates folder is quite straighforward: it contains one subfolder for each available template. Each subfolder therefore will have one item in the template type pop-up list in the panel frame (see above).

No other files or folders are allowed in the AssitantTemplate folder. In cas you do need to store something there, name the file or folder with a leading dot--it will be ignored.

Template contents

Each template subfolder of the AssitantTemplates folder can contain the following files and folders:

Assistant.nib

The NIB must contain one view, bound to a File's Owner property named assistantView. Supposedly, the view will be something like NSBox (it is placed into a scroll view, so there is no need to implement scrolling there), containing all the customization controls. There can be any number of other controls; they are ignored (but will be properly shown).

Note: there will be soon a support for a bundle with code to be associated with the view.

Each customization control must have a name. It is assigned to it using its tooltip: when a tooltip has a contents "<x>#<y>", the <x> string becomes the true tooltip (it can be empty), and the <y> string is the customization control name.

The value for the name is determined automatically due to the class of the customization control:

For a class......is used a value
NSMatrixthe tag of the selected cell
NSPopUpButtonthe tag of the selected menu item
NSButton1 in case the button's state differs from zero, 0 otherwise
NSTextField or NSTextViewthe string contents of the object

A dictionary of the combinations <name, value> is stored into the project using the key "XSdkAssistandDefaults". All the defaults set in all the superprojects are available for a subproject.

<<<more detailed description forthcoming>>>

File templates

<<<forthcoming: conditional !if/!else/!endif, using the customization names and values from the Assitant.nib>>>

OtherKeys.plist

<<<forthcoming>>>

If any of the three UIDs was not set by the OtherKeys, the default values from the Info.table are used automatically.

Copyright © 1999-2000 X.soft, all rights reserved