You might have discovered the new "experimental search" area in my sidebar. This is part of my current localConnection experiment.
What it actually does is to send special queries to all my little google API widgets on this page as soon as you make a selection. It enables you to search google for pages that were for example just indexed within the last week.
I am pretty happy that it seems to work. Normally to use the local connection is no big deal, but this one has a little twist: in Flash each connection name is only allowed once on a page - if you try to connect from another file that uses the same name it fails. But here I have to deal with several instances of the same flash file, plus I want to send the same message to all the files. So what I do is to create a random connection name for each receiver-widget and send that name to the sender-widget. There it gets added to the send-queue, something like an addListener method.
Of course the sender has to know the names of the receivers BEFORE it starts sending and there is another little problem: sometimes the receivers might get loaded before the sender and so they try to connect to something that is not there yet. Therefore the receivers start several delayed attempts to connect to the sender.
The (not very well documented) source can be downloaded here. It looks like the search widget still has some cosmetic problems sometimes, like showing an empty page or loosing the frame.Posted at July 13, 2002 06:50 PM | Further reading