|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
VERY important XUL issue with mozilla 1.6
Hello xml folks:
I have been working on an XUL example program from the o'reilly text called xFly. I wrote the RDF files and the XUL files and made my entries in installed-chrome.txt and it works great with mozilla 1.0.1 but I can only get it to run in 1.6 if I open it with File->Open from the browser -- this is not cool! Here's the xul file: Code:
<?xml version="1.0"?>
<?xml-stylesheet href="chrome://global/skin" type="text/css"?>
<?xml-stylesheet href="chrome://xfly/skin" type="text/css"?>
<!DOCTYPE window SYSTEM "chrome://xfly/locale/xfly.dtd">
<window
title="Hello xFly"
id="xFlyMain"
xmlns:html="http://www.w3.org/1999/xhtml"
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
width="500"
height="515"
onload="centerWindowOnScreen()">
<script type="application/x-javascript"
src="chrome://global/content/dialogOverlay.js" />
<script type="application/x-javascript"
src="chrome://xfly/content/xfly.js" />
<menubar id="appbar">
<menu label="File">
<menupopup>
<menuitem label="New" />
<menuitem label="Open" />
</menupopup>
</menu>
<menu label="Edit">
<menupopup>
<menuitem label="Cut" />
<menuitem label="Paste" />
</menupopup>
</menu>
<menu label="Build Interfaces" />
</menubar>
<toolbox>
<toolbar id="fixed-toolbar" class="toolbar-primary"
tbautostretch="always" persistent="collapsed">
<toolbarbutton id="newfileBtn" label="New" oncommand="alert('menu option Browse');" />
<toolbarseparator />
<toolbarbutton id="openfileBtn" label="Open" oncommand="alert('menu option Build Interfaces');" />
<spacer flex="1" />
</toolbar>
</toolbox>
<textbox id="multiFlyInput" value="Fly Name" multiline="true" rows="2" />
<textbox id="dialog.input" type="autocomplete"
searchSessions="history" timeout="50" maxrows="6"
disablehistory="false"
oninput="doEnabling();">
<menupopup id="ubhist-popup" class="autocomplete-history-popup"
popupalign="topleft" popupanchor="bottomleft"
onpopupshowing="createUBHistoryMenu(event.target);"
oncommand="useUBHistoryItem(event.target);"/>
</textbox>
<description>
Bla bla bla I hope this works!
</description>
<vbox align="left" id="vb">
<label id="xlabel"
value="Hello, welcome to the xFly" />
<image src="http://books.mozdev.org/xfly.gif" />
<button label="hello xFly" oncommand="greet();" />
</vbox>
</window>
|
|
#2
|
|||
|
|||
|
And here's the RDF manifest files:
content: Code:
<?xml version="1.0"?>
<RDF:RDF xmlns:RDF="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:chrome="http://www.mozilla.org/rdf/chrome#">
<!--list all of the packages being supplied-->
<RDF:Seq about="urn:mozilla:package:root">
<RDF:li resource="urn:mozilla:package:xfly"/>
</RDF:Seq>
<!--package information-->
<RDF:Description about="urn:mozilla:package:xfly"
chrome:displayName="xFly"
chrome:author="xfly.mozdev.org"
chrome:name="xFly">
</RDF:Description>
</RDF:RDF>
|
|
#3
|
|||
|
|||
|
skin:
[code} <?xml version="1.0"?> <RDF:RDF xmlns:RDF="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:chrome="http://www.mozilla.org/rdf/chrome#"> <RDF:Seq about="urn:mozilla:skin:root"> <RDF:li resource="urn:mozilla:skin:classic/1.0" /> </RDF:Seq> <RDF escription about="urn:mozilla:skin:classic/1.0"><chrome ackages><RDF:Seq about="urn:mozilla:skin:classic/1.0 ackages"><RDF:li resource="urn:mozilla:skin:classic/1.0:xfly"/> </RDF:Seq> </chrome ackages></RDF escription></RDF:RDF> [/code] |
|
#4
|
|||
|
|||
|
the dtd's RDF:
Code:
<?xml version="1.0"?>
<RDF:RDF xmlns:RDF="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:chrome="http://www.mozilla.org/rdf/chrome#">
<RDF:Seq about="urn:mozila:locale:root">
<RDF:li resource="urn:mozilla:locale:en-US" />
</RDF:Seq>
<!--locale information-->
<RDF:Description about="urn:mozilla:locale:en-US"
chrome:displayName="English(US)"
chrome:author="xfly.mozdev.org"
chrome:name="en-US"
chrome:previewURL="http://www.mozilla.org/locales/en-US.gif">
<chrome:packages>
<RDF:Seq about="urn:mozilla:locale:en-US:packages">
<RDF:li resource="urn:mozilla:locale:en-US:xfly"/>
</RDF:Seq>
</chrome:packages>
</RDF: Description>
</RDF: RDF>
the DTD itself: Code:
<!ENTITY label.val 'Hello, Welcome to the xFly ' > <!ENTITY btn.lbl 'Hello xFly ' > the CSS file itself: Code:
#xlabel { font-weight: bold; }
window { background-color: white;}
and the script file: Code:
function greet() {
alert('Hello World');
}
|
![]() |
| Viewing: Dev Shed Forums > Programming Languages - More > XML Programming > VERY important XUL issue with mozilla 1.6 |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|