XML
  Home arrow XML arrow Page 3 - Back to XUL: Introduction and Preparation
Dev Articles Forums 
ADO.NET  
Apache  
ASP  
ASP.NET  
C#  
C++  
ColdFusion  
COM/COM+  
Delphi-Kylix  
Design Usability  
Development Cycles  
DHTML  
Embedded Tools  
Flash  
Graphic Design  
HTML  
IIS  
Interviews  
Java  
JavaScript  
MySQL  
Oracle  
Photoshop  
PHP  
Reviews  
Ruby-on-Rails  
SQL  
SQL Server  
Style Sheets  
VB.Net  
Visual Basic  
Web Authoring  
Web Services  
Web Standards  
XML  
Dedicated Servers  
Moblin 
JMSL Numerical Library 
IBM® developerWorks 
Sun Developer Network 
Weekly Newsletter
 
Developer Updates  
Free Website Content 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us Get Paid 
Request Media Kit
Contact Us 
Site Map 
Privacy Policy 
Support 
 USERNAME
 
 PASSWORD
 
 
  >>> SIGN UP!  
  Lost Password? 
XML

Back to XUL: Introduction and Preparation
By: Dan Wellman
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 5 stars5 stars5 stars5 stars5 stars / 4
    2006-01-16

    Table of Contents:
  • Back to XUL: Introduction and Preparation
  • Creating applications with XUL
  • Setting up your system for running XUL applications
  • More setup information

  • Rate this Article: Poor Best 
      ADD THIS ARTICLE TO:
      Del.ici.ous Digg
      Blink Simpy
      Google Spurl
      Y! MyWeb Furl
    Email Me Similar Content When Posted
    Add Developer Shed Article Feed To Your Site
    Email Article To Friend
    Print Version Of Article
    PDF Version Of Article
     
     
    ADVERTISEMENT


    Back to XUL: Introduction and Preparation - Setting up your system for running XUL applications


    (Page 3 of 4 )

    As I mentioned above, there are two ways in which XUL applications can be run. One is within Mozilla, in the same way that a web page would be displayed in the main content window.  The second way allows standalone applications to be executed using the command line; the application will then appear in its own independent window, but as the splash-screen shows when you run it, it will still be powered by Mozilla. 

    Neither option is any easier or harder to construct, as the code used within each is the same.  When creating programs designed to run within Mozilla, however, Mozilla itself kind of takes over as the main application and any keyboard shortcuts for menus in your application won’t work.  For example, if you create a File menu with the standard Alt + F keyboard shortcut, when you press Alt + F, Mozilla’s file menu will open instead of your own.  To avoid this and other subtle pitfalls, we will run the application within its own window.

    This makes setting up your system for XUL a little more complicated because you have to add a system environment variable telling your computer what to do when XUL files are executed. Clearly, Mozilla needs to be installed on your system in order to follow this tutorial. I am using the latest version of the browser; at the time of writing that is version 1.7.12, on Windows XP Pro SP2.

    Once installed, go to your Control Panel and open the System applet.  Once the System dialog box opens, select the Advanced tab and hit the Environment Variables button.  When the Environment Variables dialog box opens, find the Path variable and add the following line of code to the end of it:

    ;C:\Program Files\mozilla.org\Mozilla

    Once this has been done (and your files have been registered of course), you can launch your application with the following command:

    Mozilla –chrome chrome://nameofyourapp/content

    You can create a XUL folder at this point on your C: drive to store the files that are going to be created in order to make the application work.  Now create an application folder within that called XULEditLite, and then in that folder create a locale, skin and content folder:

     

    The content folder is going to be used to store the main XUL and script file(s).  The skin file is where button icons, other graphics, and style sheets separate from the main ones are kept.  The skins are segregated into their own directory to make it easier for people to add their own themes to your application.  Additionally, most developers now separate their applications in this way to provide a presentation layer separate from the main application layer, so that’s exactly what you should do too.  Finally, the locale folder is used to store DTDs that contain the labels and other text strings from the labels used in your application; within this folder, you should also create a folder called en-US.

    More XML Articles
    More By Dan Wellman


       · Hey everybody,Hope you have as much fun as I did creating this fully functional...
     

    XML ARTICLES

    - Datatypes and More in RELAX NG
    - Providing Options in RELAX NG
    - An Introduction to RELAX NG
    - Path, Predicates, and XQuery
    - Using Predicates with XQuery
    - Navigating Input Documents Using Paths
    - XML Basics
    - Introduction to XPath
    - Simple Web Syndication with RSS 2.0
    - Java UI Design with an IDE
    - UI Design with Java and XML Toolkits
    - Displaying ADO Retrieved Data with XML Islan...
    - Widget Walkthrough
    - Introduction to Widgets
    - The Why and How of XML Data Islands







    © 2003-2008 by Developer Shed. All rights reserved. DS Cluster 2 hosted by Hostway