MacBook, defective by design banner

title:
Put the knife down and take a green herb, dude.


descrip:

One feller's views on the state of everyday computer science & its application (and now, OTHER STUFF) who isn't rich enough to shell out for www.myfreakinfirst-andlast-name.com

Using 89% of the same design the blog had in 2001.

FOR ENTERTAINMENT PURPOSES ONLY!!!
Back-up your data and, when you bike, always wear white.

As an Amazon Associate, I earn from qualifying purchases. Affiliate links in green.

x

MarkUpDown is the best Markdown editor for professionals on Windows 10.

It includes two-pane live preview, in-app uploads to imgur for image hosting, and MultiMarkdown table support.

Features you won't find anywhere else include...

You've wasted more than $15 of your time looking for a great Markdown editor.

Stop looking. MarkUpDown is the app you're looking for.

Learn more or head over to the 'Store now!

Monday, October 31, 2022

Amazingly (or perhaps not), Firefox (macOS 106.0.1 (64-bit)) slammed me back to using Google as its  toolbar search engine. I had been using DuckDuckGo for years.

Luckily Firefox had a pop-up telling me as much, actually bragging about it, so I knew to set it back. But I did test it once before swapping, and this was not a drill. The update to Firefox wasn't showing me the wrong dialog; it had slammed me back to Google.

/sigh

Profiteering weirds the internet.

Labels: , ,


posted by ruffin at 10/31/2022 09:09:00 AM
Wednesday, June 29, 2016

This page about Firefox claims:

Location-Aware Browsing is always opt-in in Firefox. No location information is ever sent without your permission. [emphasis mine, of course]

text quoted in page context

That's so not Scottish, it's crap.

In case you think I'm overstating, or screwed something up, here's my full Firefox history (full disclosure: I've erased about 12 pages between "Internet for people, not profit" and the Yahoo search for AAA that'd tell you what bank I use):

pretty simple firefox history -- intro, Mozilla, aaa search, bam

I can tell you, I haven't opted in to giving out my location everywhere in those pages.

And when we check about:config, it's turned on anyhow.

about.config in firefox says geo.enabled is true

Explain that, Mr. Mozilla Privacy is Job 1.

(In other news, AAA still uses WebObjects.)


EDIT: Run the EFF's Panopticlick page now. I always kinda wondered about this (if you get all my browser metadata, you'll kinda know who I am, won't you?), but it's scary to see it in practice.

Even worse is learning about this canvas fingerprinting, which is a much more specifically identifying source of metadata that I had no clue existed. /sigh

They know exactly who you are.

Labels: , , ,


posted by ruffin at 6/29/2016 10:27:00 PM
Tuesday, April 19, 2016

Sometimes, code smell comes from your documentation:

In some case, the browser will keep suggesting autocompletion values even if the autocomplete attribute is set to off. This unexpected behavior can be quite puzzling for developers. The trick to really force the no-completion is to assign a random string to the attribute like so:

autocomplete="nope"

Since this random value is not a valid one, the browser will give up.

Giving invalid data until "the browser will give up" is a best practice, is it? Whew, that smells. I love the, "The trick is to really force" line. "Really force"?

"Hey, Firefox, remember when I told you to turn off autocomplete? It's just an informal request. If I want you to really honor it, I'll really force you to."

/sigh

Protip for Mozilla: Firefox form autocomplete is broken. I don't really care if it follows standards; most users and nearly every web developer will tell you its behavior is broken.

I hate to see [sic] it, but it looks like Firefox usage may be down over 12% over 2015. It was my favorite browser to use for dev and home. I think the trend is pretty clear: There are now only three browsers. Edge/IE on Windows, Safari on iOS (and OS X, if you count it), and Chrome.

Labels: ,


posted by ruffin at 4/19/2016 10:56:00 AM
Monday, March 02, 2015

I've heard of "slamming" in the context of a company changing a phone customer's long distance company without their explicit consent. The switch from Google to Yahoo as the default search engine for Firefox seems to have happened in a similar way. Figured I'd post this screenshot (I may have already; sorry) before I forget I've taken it. I believe I have another from home that shows Yahoo in the search box as the new provider. or at least different behavior when you're not using Yahoo. I don't recall.

As I've mentioned before, there's no way Yahoo's gains in Firefox search sticks. It took me one search to get disgusted and swap back. I imagine others will have the same reaction with a little less immediacy. No offense, Yahoo, but Google has search down cold, as long as Superfish hasn't infected your box[1]. Better results, huh? By what metric is that measured? I don't even dislike Yahoo. I just don't think it's cool to slam users who are happy with whatever search provider they selected already.

I will back down just a touch (as I may have mentioned before) if this only happens if you never swapped search providers. My iMac at home and my work box are pretty new, and I don't recall if my MacBook or Lenovo acted slammed or not (I've flirted with Bing on both a few times over the years). But if Firefox swapped *everyone* to Yahoo, not just those who'd been using Google because it was the default, well, that's unavoidably a slam.

Anyhow, now with image. Yay.

[1] RLY Lenovo? I'm still getting over that idiotic move.

Labels: ,


posted by ruffin at 3/02/2015 04:48:00 PM
Tuesday, February 03, 2015

From StatCounter as recounted by Gruber:

Interesting results from Yahooโ€™s deal to serve as the default web search for Firefox:

StatCounter has also run a special report on US search engine usage by Firefox users only. Yahoo-on-Firefox usage in the US increased from 9.9% in November 2014 to 28.3% in January. Over the same period Google-on-Firefox usage in the US fell from 81.9% to 63.9%.

There's no way that lasts. I wonder what percentage is permanent.

Firefox hijacked my search bar at some point in the recent past, and after trying a single search, I was setting Google as the default search engine, peeved at the audacity of the sinking Mozilla ship to change my setting without asking. Maybe on that box I'd never swapped from Google as my default, but I certainly have played around with Bing on other Firefox installs and quickly gone back to Google.

Other folks will probably go more than a single search before getting upset enough to learn how to swap their engine, but eventually they'll notice Yahoo ain't as good as what they had before, and ask their tech-savvy friends to swap them back.

I hope. Man, can you believe it if 19% of Firefox users, already probably a slightly above-the-mean group of techies, just don't care, and figure the default search engine is always good enough?

More telling is probably, if Firefox hijacked everyone like they did me, that over 70% of Firefox users immediately swapped back to Google.

Labels: , ,


posted by ruffin at 2/03/2015 07:01:00 PM
Thursday, February 13, 2014

It appears Firefox is going to have what are, for now, non-intrusive ads that fill up your "frequently visited" tabs on an empty page with some adverts until you visit enough sites, as if those were helpful suggestions.

There's a painful irony in reading this shortly after DaringFireball linked to a post from a former RealNetworks employee explaining how adware was forcefully driving RealNetworks' business:

My manager then said, โ€œMore than half the company would have to lose their job in order for us to stop these tactics โ€ฆ so are you volunteering to be one of them?โ€

That was the day I learned Iโ€™d rather lose respectfully than win without honor. Once people become wary of your products or your business ethics, itโ€™s game over. You canโ€™t sustain for long, because you wonโ€™t keep your customers much longer.

I understand making money from having Google as your default search engine.  That's an easy win-win.  Google seems to offer the best (and if not the best, no worse than top two, and you'll have to pick who the other is) search engine, folks enjoy the simplicity of a search box/unified search bar, and you might as well pocket the cash for giving the bar to them.

But don't try to link this new ad grab to the search bar, as if Google was going to stop paying, which the originally linked news item about Firefox's new ads does:

Mozilla is heavily reliant on income from search royalties from Google, and has been for some time, so this would seem to be an exploration of other financial options โ€“ with possibly more alternative revenue streams to come?

That stream simply isn't drying up.  How much do you think Bing would pay to be on Firefox?  Everything I can tell from the rumors surrounding Microsoft now that they have a new CEO suggests that they're going to be less Windows-first-and-Windows-only than they have been in the past.  And it's not like Bing was a stranger to search bars before now either.

There's plenty of revenue to keep Mozilla afloat without becoming the next RealNetworks, and only so many places where you can put ads without becoming intrusive.  And hopefully only so many times you can insert ads before someone starts building Firefox without them.  See Banshee, the crossplatform iTunes replacement -- there's been a small tempest about how its affiliate fees for music purchased through its UI at Amazon get rerouted on different Linux distros.  It's not that hard to "re-monetize" software.

We've been happy to give Firefox a few dollars to provide us with better functions. If you want more cash, innovate with new functions, dang it.  Or you might be surprised how quickly your users' goodwill dries up when you start demanding more tribute.

Labels: , ,


posted by ruffin at 2/13/2014 08:05:00 AM
Monday, January 13, 2014

Firefox world loses Web dev guru to Chrome | Deep Tech - CNET News:

Dion Almaer, who had worked on developer tools at Mozilla earlier in his career, noted the significance of [the lead Firebug programmer in 2011, John J.] Barton's new job in a blog post today.

"Firebug used to be the way you debugged your sites, but that is changed," Almaer said. "It is too early to claim that Firebug is zombied, but all eyes will be on that...especially as we see other browser tools continue to blossom."
I'm often a "if it's not broken, don't fix it" kind of guy (not a huge limitation, since my threshold for entering "broken" state is horribly low), and have been using Firebug as my first-line tester for years.  I mean, heck, my code has to work in Firefox, so at worst, I'm only losing time that Firebug is worse than Chrome's tools (and that Firefox is slower than Chrome).  That is, code has to work somewhere first.  Why not Firefox?

But recently, I've heard too many good things from Chrome-first guys about Chrome's tools, have noticed that our app works insanely quicker in Chrome than Firefox, and am getting a little tired of seeing the "Warning: Enabling the Script panel causes a Firefox slow-down due to a platform bug. This will be fixed with the next major Firefox and Firebug versions," error at the top of my Firebug console.  I usually use Chrome when hitting our production testing server, and thought maybe it was time to test it as my dev choice instead.

(And, honestly, I had some trouble with Chrome keeping its cache clean/empty when I last tried -- even when set to no cache, it would occasionally cache jive, which made it much too easy to waste time testing there.)

When Googling how to transition from Firebug to Chrome's tools, I ran across the above post.  That's kinda strange -- I haven't felt Firebug was horrible, though I think I've seen a native Firefox equivalent pop up sometimes when I hit the "right wrong" key combination.

Anyhow, this is just to say I need to catch up with the state of browser debugging.  Firebug is great, but it's probably past time to come up for air and see if the transition cost to something else isn't worth it.

Labels: , ,


posted by ruffin at 1/13/2014 10:58:00 AM
Friday, August 23, 2013

Gosh, I'm an idiot.


Would have been nice to notice that button ("Show Command Line Popup") on the Script tab, well, YEARS AGO.

Labels: ,


posted by ruffin at 8/23/2013 09:35:00 AM
Monday, August 06, 2012

WebKit Isn't Breaking the Web. You Are | Webmonkey | Wired.com:

We at Webmonkey hope itโ€™s obvious that building WebKit-only sites is a waste of time. If youโ€™re only interested in iOS users then take a tip from Instagram and build a native app.


Let's just quickly say that's crazy advice, and it misses the point of Glazman's critique.

If you don't know Objective-C, by all means, leverage what you do know if it'll make a strong HTML5 app for mobile devices. Use PhoneGap. Enjoy. No guilt required. Seriously, if you can't code HTML5 for other browsers you need to learn to code Obj-C in Xcode? Insane and inane.

The point is that those who use HTML5 shouldn't use browser-specific prefixes. Not sure how I feel about that either. If one browser (or rendering engine) is so far in front of another, then it's going to "win" the adoption war. Examples are written with webkit prefixes, they're copy and pasted, seem to work okay for their intended browser, and we're done. It's a non-trivial expense to learn that webkit isn't a standard if you're a gunslinger. (I'm not arguing we should be gunslingers, but that browsers should realize they exist. LOTS of them.)

If the other browsers support those CSS standards with their own prefixes (and with standardized ones), it's a heck of a lot easier to have the browsers support the different models than every programmer. Any time you're asking a programmer to write something twice to do things right (really, I'm pretty tired of if (document.getElementById) { branch1 } else...), you're doing it wrong. Get the cheese off of your face. Normalize. Put the logic where it belongs.

To be clear: In this case, it means Firefox needs to get over itself and chase WebKit. IE might follow. Do we care?

It's an ivory tower versus the market issue. You can't control programmers absolutely. I, in theory, like where Glazman is going. And in practice, just mentioning it will lessen the issue. Let's just stop pretending it's a zero-effort change for programmers to write platform neutral code and, therefore, as long as browsers are less than 100% equal, you'll always have a percentage of the code in the wild that supports one over the other.

Degrade? Sure. Write to treat each version of each browser equally? Impossible. [sic]

Labels: , , ,


posted by ruffin at 8/06/2012 09:02:00 AM
Wednesday, June 13, 2012

Firefox Disable / Hide New Tab Page:

HowTo: Turn this feature off completely

In the Location bar, type about:config and press Enter:
about:config
The about:config "This might void your warranty!" warning page may appear. Click I'll be careful, I promise!, to continue to the about:config page. Type browser.newtab.url in the search box:
browser.newtab.url

Thank you.

Labels: ,


posted by ruffin at 6/13/2012 01:43:00 PM
Wednesday, June 06, 2012



Okay, do we think that was an accidental/cutesy inclusion of a Diablo ordering page on the Top Sites explanation page or a paid advertisement? My kneejerk was the former, and about 5 seconds later I started thinking the latter.

Labels: , ,


posted by ruffin at 6/06/2012 10:28:00 AM
Thursday, April 07, 2011

If you use the Add-On Manager to create the foundation to your Firefox extension, you might see that your description is literally "description" even though you've got a different value in <em:description> in your install.rdf file.

You've probably got this line in overlay.properties:
extensions.zoteroplay@genreacrossborders.org.description=description
(where zoteroplay@genreacrossborders.org will be the id of your own extension)

That'll do it. /sigh The property "covers up" your longer description in install.rdf. Erase that line and your other description will show up.

Labels: , , ,


posted by ruffin at 4/07/2011 07:13:00 PM

More fun code! Note today's new lessons -- the OM for tree items, rows, children, and cells; the use of CDATA for encapsulating javascript in XUL files, which are picky XML files, especially when you use a <; and slightly more situation-specific code.

   1 <?xml version="1.0"?>
2 <?xml-stylesheet href="chrome://global/skin/" type"text/css" ?>
3 <!DOCTYPE page SYSTEM "chrome://zoteroplay/locale/overlay.dtd">
4 <page id="zoteroplaySidebar" title="&zoteroplaySidebar.label;"
5 xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
6
7
8
9 <script src="ff-sidebar.js"/>
10 <script>
11 <![CDATA[
12 function hello() {
13 alert('Hello from ff-sidebar.xul!!');
14 }
15 function OnTreeDoubleClick(event) {
16 alert('doubleclick');
17 var objTree = document.getElementById('myTree');
18 var iIndex =
19 objTree.treeBoxObject.getRowAt(event.clientX,event.clientY);
20 alert(iIndex);
21 }
22
23 function addSource(bIsNewSource) {
24 // note that this is hard-coded to grab from the tree we make,
25 // using XUL, not javascript, below. The only reason I'm doing
26 // this (instead of having it passed in as a function
27 // parameter) is so that we don't have to navigate some DOM
28 // from another file to call this function. Just call from
29 // overlay.js or whatever and forget about sidebar refs.
30 var rootChild = null;
31 if (bIsNewSource) {
32 rootChild = document.getElementById("newRoot");
33 } else {
34 rootChild = document.getElementById("dupeRoot");
35 }
36
37
38
39 //========================================
40 // Create the parent row.
41 //========================================
42 // Now we're going to create a new TreeItem, which will also
43 // be a container for nested items.
44 // itemSourceHeader will have two items, one the field we're
45 // using to distinguish it (like Title, if it's got one) and
46 // the second is the value ("Moby-Dick; or, The Whale")
47
48 var itemSourceParent = document.createElement("treeitem");
49 itemSourceParent.setAttribute("container","true");
50 // create a new row with two cells for the new
51 // item, which will be attached to the rootChild.
52 var rowSourceHeader = document.createElement("treerow");
53
54 var cellField = document.createElement("treecell");
55 cellField.setAttribute("label","Title:");
56
57 var cellFieldValue = document.createElement("treecell");
58 cellFieldValue
59 .setAttribute("label","Moby-Dick; or, The Whale");
60
61 rowSourceHeader.appendChild(cellField);
62 rowSourceHeader.appendChild(cellFieldValue);
63 // attach the header values for this item (now in a treerow) to
64 // the item that'll hold it. That is, the source (like a
65 // book) parent has some title information to display.
66 itemSourceParent.appendChild(rowSourceHeader);
67
68
69
70 //========================================
71 // Now we create the nested row.
72 //========================================
73 var parentNested = document.createElement("treechildren");
74
75 // soon we'll put in actual value from an array
76 // rather than this dummy loop; this is just to
77 // show how to have more than one "child".
78 for (var j=1;j<=10;j++) {
79 var itemNested = document.createElement("treeitem");
80 var rowNested = document.createElement("treerow");
81 var cellNest1 = document.createElement("treecell");
82 cellNest1.setAttribute("label","Author:");
83
84 var cellNest2 = document.createElement("treecell");
85 cellNest2.setAttribute("label","Herman Melville");
86
87 rowNested.appendChild(cellNest1);
88 rowNested.appendChild(cellNest2);
89
90
91 itemNested.appendChild(rowNested);
92 parentNested.appendChild(itemNested);
93 }
94 // attach the detailed source information to
95 // the parent item.
96 itemSourceParent.appendChild(parentNested);
97
98
99 //========================================
100 // Now we add the parent item of all the
101 // source's detailed information to the
102 // root child of the tree.
103 //========================================
104 rootChild.appendChild(itemSourceParent);
105 }
106
107
108 ]]>
109 </script>
110
111
112
113 <vbox flex="1">
114 <label value="&zoteroplaySidebar.label;" />
115 <!-- put your GUI here -->
116
117
118 <tree ondblclick="OnTreeDoubleClick(event);" id="myTree" flex="1">
119 <treecols>
120 <treecol id="firstname" label="Field" flex="5"
121 primary="true"/>
122 <treecol id="lastname" label="Field Value" flex="5"/>
123 </treecols>
124
125 <treechildren>
126 <treeitem container="true" open="true">
127 <treerow>
128 <treecell label="Possible New Sources"/>
129 </treerow>
130 <treechildren id="newRoot">
131 </treechildren>
132
133 </treeitem>
134 <treeitem container="true" open="true">
135 <treerow>
136 <treecell
137 label="Likely Duplicate Sources"/>
138 </treerow>
139 <treechildren id="dupeRoot">
140 <treeitem>
141 <treerow>
142 <treecell
143 label="Title:"/>
144 <treecell
145 label="Already Got It"/>
146 </treerow>
147 </treeitem>
148
149 </treechildren>
150
151 </treeitem>
152 </treechildren>
153 </tree>
154 </vbox>
155 </page>
156


So this ends up looking like the following (after rows have been added to new and dupe sources several times):



It may also be useful to note that I made the sidebar open up apparently about as wide as Firefox is going to let it with this code in ff-sidebar.js:

   1 var mainWindow = null;
2
3 function startup() {
4 mainWindow = window.QueryInterface(Components.interfaces.nsIInterfaceRequestor)
5 .getInterface(Components.interfaces.nsIWebNavigation)
6 .QueryInterface(Components.interfaces.nsIDocShellTreeItem)
7 .rootTreeItem
8 .QueryInterface(Components.interfaces.nsIInterfaceRequestor)
9 .getInterface(Components.interfaces.nsIDOMWindow);
10
11 // this spacebar needs a lot of space to display the info
12 // we're going to put there. Give it at least 400 pixels out of the box.
13 // TODO: I'm setting a check to see if it's already 400, but it seems there's
14 // an absolute max width for sidebars in Firefox by default which is less than
15 // (or about) 400.
16 if (mainWindow.document.getElementById("sidebar-box").width < 400) {
17 mainWindow.document.getElementById("sidebar-box").width = 400;
18 }
19 // Sidebar is loaded and mainwindow is ready
20 }
21
22 function shutdown() {
23 // Sidebar is unloading
24 }
25
26 window.addEventListener("load", startup, false);
27 window.addEventListener("unload", shutdown, false);
28

Labels: , , ,


posted by ruffin at 4/07/2011 01:18:00 PM
Tuesday, April 05, 2011

I hate to say that I'm not real impressed with the state of tutorials on building Firefox extensions, in part because that seems to imply some sort of incompetence of my own as a coder. I mean, come on, thousands of folks are building and releasing these danged things. It's obviously not rocket science.

But the bottom line is that much of the extension building process is still left in trial and error land where it could easily be put into tutorials. Lots of folk are banging their heads, as far as I can tell, on the same stuff, and there just isn't a large enough community to put all those individual lessons learned together for the collective to benefit from.

Anyhow, so I've struggled today with how to build and then programmatically access a sidebar made in XUL for a Firefox extension. I want to populate it with the results of a Zotero database installed within the same Firefox instance, but before I do that, I just want to be able to 1.) display the sidebar 2.) display a tree in the sidebar and 3.) add rows with information from my "main" javascript file that's sent over to the sidebar.

Here's some fun.

The best XUL and Firefox extension building code probably comes from Add-on Builder. Slap in your description, etc, and select it all. It'll create a toolbar, button for your main toolbar, a menu item in tools, even a context-menu (the one that's typically displayed when you right-click a web-page displayed in Firefox) for you. Voila. Perfect. 90% done.



Then we learn most of the important stuff from this thread at Mozillazine.

I pasted this into ff-sidebar.xul based mostly off of the info at the above link:

   1 <?xml version="1.0"?>
2 <?xml-stylesheet href="chrome://global/skin/" type"text/css" ?>
3 <!DOCTYPE page SYSTEM "chrome://zoteroplay/locale/overlay.dtd">
4 <page id="zoteroplaySidebar" title="&zoteroplaySidebar.label;"
5 xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
6 <script src="ff-sidebar.js"/>
7 <script>
8 function hello() {
9 alert('Hello from ff-sidebar.xul!!');
10 }
11 function OnTreeDoubleClick(event) {
12 alert('doubleclick');
13 var objTree = document.getElementById('myTree');
14 var iIndex = objTree.treeBoxObject.getRowAt(event.clientX,event.clientY);
15 alert(iIndex);
16 }
17
18 function addRowMaybe() {
19 var oRootTreeChild = document.getElementById("children_root");
20 var oItem = document.createElement("treeitem");
21 var oRow = document.createElement("treerow");
22
23 var oCell = document.createElement("treecell");
24 oCell.setAttribute("label","Dynamic item");
25 oRow.appendChild(oCell);
26 oItem.appendChild(oRow);
27 oRootTreeChild.appendChild(oItem);
28 }
29
30 </script>
31
32 <vbox flex="1">
33 <label value="&zoteroplaySidebar.label;" />
34 <!-- put your GUI here -->
35
36
37 <tree ondblclick="OnTreeDoubleClick(event);" id="myTree" flex="1">
38 <treecols>
39 <treecol id="firstname" label="First Name" primary="true" flex="3"/>
40 <treecol id="lastname" label="Last Name" flex="7"/>
41 </treecols>
42
43 <treechildren id="children_root">
44 <treeitem container="true" open="true">
45 <treerow>
46 <treecell label="Guys"/>
47 </treerow>
48
49 <treechildren>
50 <treeitem>
51 <treerow>
52 <treecell label="Bob"/>
53 <treecell label="Carpenter"/>
54 </treerow>
55 </treeitem>
56 <treeitem>
57 <treerow>
58 <treecell label="Jerry"/>
59 <treecell label="Hodge"/>
60 </treerow>
61 </treeitem>
62 </treechildren>
63 </treeitem>
64 </treechildren>
65 </tree>
66
67
68 </vbox>
69 </page>
70


So that gets us a sidebar with a tree in it. To see it, you load up the extension that you've built (we're assuming you already know how to unzip an xpi and hack the files in it to install later -- or to have Firefox change live), and use code like this in your "main" javascript file (overlay.js in the Add-On Builder code) to call the functions in the sidebar. So one place would be to slap what's below into onToolbarButtonCommand in overlay.js to make the magic happen.

   1 // Get the sidebar that's currently displayed in the browser.
2 var sidebarWindow = document.getElementById("sidebar").contentWindow;
3
4 // Verify that your sidebar is open at this moment:
5 alert(sidebarWindow.location.href); // probably important to realize
6 // that if there's no sidebar being displayed, you'll get the
7 // URL of the open window instead of a sidebar chrome value.
8
9 if ("chrome://zoteroplay/content/ff-sidebar.xul" == sidebarWindow.location.href) {
10 // call "yourNotificationFunction" in the sidebar's context:
11 sidebarWindow.hello(); // this row calls a plain jane funct
12 sidebarWindow.addRowMaybe(); // this calls the funct that adds a row
13 }


So now we can access a javascript function inside of the sidebar code and have it add a row programmatically. Of course, the trick is that we're using that "children_root" id in the treechildren element, which really speeds things up and simplifies what we're doing. Now, honestly, the best way to add programmatic rows/rows at run time would be to write a Custom Tree View that has the info I want sitting in a giant array or something silly like that. With enough children (that is, I'm going to be displaying books with authors, titles, publishers, etc), this'll get downright messy, and I might end up cheating and using another control from the XUL periodic table (Note: That periodic table link doesn't work in Firefox 4+ without installing an extension that re-allows Remote XUL (this one should do it, I think); I'm using Camino to view the chart for now).



Ah, sweet proof of concept success.

But that's the start. And I thought I'd left behind the craptasticness of model building when I took a Java break. No such luck.

Labels: , , , ,


posted by ruffin at 4/05/2011 05:19:00 PM

<< Older | Newer >>


Support freedom
All posts can be accessed here:


Just the last year o' posts:

URLs I want to remember:
* Atari 2600 programming on your Mac
* joel on software (tip pt)
* Professional links: resume, github, paltry StackOverflow * Regular Expression Introduction (copy)
* The hex editor whose name I forget
* JSONLint to pretty-ify JSON
* Using CommonDialog in VB 6 * Free zip utils
* git repo mapped drive setup * Regex Tester
* Read the bits about the zone * Find column in sql server db by name
* Giant ASCII Textifier in Stick Figures (in Ivrit) * Quick intro to Javascript
* Don't [over-]sweat "micro-optimization" * Parsing str's in VB6
* .ToString("yyyy-MM-dd HH:mm:ss.fff", CultureInfo.InvariantCulture); (src) * Break on a Lenovo T430: Fn+Alt+B
email if ya gotta, RSS if ya wanna RSS, (?_?), ยข, & ? if you're keypadless


Powered by Blogger etree.org Curmudgeon Gamer badge
The postings on this site are [usually] my own and do not necessarily reflect the views of any employer, past or present, or other entity.