Table of Contents

Articles Posted During June 2003

tweaking the test suite

I just finished reworking the templates for my CSS filter tests to compensate for a bug in Netscape 4.x (*gasp*) that was causing that browser to render the text in the ID selector test correctly, even though it doesn't understand the syntax element#id. It turns out that NN4.x doesn't actually ignore that construct, it simply parses it incorrectly, treating it as if it were element #id (a descendant selector). This happened to match the #test-div I'd originally been using because it was contained within another DIV. Go figure.

I worked around this by changing the target element to a SPAN throughout the test suite. So, the new test document demonstrates correctly that the ID selector can be used to hide rules from Netscape 4.x.

Really, given the number of alternative methods that don't have such caveats, I was tempted to remove that technique altogether. In the end, though, I realized that wouldn't be cool.

2003-06-20 00:40:58

bbscp

I often need to make trivial edits on files, and because BBEdit doesn't support SSH, I find myself jumping over to the Terminal to move them to the live site. I'm sure there are other, more robust solutions using CVS, but here's a quick & dirty AppleScript to upload BBEdit's current file to a remote server via scp:


tell application "BBEdit"
   activate
   get file of first text document
   set lpath to POSIX path of result
   display dialog "Remote Host:" default answer "example.com"
   set dialogInfo to result
   set rhost to text returned of dialogInfo
   display dialog "Remote Path:" default answer ""
   set dialogInfo to result
   set rpath to text returned of dialogInfo
   set the clipboard to lpath & " " & rhost & ":" & rpath
end tell

do shell script "scp `pbpaste`"
display dialog "Done." buttons {"OK"} default button 1

2003-06-05 02:00:56

twenty questions

I sure would like to peek at the database tables behind this version of Twenty Questions. I played five times, and the computer won four of them. It eventually guessed the fifth correctly, too, but went over 20 in doing so. (I was thinking of a pitchfork, and the computer tried 'crowbar' and 'shovel' before getting the right answer.)

2003-06-02 10:18:10