Personal tools
You are here: Home / cmgui / Wiki / Beginners of mozCmgui
Navigation
Log in


Forgot your password?
 

Beginners of mozCmgui

mozCmgui requires 3 different types of files:

  1. XUL file - this describes the layout of the webpage, including the windows, buttons, checkboxes etc. It links to the functions in the JS file to display various features.
  2. JS file (Java script) - this contains all the functions the XUL file will call.
  3. Cmgui files, such as the .com file, exnode and exelem files. In my eye example, it requires the texture files as well. Basically the files read in the .com file.

Notes:

  • Sometimes there is this error in JavaScript Console when nothing loads,

    "Error: uncaught exception: A script from http://cmiss.bioeng.auckland.ac.nz was denied UniversalXPConnect privileges."

    This is because you forget to go to about:config in your browser, and turn "signed.applets.codebase_principal_support" to TRUE. This should be done when you install mozCmgui, but sometimes when you update the browser, you will need to do this again.

  • Whenever you add new files to the folder so the main .com file can read and use them in the web, you must also add the file names in .js file under "var files = [ .....exnode, .....exelem .... etc "

    The error tells you it is in the line "window.commandData.executeCommand("open comfile memory:/eye.com exec;");

  • It was suggested that we add " mozCmguiRunSafe(function(){ .... });" in front of sceneViewer. , window.commandData.executeCommand( ... ) , window.sceneViewer... etc, this encourages and hopefully allows the webpage to be viewable in Firefox in Windows.

Commands

These are a few commands I had used to display the eye model in the webpage, these are used in the .xul file.

  • hbox - horizontal box
  • vbox - vertical box
  • checkbox - check features on and off (can check multiple ones)
  • radio id - choose one feature at one time only
  • button id - buttons, no idication if checked
  • caption label= "eyes"/
  • label value = "colour"/