XML
  Home arrow XML arrow Page 4 - An Introduction to XUL Part 4
FaxWave - Free Trial.
Dev Shed Forums 
Administration  
Apache  
BrainDump  
DHTML  
Flash  
Java  
JavaScript  
Multimedia  
MySQL  
Oracle  
Perl  
PHP  
Practices  
Python  
Reviews  
Security  
Style-Sheets  
Web Services  
XML  
Zend  
Zope  
Forums Sitemap 
IBM® developerWorks 
Dedicated Servers 
E-Commerce Hosting 
Linux Web Hosting 
Managed Hosting 
Small Business Hosting 
Download TestComplete 
VPS Hosting 
Weekly Newsletter

 
Developer Updates  
Free Website Content 
IBM Rational Software Development Conference
 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

An Introduction to XUL Part 4
By: Dan Wellman
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 4 stars4 stars4 stars4 stars4 stars / 7
    2005-06-13

    Table of Contents:
  • An Introduction to XUL Part 4
  • Using the RDF/XML Syntax
  • Creating the Wizard
  • Adding to the installed-chrome.txt file

  • 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

    Virtual Tradeshows by Ziff Davis Enterprise - A Unique Opportunity to Connect with IT Experts, Access Information, and Gain Insight on today's Technology

    An Introduction to XUL Part 4 - Adding to the installed-chrome.txt file
    (Page 4 of 4 )

    So that’s the RDF file, and the wizard file is in place, but before the wizard can be accessed via chrome, you still need to add some code to another file -- the installed-chrome.txt file. This file lives in the default install directory of Mozilla. Open it up and add the location of your XUL file to the bottom (for clarity, the path to mine is C:/XUL/Chrome/mywizard.xul)

    content,install,url,file:///C|/XUL/chrome/

    You must add a hard return after this.  Now save the installed-chrome file, and from the same folder (the Mozilla chrome folder), delete the file called contents.rdf. Open Mozilla, and this file will be regenerated.  Open this file in a text editor, and you should be able to find the name of XUL wizard you have just created in there. To access your wizard, in the Mozilla address bar, type the following URL:

    chrome://yourfilenamehere/content/

    When the cancel or finish buttons are clicked Mozilla will close; this isn’t because you’re doing something wrong, but because the wizard is not being opened from another XUL window. Also, there is no functionality behind this example wizard that would pass any values back to a calling window. 

    Looking at the wizard through Mozilla, you might also agree that the example code in the wizard is a little difficult to distinguish from the narrative text of the wizard.  I mentioned in the first article that XUL is compatible with CSS, so what you might want to do is create the following CSS file:

    .codetext {

      font-weight:bold;
      font-size:12pt;
      text-indent:20pt;
      background-color:#5B7693;
      padding:10pt;

    }

    I have called mine dansStyle.css but feel free to call it whatever you like. Save it in the same directory as your XUL and RDF files and add a stylesheet reference to the top of the wizard file:

    <?xml-stylesheet href="dansStyle.css" type="text/css"?>

    This needs to appear directly after the XML declaration.  Once that is in place, simply add a class="codetext" attribute to each of the opening description tags that enclose a CDATA element. Run the wizard once more and see your code highlighted, emboldened and indented to facilitate easy distinguishing of the example code.  

    Wizards are often used to capture more complex input from a user than a simple yes or no (when a dialog window would be more appropriate).  Form controls can be placed inside wizards so that if, for example, a menu item was selected, the user could be guided through a series of questions or options. Once these questions had been answered, or the options selected, the results would be passed back to the window that the menu item that originally prompted the wizard resides in. In these cases, Mozilla would remain open. 

    The next article will look at the creation of dialog boxes and discuss some of the more complex issues of these types of windows, such as opening or saving dialog boxes.


    DISCLAIMER: The content provided in this article is not warranted or guaranteed by Developer Shed, Inc. The content provided is intended for entertainment and/or educational purposes in order to introduce to the reader key ideas, concepts, and/or product reviews. As such it is incumbent upon the reader to employ real-world tactics for security and implementation of best practices. We are not liable for any negative consequences that may result from implementing any information covered in our articles or tutorials. If this is a hardware review, it is not recommended to open and/or modify your hardware.

       · I have a question about wizard.Everything works fine if you just move through the...
       · Hi,I'm not sure that the wizard has this functionality, maybe using a set of...
     

       

    XML ARTICLES

    - How to Set Up Podcasting and Vodcasting
    - Creating an RSS Reader Application
    - Building an RSS File
    - An Introduction to XUL Part 6
    - An Introduction to XUL Part 5
    - An Introduction to XUL Part 4
    - An Introduction to XUL Part 3
    - An Introduction to XUL Part 2
    - An Introduction to XUL Part 1
    - XML Matters: Practical XML Data Design and M...
    - Practical XML Data Design and Manipulation f...
    - SimpleXML
    - XForms Basics, Part 3
    - XForms Basics, Part 2
    - XForms Basics




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