One thing I keep noticing in the extensions I’m writing is that I really have to make sure to use “this”. In javascript methods, variables with file scope and methods defined elsewhere in the file need a this “dot” before them in order to work. Otherwise, error console reacts just as if the method or variable name didn’t exist at all.
whats up with this?
September 28, 2008 by xuldannew sub tasks
June 29, 2008 by xuldanstarted reading: http://developer.mozilla.org/en/docs/XUL_Tutorial:Manifest_Files
decided on a new set of subtasks of the first task in the last post (todo: add numbering system)
aa. find chrome directory
ab. add manifest file to chrome directory (contains absolute path names)
ac. create xul file for (sub task) template (for priviledged xul code)
ad. compare directory structure from xul tutorial on mdc with example firefox extension code/extension developer’s extension/etc.
New Project
June 29, 2008 by xuldanBack to start project.
The back to start firefox extension will take a firefox window back to the first page visited after opening.
Tasks:
a. Create simple extension template
b. find place in overlay.xul to add button to firefox toolbar
c. find javascript to read firefox history for individual page (that which appears on the drop down arrow on the back button)
d. create code to navigate back to that position.
(e. ideally there might be some method to mark this position in the history and/or drop down)
f. document – includes method for pasting code into wordpress in a form which is more easily retrievable than that in previous posts in this blog.
question 3
June 18, 2008 by xuldanMy motivation for writing a simple xul file was to practice the basics of XUL. I haven’t had need to work much yet on interface elements, I have been reusing firefox extension code from other projects. It would be great to come up with a XUL only project to continue this exploration, to learn about buttons and textfields and more about labels. Perhaps that is the direction in which I shall go after answering these questions. More likely, however, I expect I will begin to explore existing XUL, javascript and even java combinations that are packaged (in fact jar’ed) into firefox extensions, often under open source licenses. From there, I can hopefully create some interesting and useful mini projects that extend firefox while also teaching myself XUL and “XUL accessories” in the background..
I also want to keep practicing my writing
I might repeat things. I might be vague. But this blog is my space to unwind after hours of difficult thought and solving difficult problems.
No egos here, only XUL (and XUL accessories..)
question 2
June 13, 2008 by xuldananswer: just load the xul file, using “open file” in firefox.
there are other ways. “There can be only one” appears in xul files? why? there is really a better way to run xul files and there is a lot of packaging to consider and also: firefox extension developers extension has a way to preview xul. But, I find that preview strange, as I never seem to be able to close the window or get back to the xul editor when I use it.
question 1
June 13, 2008 by xuldananswer: the html in the xul label doesn’t really do anything…
interesting contrast to the Java JLabel.
which begs the question(s): why? and
how? (do I get formatting in my xul labels..)
how to xul
June 10, 2008 by xuldanHad to do non xul work at work today. So, time for some after XUL:
decided to modify an example from that tutorial (see last time):
<window
id=”hello-window”
title=”Helloooo”
orient=”horizontal”
xmlns=”http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul”>
<!– Other elements go here –>
<label> <b> like <i> html! </i> </b> </label>
</window>
quiz:
question1: what doesn’t work?
question2: how do you “run” this file?
question3: why do this at all?
question4: are there answers to these questions?
question5: what did work?
answer4: yes! I’m planning to answer these in my next post. But first, some logic. In fact, this XUL break was also procrastination from some volunteer work that was supposed to follow right on after the wasabi jelly toast dinner I enjoyed on returning home this evening.
XUL, I never knew ye
June 9, 2008 by xuldanI’ve been finding the whole package structure for XUL applications to be feeling a bit heavyweight over the last few days. So, I clicked on over to a XUL tutorial earlier this evening to get some perspective.
Soon, I found myself rushing forward through pages and pages of familiar configuration information. I’m very happy to see this is here, as it should be very useful to me soon. Yet, I already know how to put together simple firefox extensions — the easy way! So far, I have generally been starting with sample code related to whatever functionality I am interested in. Its not hard from there to quickly prototype and sketch broadly some of the code paths I can’t wait to see evolve or need for experimental and research purposes at work. I remain loathe to jump back into the details of “minimal extensions” and the exact meaning of the pieces of XUL applications just right now. For over a year my browser cheerfully displayed “hi dan!” in the lower right corner after I ran through a simple tutorial and first learned those details. Many a XUL file and many an extension ran along side my simple extension and widened my perspective and enriched my experiences during that time. But, “hi dan!”, remained just that.
In recent weeks and months, I have followed the “hack some functionality” approach with a great deal of success to learn the capabilities of javascript and java embedded within firefox and/or exposed to the interface through XUL and the wonderful XUL application/Firefox add-on functionality. At times, I’ve also shuddered to think about the consequences and possibilities in terms of overloading the computational capability, muddying the interface or defanging the wonderful security features of the vanilla firefox that I have so much enjoyed using for over 5 years now.
And I kept peeking occasionally at XUL files themselves. A few days ago, I finally began to read again about the specifics of their capabilities. There is much to read and much to try. Furthermore, the full realization and impact of the fact that firefox itself is written in XUL has finally begun to dawn on me.
Though I expect to program rather (apparently to the UI surfacte) lightweight XUL applications for some time in the foreseeable future, if not forever, the possibilities in terms of understanding the browser itself and its tendrils of connection that reach in such a neighborly manner to the outside world every day on every one of the millions and millions of firefox browsers everywhere.. well, I think those possibilities will begin to inform my actions and my lines of codes and inspire me to a new kind of programming. It appears that XUL is now part of my destiny.
So, I must apologize to XUL for a shameful neglect over the last c years, where c is some number greater than 2…:
XUL, I never knew ye! I hereby pledge that it shall not be so from hereon in.
hello xul
June 9, 2008 by xuldanHello world.
I’ve recently taken a plunge into the world of XUL programming for work. Blogging seems like a natural way to decompress and reflect in the evenings and weekends. It also should provide a great structure for filling in some of the gaps in my XUL knowledge over the next few months. I have a feeling that XUL is here to stay for awhile; also i’m getting that Java sort of feeling from XUL that makes me feel like I might stick with XUL as well.
hope you enjoy reading about my adventures in the land of XUL
dan