Personal tools
You are here: Home cmgui Wiki Beginners of mozCmgui
Views
FrontPage >> Sallys notes >>

Beginners of mozCmgui

last edited 5 years ago by sche155

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"/

Contributing to this site

Please add to the wiki any relevant information that you think might be useful to other users of this website. For example, you might like to contribute your experiences, questions and answers.

You are encouraged to contribute to this site regardless of your level of experience. Contributions are welcomed from new and regular visitors.

If you ask a question and receive an answer from a developer you should record it in the wiki. This information is extremely useful and can help other users overcome the same problem.

See how to add and edit pages for more information.