-
Archives
- February 2010
- October 2009
- April 2009
- March 2009
- February 2009
- January 2009
- December 2008
- November 2008
- October 2008
- September 2008
- August 2008
- July 2008
- May 2008
- April 2008
- March 2008
- February 2008
- January 2008
- November 2007
- October 2007
- September 2007
- July 2007
- June 2007
- May 2007
- April 2007
- March 2007
- February 2007
- January 2007
- December 2006
- November 2006
- October 2006
- September 2006
- August 2006
- July 2006
- June 2006
- May 2006
- April 2006
- March 2006
- February 2006
- January 2006
- December 2005
- November 2005
- October 2005
- September 2005
- August 2005
- July 2005
- June 2005
- May 2005
- April 2005
- March 2005
- February 2005
- January 2005
- December 2004
- November 2004
- October 2004
- September 2004
- August 2004
- July 2004
- June 2004
- May 2004
- April 2004
- March 2004
- February 2004
-
Meta
Daily Archives: July 22, 2005
Keep your Nasty to Yourself
Not so much insomnia tonight as a deadline to meet. So here it is almost 3:30 in the morning and I’m watching last Thursday’s Late Night with Conan O’Brien. He’s got Alec Baldwin on doing sort of a cameo, and they’re doing the “In the Year 2000″ bit, which I was thinking as it came on about how weird it is that I remember not only when the bit was timely (ie, pre-2000) but that I remember when Conan was new to late-night and a little pathetic (or so he would have had us believe — muwhahahahahaaaa). So but anyway, they’re alternating predictions for the year 2000, and Baldwin just predicted that atheists would win a landmark case in which saying “God bless you” when somebody sneezes is outlawed and in which it’s ruled that one should instead say “Yo, Zippy, you just sprayed me with some nasty.” Cracks me up.
Even as a curmudgeonly liberal-media-conspiring atheist, I think that’s pretty darned funny, though I fully expect the trigger-hair American Atheists to issue a press release (or actually, if I had been watching this when it was new a week ago, I would have expected them to issue a press release) about this blatant discrimination against atheists. Continue reading
Changes to XUL’s getCellText() params
I learned after about an hour of puzzlement tonight that the parameters for XUL’s nsITreeView::getCellText() have changed. Formerly, you passed a numeric id corresponding to the row in a tree as the first parameter and a string matching the id attribute of the desired column as the second. This provokes errors in recent versions of Gecko because the function now expects an nsITreeColumn as the second parameter.
A couple of nice people (db48x and gavin) on #developers at irc.mozilla.org pointed me to some docs that helped me unpuzzle myself. First, the idl file for nsITreeview, which clued me in to the fact that the second parameter is no longer a string. Second, a link to a mailing list posting about the change.
Basically, the change was implemented in order to do away with the necessity to give treecols an id. By generalizing the function a bit to expect an nsITreeColumn, Gecko can now figure out which column to use in a number of ways. For example:
tree.columns.getColumnFor(treeColElement);
tree.columns.getNamedColumn(treeColID);
tree.columns.getColumnAt(index);
In my recent case, I knew the column name, so I passed tree.columns.getNamedColumn(‘identifier’) rather than just ‘identifier’ to the getCellText() function and it worked like a charm.
I post this pretty much for my own later reference. Continue reading