Menu ▾ ▴

GettingStarted

Anonymous

Getting Started

  • Rename the uisdk.exe executable to the desired process name. We will use the example myapplication.exe
  • Rename the uisdk.html, uisdk.css, and uisdk.js files to myapplication.html, myapplication.css, and myapplication.js respectively.
  • Edit your myapplication.html file and rename the files in the tag to match your file names above.
  • Edit the logic in the myapplication.js file as needed to make your application work.
  • Edit the body of myapplication.html and css files to match your UI design.

On-disk applications versus cloud-based applications

The application html and supporting scripts/stylesheets can be located on disk or on a web server.
If an html file with the same name as the executable is not found in the same folder as the executable, the resource-embedded URL will be used to load the HTML file and its contents from an HTTP location. This is especially useful for single-exe install wizards, so that all code can reside on a web server.

On-disk Ajax versus cloud-based Ajax

If ajaxing-in html content stored locally, use the wbc.readTextFile() function rather than prototype's Ajax classes. This is because prototype's Ajax classes are designed only for HTTP-based AJAX.
Calls into wbc that use local disk paths should not be prefixed with "FILE://".

Debugging

Debugging is disabled by default. To enable debugging, have a script debugger installed locally (such as MS visual studio 2011 or newer) and launch the application executable with the /ENABLEDEBUGGING command-line switch.

Child Windows

Child windows work almost identically to the main application window, except they do not need a process name to match the window html. Instead they are invoked using the child window functions (see the function reference below).

Encrypting HTML and JS

For security, the application can load only encrypted HTML and JS. However, these must first be encrypted at build time, using a build script based on your component. Save the file using the saveEncryptedTextFile... function and it will automatically be compatible at load time. Script files must be loaded via evale(scriptText), or evalf(scriptPath)
If the executable finds a suitable encrypted myapplication.ecf (encrypted content file) on disk, it will attempt to decrypt and load it.

Note that this is first decrypted into the temp folder, then loaded (and immediately deleted). A new base href is injected into the HTML HEAD tag, so if you use this tag you may experience a conflict.

Errors and exceptions

The API calls have been extensively tested to avoid exceptions. Error handling is, however, robust. Calls from JS will often only return ERROR.


Related

Wiki: Home