Category Archives: Uncategorized

A Scrollable Grid With Headers, part 1

Recently, I discovered XUL trees will let you select individual
cells with a single attribute, seltype="cell":

treecell-select.png

This gave me a few ideas – most notably about my regular expression grid,
which takes up an awful lot of space on the screen. If I could use the tree
to simulate a smaller grid, preferably with scrollbars, I could use much less
real estate. After a quick newsgroup posting, Mark Finkle and Neil Deakin
set me straight – the grid was probably better and more flexible.

Still, trees do one thing grids don’t – they have a fixed header
row. You can scroll the main body all you want – the header row will stay
where it is. Doing the same for a grid was impossible – but if I combined
three grids into a single XBL binding…

grid-navigable.png

Note this demo won’t fully work without Mozilla Firefox 3.1 beta 2. (It
might work on earlier 3.1 builds, but this was the base.) I combined the
scrollable content object model with a healthy dose of CSS styling and new
bindings. In Firefox 3.0.6, it will partially render, but the headers won’t appear.

This opens up a number of possibilities for new widgets. From the
newsgroup:

  • Menulist editor: Label, value, description
  • Entity localizations: Entity name, English, other language
  • Regular Expression testing grid
  • A menu list containing namespace URI-prefix pairs
  • A spreadsheet with header rows & columns
  • Logic grid puzzles

With all this said, I think I need your help. Although I wrote this as a general-purpose binding, I hardly think it’s ready for adding to the XUL toolkit. This is proof of concept code, and it has a few shortcomings:

  • Navigation by cells – not by rows or by columns. (Suppose you want to select a whole row? I didn’t implement that.)
  • No specification. No rules on how it’s supposed to behave other than, “Does it look right when I move it?”
  • No tests. I wouldn’t want to check this into Mozilla without some regression tests to make sure it works.
  • Performance. In loading the test page, I noticed today that my more recent changes causes the CPU to spike for a couple seconds. That’s bad, and I don’t know where the bug is.
  • The accessibility people will probably want to add some useful support roles.
  • Selecting a cell throws off the header rows’ & columns’ scrolling.
  • A really bad binding name: gridbox. It was the best I could come up with.

I filed bug 477446 for this. I’d like to see if anyone’s interested in working on this binding, cleaning it up, writing tests for it, and generally making it Toolkit-ready. I think it’s potentially very useful.

Comments are open!

Gecko 1.9.1, TraceMonkey and Venkman?

I admit, I’m pretty blown away by the TraceMonkey announcement. I’m envious. I’m still trying to get my company onto Mozilla Firefox 3 code…

That said, one of the biggest questions with JIT compilation of JavaScript that I’ve had for months is, “How are we going to debug JavaScript now?”.

It probably doesn’t help that Venkman didn’t make it into hg.mozilla.org. I think that was intentional, and I don’t dispute it. Still, with Gijs Kruitbosch on vacation, there’s not a lot of people to maintain Venkman (we’ve been down this road before).

Perhaps the right answer with TraceMonkey is to let Venkman die.

Note that I don’t suggest this lightly. Venkman nearly died once with 1.9, and has been on life support for years anyway. With Mozilla 2 breaking backwards compatibility in interfaces – and Venkman left in the dust, not even having automated tests for it (any tests at all?) – by the time we get around to bringing it up to 1.9.1, we may find it simply cannot work with TraceMonkey.

So I’d like to start a general discussion on what sort of JavaScript debugging tools we can craft for Mozilla 2.0. I really, really do care about this – without a good JS debugger, I may be dead in the water for a lot of what I do. (If I’m forced to use and learn DTrace for debugging JavaScript, I’d really like to apply it to a XUL app that can do the work for me.)

Comments are open. Please serious commentary only, not “I want this feature!”. I’m trying to find (and join, and participate in!) a group of people who can spend the time on researching & implementing a solution.

Symbolic gestures: Adventures in MinGW Mozilla, Part Four

Well, I’m just about stumped now. I can crash in Mozilla courtesy of bug 265736, but apparently when I do, I get a stack with no symbols. This means I have no information loaded on what lines of code the stack points to.
I’ve tried six different ways to get gdb to grab these symbols, and without success. I’ve even tried getting a couple IDE’s, and am just on a wild goose chase.
Anyone have suggestions? Has anyone else ever debugged a crash in a MinGW-built Mozilla?

GMail advertising Firefox?

gmailffox.gif

Anyone know who these guys are?
I’ve looked at the source code, and it looks like they simply put the Firefox website in an iframe.
UPDATE: Judging by the consensus, most people seem to think it’s harmless. I think I inadvertently gave Netiviti more points at SpreadFirefox than they fairly deserve, because so many people looked into it… so I’ll probably ask a SpreadFirefox staff member to invalidate the numbers for the next two or three days for Netiviti. Just to be fair to other players in this game.

Of all the stupid ways to break a build…

A few weeks ago, my Linux operating system stopped talking to the Internet. So I made sure I could download the code via Windows (CygWin is so nice), and then copy it over. Right?
Well, not exactly. When I started building, the build would die hours later with a message, “No rule to make target ‘README’. Stop.” (This was under /xpfe/bootstrap/init.d .)
Someone told me to comment that out, and when I did that, I got the same error message for ‘LICENSE’.
This morning I ran the ‘gmake -d -f Makefile’ command from the init.d directory. It listed a bunch of things it looked for: ‘README’, ‘README.h’, ‘README.cpp’, etc. It didn’t find the README file… because somehow it got copied over as ‘readme’. (Lowercase letters.)
Fixed that for ‘README’ and ‘LICENSE’, and now I can successfully complete a build. I can’t access the Internet from home now (remember, I’m looking for a job), but I can develop and am developing several little tools and the Abacus MathML editor. If I keep up the current pace, I should have the editor, version 0.1, within about a week.
On another note, remember the Mozilla Runtime Engine idea? (I know, they’ve sometimes called it Gecko Runtime Engine, but…) Here’s what it really is.