<?xml version="1.0"?><!-- RSS generated by Radio UserLand v8.0.8 on Sun, 09 Feb 2003 21:45:50 GMT --><rss version="2.0">	<channel>		<title>Victor Ng: Cocoa</title>		<link>http://radio.weblogs.com/0108956/categories/cocoa/</link>		<description>Objective-C, Cocoa and various other Mac related technical notes.  Mainly notes for myself.  </description>		<language>en</language>		<copyright>Copyright 2003 Victor Ng</copyright>		<lastBuildDate>Sun, 09 Feb 2003 21:45:50 GMT</lastBuildDate>		<docs>http://backend.userland.com/rss</docs>		<generator>Radio UserLand v8.0.8</generator>		<managingEditor>vng1@mac.com</managingEditor>		<webMaster>vng1@mac.com</webMaster>		<category domain="http://www.weblogs.com/rssUpdates/changes.xml">rssUpdates</category> 		<skipHours>			<hour>4</hour>			<hour>5</hour>			<hour>6</hour>			<hour>7</hour>			<hour>2</hour>			<hour>19</hour>			<hour>3</hour>			<hour>0</hour>			</skipHours>		<cloud domain="radio.xmlstoragesystem.com" port="80" path="/RPC2" registerProcedure="xmlStorageSystem.rssPleaseNotify" protocol="xml-rpc"/>		<ttl>60</ttl>		<item>			<title>Sometimes I am so stupid it&apos;s appalling - using CFNetwork and CFReadStreams</title>			<link>http://radio.weblogs.com/0108956/categories/cocoa/2003/02/09.html#a101</link>			<description>Has it really been 8 days since I posted last time?I&apos;ve been trying to decipher how to use the CFNetwork framework and wrap it in a nice library so that I can do nice and friendly conditional HTTP/1.1 fetches from web servers.The short version of this story is that Java has made me into a moron as far as programming is concerned.  Well, that and Apple needs to fix some of their documentation.To get CFNetwork to handle event driven reads from a CFStream, you create a class that opens all of the necessary CFStreams, then you set a context which contains an &apos;info&apos; pointer (of type void*) which points back at your object.  The documentation that Apple provides is a little misleading - it seems to indicate that your entire context datastructure is passed back in the callback:&lt;a href=&quot;http://developer.apple.com/techpubs/macosx/Networking/CFNetwork/Chapter_3/chapter_3_section_6.html&quot;&gt;&lt;blockquote&gt;&lt;dl&gt;&lt;dt&gt;clientCallBackInfo&lt;/dt&gt;&lt;dd&gt;A pointer to context information that was provided when the application previously called CFReadStreamSetClient.&lt;/dd&gt;&lt;/dl&gt;&lt;/blockquote&gt;&lt;/a&gt;That is wrong.What you really wanted to look at is this:&lt;a href=&quot;http://developer.apple.com/techpubs/macosx/CoreFoundation/Reference/CFReadStreamRef/Reference/CallbackGroupIndex.html&quot;&gt;&lt;blockquote&gt;&lt;dl&gt;&lt;dt&gt;clientCallBackInfo&lt;/dt&gt;&lt;dd&gt;The info member of the CFStreamClientContext structure that was used when setting the client for stream.&lt;/dd&gt;&lt;/dl&gt;&lt;/blockquote&gt;&lt;/a&gt;I got screwed for a day because I kept casting the void* pointer to CFStreamClientContext.  Grabbing &apos;info&apos; from that pointer happened to give me the first attribute of my Objective-C object.Points for Java on this one - I&apos;d get a ClassCastException, whereas here all I got was some weird data that I couldn&apos;t figure out.Blech...Kudos to Matt Jarjoura for setting up a CFNetwork wiki with some &lt;a href=&quot;http://cfnetwork.tasonline.com/wiki/index.php/CocoaStepOne&quot;&gt;simple example code for using CFNetwork in Cocoa&lt;/a&gt;.</description>			<guid>http://radio.weblogs.com/0108956/categories/cocoa/2003/02/09.html#a101</guid>			<pubDate>Sun, 09 Feb 2003 09:10:52 GMT</pubDate>			</item>		<item>			<title>VTNPrevayler is released</title>			<link>http://radio.weblogs.com/0108956/categories/cocoa/2003/01/05.html#a91</link>			<description>Hi all!I&apos;m releasing the first public version of my prevalent object persistence library for Objective-C today.It&apos;s based almost entirely on &lt;a href=&quot;http://www.prevayler.org&quot;&gt;Prevayler&lt;/a&gt;.The code compiles and seems to work on my machine - your mileage may vary.  This is the first release after all.  :)So - what does VTNPrevayler do?In a nutshell - it&apos;s library that makes your business objects persistent.It&apos;s not an Object relational database.It&apos;s not an object database.It&apos;s not an OR mapping layer for SQL either.You just write your code and your business objects get persisted automagically.   Just write pure Objective-C code and that&apos;s all you have to do.  No code generation, no EJB-style containers to worry about.  Sweet.I&apos;ll post some thoughts on coding in ObjC versus Java later.  Especially on NSInvocation.  It&apos;s cool - but dangerous.  I have pizza sauce to make right now - so you&apos;ll have to just dive into the code and see what&apos;s there.For now - you can find my code on &lt;a href=&quot;http://sourceforge.net/&quot;&gt;SourceForge&lt;/a&gt; under the &lt;a href=&quot;http://sourceforge.net/projects/vtnprevayler/&quot;&gt;VTNPrevayler project&lt;/a&gt;.Have fun and happy hacking.</description>			<guid>http://radio.weblogs.com/0108956/categories/cocoa/2003/01/05.html#a91</guid>			<pubDate>Mon, 06 Jan 2003 00:21:13 GMT</pubDate>			</item>		<item>			<title>Compiler warnings in GCC3</title>			<link>http://radio.weblogs.com/0108956/categories/cocoa/2003/01/03.html#a90</link>			<description>On the &lt;a href=&quot;http://radio.weblogs.com/0108956/2003/01/03.html#a89&quot;&gt;previous topic&lt;/a&gt; of uninitialized pointers in methods in Objective-C - GCC3 will actually give you warnings on those variables if you&apos;ve got your targets setup as &apos;deployment&apos; instead of &apos;development&apos;.Apparently GCC3 disables (at least) the uninitialized variable warnings when you&apos;ve got -O0 (no optimisations) set.  Any other optimisation value and the compiler properly gives you warnings.Don&apos;t ask me why - but I tried it and it seems to work.&lt;blockquote&gt;The relevant flag is -Wuninitialized. I believe it&apos;s on by default, but GCC 3 ignores it if the optimizer is off (i.e. you are doing a Development build).&lt;/blockquote&gt;</description>			<guid>http://radio.weblogs.com/0108956/categories/cocoa/2003/01/03.html#a90</guid>			<pubDate>Fri, 03 Jan 2003 23:37:16 GMT</pubDate>			</item>		<item>			<title>More pointers in Cocoa</title>			<link>http://radio.weblogs.com/0108956/categories/cocoa/2003/01/03.html#a89</link>			<description>&lt;a href=&quot;http://mjtsai.com/blog/archives/2003/01/02/pointers_in_cocoa.html&quot;&gt;Pointers in Cocoa&lt;/a&gt;&lt;br /&gt;&lt;p&gt;I don&amp;rsquo;t quite understand &lt;a href=&quot;http://radio.weblogs.com/0108956/2002/12/28.html#a87&quot;&gt;what Victor Ng is on about&lt;/a&gt;. Objective-C ivar pointers &lt;em&gt;are&lt;/em&gt; initialized to &lt;code&gt;nil&lt;/code&gt;, and you should get a compiler warning if you attempt to use an uninitialized local variable. &lt;/p&gt; [&lt;a href=&quot;http://mjtsai.com/blog/&quot;&gt;Michael Tsai[base &apos;]s Weblog&lt;/a&gt;]Mike sets me straight on Objective-C&apos;s initialization rules - sort&apos;ve.Suppose I have a class that is defined like this:&lt;tt&gt;@interface VTNMyClass {&lt;/tt&gt;&lt;br/&gt;&lt;tt&gt;   NSDate* aDate;&lt;/tt&gt;&lt;br/&gt;&lt;tt&gt;}&lt;/tt&gt;&lt;br/&gt;&lt;tt&gt;-(void)someMethod;&lt;/tt&gt;&lt;br/&gt;It turns out that when you allocate the object instance, the &lt;a href=&quot;http://developer.apple.com/techpubs/macosx/Cocoa/ObjectiveC/3objc_language_overview/Classes.html&quot;&gt;ObjC runtime&lt;/a&gt; &lt;em&gt;will&lt;/em&gt; initialize all of your instance variables to 0 or nil.To quote:&lt;blockquote&gt;The alloc method dynamically allocates memory for the new object&apos;s instance variables and initializes them all to 0[~]all, that is, except the isa variable that connects the new instance to its class.&lt;/blockquote&gt;So what the heck was going on with my stuff?  Here&apos;s my test case:&lt;tt&gt;-(void)testIdInitTest&lt;/tt&gt;&lt;br/&gt;&lt;tt&gt;{&lt;/tt&gt;&lt;br/&gt;&lt;tt&gt;   id obj;&lt;/tt&gt;&lt;br/&gt;&lt;tt&gt;   [self assertTrue:(obj == nil) &lt;a href=&quot;mailto:message:@&quot;&quot;&gt;message:@&quot;&lt;/a&gt;obj should be nil if pointers are initialized&quot;];&lt;/tt&gt;&lt;br/&gt;&lt;tt&gt;}&lt;/tt&gt;.. and it always fails.What&apos;s going on here is that (as the doc&apos;s say) the &apos;alloc&apos; method is the thing doing the initialization.  Since we never alloc an object, the &apos;obj&apos; pointer is never initialized to nil.Annoying - but true.Regardless - thanks to Michael for pointing out my errors.</description>			<guid>http://radio.weblogs.com/0108956/categories/cocoa/2003/01/03.html#a89</guid>			<pubDate>Fri, 03 Jan 2003 22:09:17 GMT</pubDate>			</item>		<item>			<title>Pointers in Cocoa</title>			<link>http://radio.weblogs.com/0108956/categories/cocoa/2002/12/28.html#a87</link>			<description>Common gotcha of the day in Cocoa:Pointers don&apos;t initialize to &apos;nil&apos;.This will kill you in the usual ways that you expect in C - all your pointers will get indeterminate values unless you explicitly assign nil to them.This is only a little painful if you properly use the designated initializer idiom to set all your instance pointers to &apos;nil&apos; right away.  Keep in mind that after an object is released, the pointer is &lt;em&gt;not&lt;/em&gt; set to &apos;nil&apos;.That means that although:&lt;code&gt;[myObject someMessage:arg1 withExtraArg:arg2];&lt;/code&gt;will not product an error if myObject is properly set to &apos;nil&apos;, it will produce a SIGBUS error (signal 10) if you did this:&lt;code&gt;myObject = [[MyClass alloc] init];&lt;/code&gt;&lt;br/&gt;&lt;code&gt;[myObject release];&lt;/code&gt;&lt;br/&gt;&lt;code&gt;[myObject someMessage:arg1 withExtraArg:argt];&lt;/code&gt;Something you may consider safer would be to do something like this:&lt;code&gt;myObject = [myObject release];&lt;/code&gt;which would assign &apos;nil&apos; to your object upon object deallocation - but it won&apos;t work.  Remember that the release message doesn&apos;t really release the object, it&apos;s sending a &apos;decrement reference count&apos; message to the object.  If the ref count happens to reach 0 - the object will be deallocated. By incorrectly assigning &apos;nil&apos; every time you &apos;release&apos;, you&apos;ll get dangling objects in memory that will never properly go away.On the otherhand, if you do happen to know that an object&apos;s lifecycle should complete - then you probably should just assign &apos;nil&apos; to the pointer.In practice - it seems like as long as you initialize pointers to &apos;nil&apos; - you don&apos;t really have many problems.  By the time you get to a &apos;release&apos; message, you&apos;re either in a deallocation method or you&apos;re shuffling objects between collections.Always keep in mind that Objective-C is not &apos;sandboxed&apos; like Java is.  If you make a bad pointer operation - you can thrash memory in areas that you&apos;re not expecting.  I&apos;m not 100% sure - but it seems like ProjectBuilder can become erratic and crash if you do bad pointer programming.</description>			<guid>http://radio.weblogs.com/0108956/categories/cocoa/2002/12/28.html#a87</guid>			<pubDate>Sat, 28 Dec 2002 14:54:18 GMT</pubDate>			</item>		<item>			<title>I AM NOT BELL CANADA</title>			<link>http://radio.weblogs.com/0108956/categories/cocoa/2002/12/16.html#a81</link>			<description>For the LAST TIME - I do not provide the data in the Canada411 Channel.BELL CANADA DOES.STOP COMPLAINING TO ME THAT YOU&apos;RE NOT LISTED.  I DO NOT CARE.victor &quot;the curmudgeon&quot; ng</description>			<guid>http://radio.weblogs.com/0108956/categories/cocoa/2002/12/16.html#a81</guid>			<pubDate>Mon, 16 Dec 2002 05:17:19 GMT</pubDate>			</item>		<item>			<title>More stuff in the Canada411 channel</title>			<link>http://radio.weblogs.com/0108956/categories/cocoa/2002/12/15.html#a79</link>			<description>I&apos;ve finally gotten around to fixing up that last bug in the Canada411 channel.Screenshot &lt;a href=&quot;http://homepage.mac.com/vng1/screenshot.png&quot;&gt;here&lt;/a&gt;.New features:&lt;ul&gt;  &lt;li&gt;faster&lt;/li&gt;  &lt;li&gt;driving directions&lt;/li&gt;  &lt;li&gt;selectable route types (shortest, fastest, avoid highways)&lt;/li&gt;&lt;/ul&gt;I&apos;ve probably broken the french localization horribly.  Need to fix that later.As always, grab the channel from my dotMac account:&lt;a href=&quot;sherlock://homepage.mac.com/vng1/Canada411/SherlockChannel.xml?action=add&quot;&gt;sherlock://homepage.mac.com/vng1/Canada411/SherlockChannel.xml?action=add&lt;/a&gt;</description>			<guid>http://radio.weblogs.com/0108956/categories/cocoa/2002/12/15.html#a79</guid>			<pubDate>Mon, 16 Dec 2002 03:24:42 GMT</pubDate>			</item>		<item>			<title>Fink for Jaguar available</title>			<link>http://radio.weblogs.com/0108956/categories/cocoa/2002/12/10.html#a75</link>			<description>&lt;a href=&quot;http://fink.sourceforge.net/&quot;&gt;Fink 0.5.0a&lt;/a&gt;&lt;br /&gt;The long-awaited &lt;a href=&quot;http://fink.sourceforge.net/&quot;&gt;Fink 0.5.0a&lt;/a&gt; for Mac OS X Jaguar is available. Don&apos;t be fooled; the &quot;a&quot; doesn&apos;t stand for alpha; it stands for, uh--just go download it. [&lt;a href=&quot;http://wmf.editthispage.com/&quot;&gt;Hack the Planet&lt;/a&gt;]Whoohoo!All the UNIX tools you can handle in one easy place.Mind you - I don&apos;t think I need fink anymore.  After grabbing vim, wget, ncftp, and w3m and compiling from source - there&apos;s really not much else I need.</description>			<guid>http://radio.weblogs.com/0108956/categories/cocoa/2002/12/10.html#a75</guid>			<pubDate>Tue, 10 Dec 2002 16:56:21 GMT</pubDate>			</item>		<item>			<title>Localizing your Sherlock Channel</title>			<link>http://radio.weblogs.com/0108956/categories/cocoa/2002/12/09.html#a72</link>			<description>I&apos;ve been getting a lot of feedback from other budding Sherlock programmers on how to localize they&apos;re Channels.So - being the lazy kind of guy I am - here&apos;s a quick HOWTO on how to localize your Sherlock Channel.   Hopefully, the emails will stop.  :-)Presenting Vic&apos;s Nutshell guide on localizing Sherlock Channels:1.  Find your localized project filesYou&apos;ll see locale specific files in your Sherlock project under the &lt;project&gt;/Channel/&lt;LOCALE&gt;.lproj directory.So in my case for Canada411, I look for:.../Canada411/Channel/en.lproj/which is the directory for english localization files for my project.The files which you&apos;re concerned with are your NIB files and your LocalizedResources.plist.2.  Externalize all your stringsYou shouldn&apos;t be putting in locale specific strings into your code.  Pull them all out and stick them into your LocalizedResources.plist file.  You can use the &lt;a href=&quot;http://radio.weblogs.com/0108956/images/2002/12/09/plist.jpg&quot; alt=&quot;Snapshot of the plist editor&quot;&gt;PropertyList editor&lt;/a&gt; that ships with the Apple developer tools - you&apos;ll find it under /Developer/Applications/Property List Editor.Or alternately - you can just click on a plist file and the editor will open automatically for you.  3.  Copy your localized lproj directory and target a directory name with the new locale name.  Example:  I copied .../Canada411/Channel/en.lproj to .../Canada411/Channel/fr.lpro4.  Change your NIB file in your new localization to reflect any language changes that must be made.  Remember - if at all possible you should just pull out all locale specific strings into your plist file and set text values are channel startup time.5.  Pat yourself on the back.  You&apos;re done.That&apos;s all for now - have fun!</description>			<guid>http://radio.weblogs.com/0108956/categories/cocoa/2002/12/09.html#a72</guid>			<pubDate>Mon, 09 Dec 2002 06:10:35 GMT</pubDate>			</item>		<item>			<title>GNUStep GSXML built for OS X</title>			<link>http://radio.weblogs.com/0108956/categories/cocoa/2002/12/05.html#a67</link>			<description>I&apos;ve been poking around for a decent XML/HTML handling library the last couple of days.   First I came across Apple&apos;s CoreFoundation CFXML service libraries over &lt;a href=&quot;http://developer.apple.com/techpubs/macosx/CoreFoundation/XMLServices/xmlservices_carbon.html&quot;&gt;here&lt;/a&gt;, but it seems like all of Apple&apos;s internal XML handling is done procedural style.Lots and lots of snippets that look like this:&lt;tt&gt;CFXMLNodeRef CFXMLNodeCreate (&lt;/tt&gt;&lt;br/&gt;&lt;tt&gt;    CFAllocatorRef alloc, &lt;/tt&gt;&lt;br/&gt;&lt;tt&gt;    CFXMLNodeTypeCode xmlType, &lt;/tt&gt;&lt;br/&gt;&lt;tt&gt;    CFStringRef dataString, &lt;/tt&gt;&lt;br/&gt;&lt;tt&gt;    const void *additionalInfoPtr, &lt;/tt&gt;&lt;br/&gt;&lt;tt&gt;    CFIndex version&lt;/tt&gt;&lt;br/&gt;&lt;tt&gt;);&lt;/tt&gt;It hurts my head.Then I stumbled over the libxml2 library from GNOME which happens to be &lt;a href=&quot;http://www.zveno.com/open_source/libxml2xslt.html&quot;&gt;precompiled for OSX&lt;/a&gt; by Zveno.It&apos;s not horrendous - but it&apos;s still C and it hurts my pathetically simple brain.Then there&apos;s the GNUStep project which has a GSXML library that wraps libxml2 albeit with some &lt;a href=&quot;http://www.geocrawler.com/mail/thread.php3?subject=GSXML&amp;list=330&quot;&gt;caveats&lt;/a&gt; - but I think it should be good enough.I had to fudge around with the source files, but I&apos;ve gotten the code to compile - whether or not it works is another question.Grab the source here:  &lt;a href=&quot;http://homepage.mac.com/vng1&quot;&gt;http://homepage.mac.com/vng1&lt;/a&gt; in the SourceCode section.  You&apos;ll find a GSXML tarball.License is the all powerful, all viral GPL2.  :-)If it doesn&apos;t work - or if it does work - give me a shout.  Maybe those GNUStep folks will merge the code.  </description>			<guid>http://radio.weblogs.com/0108956/categories/cocoa/2002/12/05.html#a67</guid>			<pubDate>Thu, 05 Dec 2002 18:05:32 GMT</pubDate>			</item>		<item>			<title>GSXML under OS X</title>			<link>http://radio.weblogs.com/0108956/categories/cocoa/2002/12/05.html#a66</link>			<description>Anyone have GSXML working under OS X?I saw this message thread: &lt;a href=&quot;http://www.geocrawler.com/mail/thread.php3?subject=GSXML&amp;list=330&quot;&gt;http://www.geocrawler.com/mail/thread.php3?subject=GSXML&amp;list=330&lt;/a&gt;which was slightly confusing about the current state of affairs.</description>			<guid>http://radio.weblogs.com/0108956/categories/cocoa/2002/12/05.html#a66</guid>			<pubDate>Thu, 05 Dec 2002 08:32:06 GMT</pubDate>			</item>		<item>			<title>wonky wonky objective-c</title>			<link>http://radio.weblogs.com/0108956/categories/cocoa/2002/12/05.html#a65</link>			<description>Ok - so I like Objective-C and Cocoa, but there is defintely some wonkiness to it.  Some weirdness with &lt;a href=&quot;http://sixten.dyndns.org/blog/archives/week_2002_08_18.html#000036&quot;&gt;lexical scoping&lt;/a&gt;.  Haven&apos;t had a case where I got screwed with it yet, but something to look out for.Something that&apos;s been irritating me for a while though is the lack of a decent framework to write out XML data.  Am I just supposed to go out and use the GNOME libxml2 libraries?  What&apos;s everyone else doing?</description>			<guid>http://radio.weblogs.com/0108956/categories/cocoa/2002/12/05.html#a65</guid>			<pubDate>Thu, 05 Dec 2002 07:00:19 GMT</pubDate>			</item>		<item>			<title>Start MySQL on boot up for OS X</title>			<link>http://radio.weblogs.com/0108956/categories/cocoa/2002/12/04.html#a64</link>			<description>&lt;a href=&quot;http://developer.apple.com/internet/macosx/osdb.html&quot;&gt;MySQL under OS X&lt;/a&gt; instructions are already on Apple&apos;s dev server.The one piece that&apos;s missing is startup scripts so that your MySQL server gets restarted on boot up.Unfortunately, OS X is &lt;em&gt;not&lt;/em&gt; like Linux.  In fact, it&apos;s not like any Unix I&apos;m used to.  Startup scripts go under &lt;tt&gt;/Library/StartupItems&lt;/tt&gt;.So - my little tiny contribution: shake and bake startup scripts.Unroll the tar.gz file called &quot;mysql-start.tar.gz&quot; from my &lt;a href=&quot;http://homepage.mac.com/vng1/FileSharing14.html&quot;&gt;download page&lt;/a&gt;.Open up a terminal window.&lt;tt&gt;bash-2.05a$ cd /Library/StartupItems/&lt;/tt&gt;&lt;br/&gt;&lt;tt&gt;bash-2.05a$ tar -zxvf ~/mysql-start.tar.gz &lt;/tt&gt;And off you go.  The scripts assume that you did exactly what the Apple docs suggested.  The root password for the MySQL server is assumed to be &quot;sniggle&quot; - just like the Apple docs.</description>			<guid>http://radio.weblogs.com/0108956/categories/cocoa/2002/12/04.html#a64</guid>			<pubDate>Wed, 04 Dec 2002 19:27:15 GMT</pubDate>			</item>		<item>			<title>Sherlock SDK thoughts</title>			<link>http://radio.weblogs.com/0108956/categories/cocoa/2002/12/03.html#a62</link>			<description>There&apos;s some talk of Sherlock Channel dev in &lt;a href=&quot;http://apple.slashdot.org&quot;&gt;http://apple.slashdot.org&lt;/a&gt; today.Seeing as I&apos;ve pretty much finished off the Canada411 channel - here&apos;s my not-so-uninformed 2 bits:First off - the mailing list is where you should go if you want to get anything done. The documentation for Sherlock is handy, but it is by no means complete.  The nice thing with the mailing lists is that actual engineers from Apple are there and they do respond.The SDK itself is ... pretty awful.I can do some neat things with it since it does support web standards, but there is no decent way of debugging your code.  If you make the slightest syntax error, your function or trigger code will not execute at all.  No error, just an effective no-op.The bright side is that since it does support XPath/XQuery, you don&apos;t need to write too much code, but hey - functions that don&apos;t run at all are not pleasant.It means you can&apos;t write very much code without getting scared and then wanting to test right away.  Mind you - this may be some twisted way of enforcing religious testing.  I just don&apos;t like it.Having to code in JavaScript and XQuery is a pain.  I would have liked to see something more like Python or Ruby used as the scripting language- both are built into OS X anyway.Thread support is awkward at best in the current SDK.All threads are implicitly executed on the developers behalf, you just say I want to notify trigger &quot;x, y and z&quot; and then the runtime fires off 3 threads to run those triggers concurrently.The upside is that you don&apos;t worry too much about synchronization and dead lock.The downside is that you have very little control if you know what you&apos;re doing.  For example, it would be nice to be able to fire N threads and retrieve N webpages back from a target server.The problem with trigger notification method is that the only thing you can do is:&lt;tt&gt;DataStore.Notify(&quot;DATA.action.myTrigger&quot;);&lt;/tt&gt;That&apos;s just not good enough.  Sometimes you want to pass state information in the message.  You just can&apos;t do it using the current SDK.That said, there are a lot of good things going for Sherlock.1.  StandardsIt uses XPath and XQuery.  Proper W3C standards so the things you learn aren&apos;t proprietary and ill thought out (or at least not horrendous)2.  AutoupdatesAnything I deploy in Sherlock is automagically updated on the client side if I update the server.  This is nice - just like Java applets.3.  An active live community.The sherlock-channel-de mailing lists that apple hosts actually has people who know what they are doing and can respond to most questions.  It&apos;s hard to describe, but the Mac community &apos;feels&apos; like the Python community.  People actually like to help each other out. That&apos;s it for now. </description>			<guid>http://radio.weblogs.com/0108956/categories/cocoa/2002/12/03.html#a62</guid>			<pubDate>Tue, 03 Dec 2002 19:13:41 GMT</pubDate>			</item>		<item>			<title>last minute fixes</title>			<link>http://radio.weblogs.com/0108956/categories/cocoa/2002/12/03.html#a61</link>			<description>&lt;img src=&quot;http://radio.weblogs.com/0108956/images/2002/12/03/Canadian411_Little.gif&quot; width=&quot;32&quot; height=&quot;32&quot; border=&quot;0&quot; align=&quot;right&quot; hspace=&quot;15&quot; vspace=&quot;5&quot; alt=&quot;A picture named Canadian411_Little.gif&quot;&gt;Ooh... Kelly Thompson just gave me a swanky new icon for the 411 channel.I also fixed that niggling bug with &apos;enter&apos; not triggering a search.</description>			<guid>http://radio.weblogs.com/0108956/categories/cocoa/2002/12/03.html#a61</guid>			<pubDate>Tue, 03 Dec 2002 18:53:30 GMT</pubDate>			</item>		<item>			<title>New release of the Canada411 Sherlock Channel</title>			<link>http://radio.weblogs.com/0108956/categories/cocoa/2002/12/03.html#a60</link>			<description>Same place as always:&lt;a href=&quot;sherlock://homepage.mac.com/vng1/Canada411/SherlockChannel.xml?action=add&quot;&gt;sherlock://homepage.mac.com/vng1/Canada411/SherlockChannel.xml?action=add&lt;/a&gt;New stuff:&lt;ul&gt;&lt;li&gt;Inlined images with zoom from Mapquest&lt;li&gt;English and French localization&lt;li&gt;Double click now opens Canada411 to show full address information&lt;li&gt;Proper error handling when the Bell server is overloaded.&lt;li&gt;Record counts come back much faster now&lt;/ul&gt;This will probably be the last release of the Canada411 Channel.  It works &apos;good enough&apos; for me that I don&apos;t have an interest in making it any better.You can find the full source code and english/french NIB files here: &lt;a href=&quot;http://homepage.mac.com/vng1&quot;&gt;http://homepage.mac.com/vng1&lt;/a&gt; under the &apos;Source Code&apos; section of my homepage.All code is released under the GPL. There is currently one big bug in the program - the directions don&apos;t quite work.  I have the code to fetch the directions page, and to rip out the directions, distance and the ETA times from mapquest, but I can&apos;t figure out how to skip over &apos;dead&apos; space in a table.If you feel like hacking up my code, go ahead.  </description>			<guid>http://radio.weblogs.com/0108956/categories/cocoa/2002/12/03.html#a60</guid>			<pubDate>Tue, 03 Dec 2002 17:23:19 GMT</pubDate>			</item>		<item>			<title>XQuery scripts, more masochism</title>			<link>http://radio.weblogs.com/0108956/categories/cocoa/2002/12/02.html#a58</link>			<description>Weird. XQuery scripts (at least in Sherlock) require that they always return some kind of value.If you think your trigger isn&apos;t running at all and you&apos;re sure you haven&apos;t botched anything else up, you probably just need to stick on a &lt;tt&gt;return null()&lt;/tt&gt; at the end of the script.</description>			<guid>http://radio.weblogs.com/0108956/categories/cocoa/2002/12/02.html#a58</guid>			<pubDate>Tue, 03 Dec 2002 00:12:56 GMT</pubDate>			</item>		<item>			<title>XQuery pain while refactoring my channel code</title>			<link>http://radio.weblogs.com/0108956/categories/cocoa/2002/11/25.html#a55</link>			<description>I&apos;m not sure if this is XQuery or if it&apos;s some Apple specific thing with XQuery, but this is painful.&lt;tt&gt;    180&amp;nbsp;let $log := if ( count($results) = 7)  then &lt;br/&gt;181&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;msg(&quot;----7 items&quot;)&lt;br/&gt;182&amp;nbsp;else &lt;br/&gt;183&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;msg(&quot;----items = &quot;, count($results))&lt;/tt&gt;The above statement is a template for a valid if-then-else block in XQuery.  Note that you &lt;strong&gt;must&lt;/strong&gt; have the &lt;em&gt;else&lt;/em&gt; clause.  If you need nothing to happen in the else clause, you need to stick in a &lt;tt&gt;null()&lt;/tt&gt; object for a no-op.Other things to note - you have to assign the result of the if statement or else it will hang.Is any of this documented on the web anywhere? Hell - I couldn&apos;t find it.</description>			<guid>http://radio.weblogs.com/0108956/categories/cocoa/2002/11/25.html#a55</guid>			<pubDate>Tue, 26 Nov 2002 02:32:29 GMT</pubDate>			</item>		<item>			<title>Canada411 - now with French</title>			<link>http://radio.weblogs.com/0108956/categories/cocoa/2002/11/25.html#a54</link>			<description>Wow.  There&apos;s been over 1000 downloads of the Canada411 channel in the first day of release.  I don&apos;t think I made it clear before that this webapp requires Sherlock 3 to run properly.  That means you MUST have OS X 10.2 - Jaguar.It&apos;s pretty clear that there is some kind of hunger for Canadian web apps out there. I always figured that the first complaints about the Canada411 channel would be &quot;why doesn&apos;t it support &gt; 25 results?&quot;.This is yet more proof that programmers have no idea what users really want.  :-)Ronald Leroux has graciously translated the NIB file into French.  If your Mac has &apos;Fran&amp;ccedil;ais&apos; set as the primary language - the channel will render in French.Yeehaw!The channel was not adding itself to the toolbar correctly - this was actually due to an invalid URL I was passing around.The correct URL to install the Canada411 channel should be:&lt;a href=&quot;sherlock://homepage.mac.com/vng1/Canada411/SherlockChannel.xml?action=add&quot;&gt;&lt;a href=&quot;sherlock://homepage.mac.com/vng1/Canada411/SherlockChannel.xml?action=add&quot;&gt;sherlock://homepage.mac.com/vng1/Canada411/SherlockChannel.xml?action=add&lt;/a&gt;&lt;/a&gt;</description>			<guid>http://radio.weblogs.com/0108956/categories/cocoa/2002/11/25.html#a54</guid>			<pubDate>Mon, 25 Nov 2002 17:52:35 GMT</pubDate>			</item>		<item>			<title>The Sherlock URL</title>			<link>http://radio.weblogs.com/0108956/categories/cocoa/2002/11/24.html#a53</link>			<description>Once and for all - the Sherlock URL is here:To use this plugin you need to be running OS X 10.2 - Jaguar.&lt;a href=&quot;sherlock://homepage.mac.com/vng1/Canada411/SherlockChannel.xml?action=add&quot;&gt;&lt;a href=&quot;sherlock://homepage.mac.com/vng1/Canada411/SherlockChannel.xml?action=add&quot;&gt;sherlock://homepage.mac.com/vng1/Canada411/SherlockChannel.xml?action=add&lt;/a&gt;&lt;/a&gt;To get a map of the location - just double click on a row within the table view and your web browser should launch with a map.Known bugs:&lt;ol&gt;&lt;li&gt;The channel doesn&apos;t add itself to the toolbar.  &lt;ul&gt;&lt;li&gt;Workaround: Goto the &apos;Channel&apos; menu and select &apos;Add Channel to Toolbar&apos;&lt;/li&gt;&lt;/ul&gt;&lt;li&gt;The names &apos;St.&apos;, &apos;St&apos; and &apos;Saint&apos; are considered unique.  (Thanks Avery - sort&apos;ve).  I&apos;ll have to dynamically substitute the names and aggregate the resultsets.  Arrgh...&lt;/li&gt;&lt;li&gt;Only 25 results come back from Bell.  I don&apos;t work my way through all the result pages&lt;/li&gt;&lt;li&gt;Search is not the default when you hit &apos;enter&apos;&lt;/li&gt;&lt;li&gt;Missing a &apos;Search All&apos; for the province selection.  Provinces should also be fully spelled out.&lt;/li&gt;&lt;li&gt;First names aren&apos;t dynamically shortened to just the first letter if no results come back.  more arghh...&lt;/li&gt;&lt;/ol&gt;</description>			<guid>http://radio.weblogs.com/0108956/categories/cocoa/2002/11/24.html#a53</guid>			<pubDate>Sun, 24 Nov 2002 20:44:06 GMT</pubDate>			</item>		<item>			<title>Provinces fixed in Canada411</title>			<link>http://radio.weblogs.com/0108956/categories/cocoa/2002/11/24.html#a52</link>			<description>I&apos;ve fixed the province bug in the Canada411 Sherlock Channel now.It&apos;s amazing how much motivated you can get to fix bugs if you see that someone is actually using your stupid little tool.  :-)</description>			<guid>http://radio.weblogs.com/0108956/categories/cocoa/2002/11/24.html#a52</guid>			<pubDate>Sun, 24 Nov 2002 18:21:14 GMT</pubDate>			</item>		<item>			<title>Canada411 on VersionTracker now</title>			<link>http://radio.weblogs.com/0108956/categories/cocoa/2002/11/24.html#a51</link>			<description>Oohh.. I&apos;m on Version tracker now.&lt;a href=&quot;http://versiontracker.com/moreinfo.fcgi?id=17130&quot;&gt;77 downloads&lt;/a&gt; and counting.  Wheee!Pedro noticed the problem with the damn tab order of the text fields.Arrgh.. this is a bug in the Sherlock dev kit.  I&apos;ve reordered the visual ordering of the fields so that it appears to be fixed, but this is &lt;strong&gt;definitely&lt;/strong&gt; a bug in Apple&apos;s code.The good news is that all you people who&apos;ve subscribed to the channel should automagically get the new  GUI layout.</description>			<guid>http://radio.weblogs.com/0108956/categories/cocoa/2002/11/24.html#a51</guid>			<pubDate>Sun, 24 Nov 2002 17:54:11 GMT</pubDate>			</item>		<item>			<title>More on the Canada411 channel</title>			<link>http://radio.weblogs.com/0108956/categories/cocoa/2002/11/23.html#a50</link>			<description>Ok folks - if I wasn&apos;t clear the last time, here&apos;s the lowdown on the Canada411 Sherlock channel.&lt;ul&gt;&lt;li&gt;You need a Mac to run this puppy.  If you hav a Unix box that says &quot;Linux&quot; when you type &apos;uname -a&apos; on the command line - you&apos;re out of luck.&lt;/li&gt;  &lt;li&gt;If you have a Windows box - you&apos;re out of luck.&lt;/li&gt;&lt;li&gt;If you are running on something prior to OS X 10.2 then you are out of luck.&lt;/li&gt;&lt;/ul&gt;So for most of you - tough luck.For the the 1 remaining reader - the Canada411 channel is just a little glue that binds the Bell sympatico Canada411 service to Mapquest.  You punch in a name, and a city- out pops a list of search hits from 411.Click on any row and the HTML preview will show you the results from Canada411. Double click on a row and your webbrowser will launch into Mapquest with a map of the location.Here is a &lt;a href=&quot;http://homepage.mac.com/vng1/Canada411/demo.png&quot; alt=&quot;Screenshot of Canada411 Sherlock channel&quot;&gt;screenshot&lt;/a&gt;.  This is a first release beta, there are bugs (province is always Ontario, &gt;25 table items doesn&apos;t work).  The UI is still ugly and unrefined - but the basics work right now.  The URL to load the channel is &lt;a href=&quot;sherlock://homepage.mac.com/vng1/Canada411/SherlockChannel.xml?command=add&quot;&gt;&lt;a href=&quot;sherlock://homepage.mac.com/vng1/Canada411/SherlockChannel.xml?command=add&quot;&gt;sherlock://homepage.mac.com/vng1/Canada411/SherlockChannel.xml?command=add&lt;/a&gt;&lt;/a&gt;.Oh one more thing- about the provinces not working for anything other than Ontario.  This is a bug in the Sherlock XQuery bridge to Cocoa.  Now normally I&apos;d bitch and whine about how much this sucks - but Apple has really been great at helping me diagnose and fix this bug.  &lt;a href=&quot;http://conferences.oreillynet.com/cs/macosx2002/view/e_spkr/1366&quot;&gt;Jessica Kahn&lt;/a&gt; has been really wonderful with answering all my questions on the mailing list.  Hey Java folks - when was the last time that anyone from Sun ever answered a question with &quot;... you may have stumbled across a bug&quot;?  I think all I ever get from Sun is ...well nothing.  No response.  Although there was that time the Apache team yelled at me and a few colleagues....Anyway - have fun with my little hack,</description>			<guid>http://radio.weblogs.com/0108956/categories/cocoa/2002/11/23.html#a50</guid>			<pubDate>Sun, 24 Nov 2002 02:33:15 GMT</pubDate>			</item>		<item>			<title>Canada411 Sherlock Channel</title>			<link>http://radio.weblogs.com/0108956/categories/cocoa/2002/11/22.html#a49</link>			<description>I&apos;m releasing my first cheesy Canada411 Sherlock Channel.You can find it &lt;a href=&quot;sherlock://homepage.mac.com/vng1/Canada411/SherlockChannel.xml?action=add&quot;&gt;here&lt;/a&gt;.It&apos;s simple really.  You punch in a name and address information and it does look ups in Bell Canada&apos;s Canada411 service.  Double click on a row and you&apos;ll get a map from Mapquest.There&apos;s a couple bugs still to work out:&lt;ul&gt;&lt;li&gt;The postal code isn&apos;t properly submitted to Mapquest, but that doesn&apos;t seem to matter for most cases.&lt;/li&gt;&lt;li&gt;It doesn&apos;t handle more than 25 results from Canada411 properly&lt;/li&gt;&lt;li&gt;Provinces aren&apos;t supported yet.  I was too lazy to support more than just Ontario.  There seems to be a bug in the XQuery-&gt;Cocoa bridge but I&apos;m trying to figure this one out with Apple.&lt;/li&gt;&lt;/ul&gt;So except for number 2, it&apos;s not really that bad.  I gotta say that programming with XQuery and Javascript is a pain in the ass though.  When you accidentally make a syntax error, the program just hangs. It doesn&apos;t crash, or give you anything useful, it just sits there and waits.  Forever.</description>			<guid>http://radio.weblogs.com/0108956/categories/cocoa/2002/11/22.html#a49</guid>			<pubDate>Fri, 22 Nov 2002 23:11:12 GMT</pubDate>			</item>		<item>			<title>dumb advertising works for dumb people?</title>			<link>http://radio.weblogs.com/0108956/categories/cocoa/2002/11/19.html#a46</link>			<description>&lt;img src=&quot;http://radio.weblogs.com/0108956/images/2002/11/19/hamiltonMorris.jpg&quot; width=&quot;108&quot; height=&quot;110&quot; border=&quot;0&quot; align=&quot;right&quot; hspace=&quot;15&quot; vspace=&quot;5&quot; alt=&quot;Funny looking kid&quot;&gt;&quot;I&apos;m so simple that only a Mac can help me.&quot;  &lt;a href=&quot;http://www.apple.com/switch/ads/yoyoma.html&quot;&gt;Yo Yo Ma&lt;/a&gt;Maybe it&apos;s just me, but I don&apos;t like it when things are marketed for dummies.All those books like &quot;Martial Arts for Dummies&quot; - they scare me.  What are dummies doing with martial arts anyway?And these switch commercials from Apple.  I don&apos;t get it.  How stupid am I supposed to be before I have to switch?  I don&apos;t get it.Will somebody please explain to me why all these ads are aimed at people who couldn&apos;t get a clue if they were doused in a barrel of clue musk?</description>			<guid>http://radio.weblogs.com/0108956/categories/cocoa/2002/11/19.html#a46</guid>			<pubDate>Tue, 19 Nov 2002 23:27:23 GMT</pubDate>			</item>		</channel>	</rss>