TypeDefinition contains the prefixed information sets required to run Nexacro and Nexacro Studio. The TypeDefinition file is an actual object that is edited and utilized to run a project. You can add, delete and modify items through the TypeDefinition editors, which take the form of dialogue boxes. The TypeDefinition file is formatted in XML.
To open the pop-up TypeDefinition editors, locate the submenu of TypeDefinition in the Project Explorer first. Then, double-click each item. Otherwise, open a context menu by right-clicking each item and select [Edit].
Objects
The Objects editor manages the libraries used to run Nexacro as well as objects used in a Form.
Edit modules
You must enter a module's name, and the name should be unique. Registered module files are managed with relative paths that are determined according to the location specified at "Base Lib Path" in [Tools > Options]. If a specified module file does not exist, the editing process will be aborted with an alert message popping up.
Change order
Order matters when registering modules, which are loaded before an application. As modules are interdependent, loading a project developed by Nexacro Studio may fail if modules are not registered in the correct order. Accordingly, click the Up/Down button if you want to change the order.
View file source
Selecting a module and clicking the "Show Json" button will display the relevant file code by opening a separate window. The presented code is read-only.
List of objects
Description | |
---|---|
ID | This value is essential and unique. |
ClassName | This value is essential and unique. |
Image | The image is used as the object's icon displayed on the toolbar. |
Width | These are the width and height values that will apply when you do not specify any values. That is, these values will apply when you create a component in the Form by mouse clicking rather than dragging. |
Height | |
PrefixID | This value is used to name the ID of a created object. Object IDs consist of PrefixIDs and following double digit numbers in ascending order. (eg. [PrefixID]+"00", [PrefixID]+"01"...) |
The DefaultWidth and DefaultHeight values are meaningless to invisible objects such as a Dataset.
If you enter an invalid value for the Width, Height item, it is treated as 0.
For components that can be placed on the design screen, even if you set the value of the component's Width, Height item to 0 in the TypeDefinition, when you place the component, the value of the width, height property is treated as 100 for screen design convenience.
The default list only includes the frequently-used objects. If you want to add another object, expand the object list of the ComComp, Grid or DeviceAPI module, select the object you want to add and then click the plus (+) button at the end.
Object refactoring
Nexacro Studio will automatically perform code refactoring when object IDs in TypeDefinition are changed. The tool will search the current file and automatically make proper changes in relevant object IDs.
If you change the ID of a button object from Button to Button2, Nexacro Studio will search the entire project, find all the Forms that use Button and list them. If you click the [Rename] button thereafter, the Studio will rename all the found IDs and then open the all the relevant Forms to let you determine whether to save the changes.
PrefixID
You can designate a prefix for naming an ID of each component or other object. For instance, if you designate "Btn" as the PrefixID for Button components, the ID of a Button component will begin with "Btn" (eg. "Btn00") when it is created.
Services
Access the Services tab for managing service definitions, and the folder path or Internet URL.
Use the Add and Delete button to add new services or delete selected services.
The order of items registered in the User Service can be changed by dragging and dropping the icon displayed in front of the item.
Edit services
You must enter the values of PrefixID, Type, and URL. A Prefix ID value must be unique.
Column | Description | |
---|---|---|
Default | PrefixID | PrefixID of Service |
Type | Service Type | |
URL | Url of the Service | |
CacheLevel | Whether and what type of caching to use | |
Version | Service version information | |
Communication version | Communication version information | |
Extension | Include Sub-directory | Whether to display the subdirectory of the URL if the type is "form", "file" or "js". For theme and imagerc and extlib in Resource Service, this option defaults to "true", which is unchangeable. |
FileExtension | List of the extensions of the files that can be managed in the service (This function is applicable when the service type is file. example: js;txt;xfdl,xml) | |
ServiceList | Used when Type is bs, metadata | |
DataSchema | Enabled if Type is bs, metadata. model | |
Search Column | Enabled if Type is metadata You can designate a column that will be searched when you search for a certain date piece through the metadata dialog. If unspecified, all columns will be searched. Commas (,) or semicolons (;) can be used as dividers. |
If you set the Include Sub-directory option to "true" for a certain service, [New Folder] will be activated in the context menu opened from the relevant service in the Project Explorer.
The below table presents the file extensions supported for each type.
Type | File extension |
---|---|
none | nothing |
form | *.xfdl, *.xjs, *.js |
js | *.js, *.xjs |
file | *.* |
JSP | nothing |
ASP | nothing |
SAP | nothing |
bs | XML |
metadata | XML |
model | *.xmodel |
The below table shows which editor will be launched when you double-click a certain file in the Project Explorer.
Editor | File extension |
---|---|
ADL Editor | *xadl |
FDL Editor | *.xfdl |
Theme Editor | When a theme is double-clicked |
Script Editor | *.js, *.xjs |
XML Editor | *.xml |
XCSS Editor | *.xcss |
Image Viewer | *.bmp, *.jpg, *.jpeg, *.gif, *.png, *.jfif, *.tif, *.tiff, *.svg |
Text Editor | *.txt, *.html, *.jsp, *.asp, *.json, *.css |
If there is no matching editor for a selected file, an alert will pop up, asking you whether you want to open the file with the Text Editor.
Service refactoring
Nexacro Studio will automatically perform code refactoring when you change the PrefixID or URL of a service registered in the TypeDefinition. Code refactoring refers to the process of applying changes automatically.
ProtocolAdaptors
The Protocols editor is designed to register protocol adapters. Nexacro does not convert data for processing. It uses the standard Hypertext Transfer Protocol (HTTP) to deal with requests and responses. Depending on user environments,. however, you may need to convert or encrypt data for transaction.
A protocol adapter is a tool that connects different data structures. You can develop desired features easily through simple settings.
Editing protocols
You can add protocols and apply them differently according to execution environments. You can determine the type of protocol to apply by entering information on modules or classes.
New Protocol Wizard
You can add a new protocol in TypeDefinition through New Protocol Wizard. There are two ways to start the wizard.
In the Project Explorer, right-click TypeDefinition and access [Add > Protocol]
In the Project Explorer, right-click Protocols under TypeDefinition and select Add Protocol.
Take either way you like in order to add a protocol.
Item | Description |
---|---|
Protocol ID | Protocol ID, which is also used as a service URL ([Protocol ID]://) |
PrefixID | Service prefix ID |
Type | This indicates the type of a service. You can select either JSP or ASP. |
You can select the type of systems to which the protocol will apply. Click the checkbox of a system you want select, and then enter necessary information in relation to the system.
Item | Description | |
---|---|---|
Windows | ModuleName | This is the name of a binary module. Nexacro registers a DLL file with a module name (module name.dll) after finding it in the target path. A module name will be added to start.json. |
TargetPath | This is the path from which the binary module is obtained. A target path will be added to start.json. | |
Windows > Update | File | Name of a module file (same with the information registered in [TypeDefinition > Updates]) |
TargetPath | Path where the module file is updated in the device | |
Version | Version of the module file | |
macOS | ModuleName | Name of a module file for macOS |
TargetPath | This is the location from which Nexacro finds the module before registering it. | |
macOS > Update | File | Name of a module file (same with the information registered in [TypeDefinition > Updates]) |
TargetPath | Path where the module file is updated in the device | |
Version | Version of the module file |
Item | Description | |
---|---|---|
HTML5 | Classname | This is the class name of a protocol used in the HTML5 environment. The class name will be registered to the registerclass array of environment.xml.js and the protocol will be loaded with other components. |
Android | Classname | This is the class name of a protocol used in the Android environment. The protocol ID and class name will be registered to the start_android.json file. |
iOS | Classname | This is the class name of a protocol used in the iOS environment. The protocol ID and class name will be registered to the start_ios.json file. |
DeviceAdaptors
You can configure a DeviceAdaptor module once you install it.
Description | |
---|---|
Adaptor ID | This is the ID of the module. You can change it when you install the module. |
ClassName | This is the class name of the module. You cannot change the value. |
Configuration | This is a list of the properties of the module. You can set the values of the properties. |
You can obtain device information by using an adaptor ID in a script.
var voicerecognition = nexacro.getEnvironment().getDeviceAdaptor("VoiceRecognition");