amplesdk icon indicating copy to clipboard operation
amplesdk copied to clipboard

Discussion: XUL referencing - body, page, window

Open h6w opened this issue 13 years ago • 5 comments

As I understand it, in a XUL app in Firefox, each page or window would be a separate file. Creating a window dynamically would result in the window or page being referenced by id. Every file in a folder is automatically imported.

In Ample, however, we have to have a "root" by which we reference the containing pages and load them using scripts. Ample's root is "body" in one sense, but "body" isn't technically in the XUL namespace and layout at this level is unclear and can cause miscalculations and things being incorrectly hidden, shown, or placed. You can't, for example, add windows to "body" dynamically. Whereas adding a window to a page is technically incorrect according to XUL's reference implementation and tutorials. Ample's behaviour in this regard is correct, however it means this needs to be solved in some way that makes sense, particularly differentiating XUL that was preloaded as opposed to ones that are dynamically created.

h6w avatar Dec 18 '12 02:12 h6w

Since XUL in Ample (in most of the cases) features having a full-screen main window (xul:page) plus some additional windows, that may be regarded as popup windows, I'd suggest to add them to xul:popupset.

AmicaNoctis avatar Dec 18 '12 08:12 AmicaNoctis

Thanks for the suggestion.

I tried it, but it doesn't seem to work:

http://pastebin.com/Rx83aRVP

image

According to https://developer.mozilla.org/en-US/docs/XUL/popupset , popupset is a "container for menupopup, panel, and tooltip elements."

h6w avatar Jan 02 '13 07:01 h6w

H6w,

sorry for being unclear in the first place. My suggestion didn't mean "try to do it that way", but rather "I would vote for it to be implemented that way". I am aware that popupset is actually a slightly different thing according to the specs, but xul:window in Ample also is. Technically it is just a popup panel resembling the L'n'F of a window.

Amica

AmicaNoctis avatar Jan 02 '13 11:01 AmicaNoctis

oic! Well, I'd like to keep to the tutorials as closely as possible. Either some sort of autoloading or placement at the same level as the page element would be my preference. I'm trying to make it as close to the original as possible for ease of porting existing XUL apps.

h6w avatar Jan 02 '13 11:01 h6w

This is also a good point!

AmicaNoctis avatar Jan 02 '13 11:01 AmicaNoctis