Monday, September 29, 2008

Curl: what's in a name?

Actually I'm not going to carry on about Curl versus cURL today, but rather about what's optional in a Curl UI.

If you are running the Curl IDE and a Curl applet, you may not be aware that a CTRL-Right-Click gives you a popup from which you can inspect the Curl widget under your mouse pointer. So what's in a name?

Well, all Curl visual objects have options - and one option which you can set is a name. If you have a few applets sharing the same code packages, it can save you some time if you able to track that this widget 'X' in this container is in fact, say, 'the Demo-only custom drilldown label-only-hidden-button'.

Why does this matter? Well, if a widget container was instantiated declaratively, as say,
|| (somewhat simplified for illustration)
{VBox {HBox {CustomWidget drilldown = anon-proc}}}}

you would have no handy instance variable (field) or local variable or getter method to access this instance of CustomWidget. Whether you are debugging production code or updating an iteration of a prototype, you may wish you had done this:
{VBox {HBox {CustomWidget name="Demo drilldown here", drilldown = a-proc}}}}

Now when you use CTRL-R-Click to inspect that widget, you can flip open the options and there it is: the name. Want to set a breakpoint? Open the source file and search on that name. There you are.

So it's not so much "what's in a name" as "what useful tag is hidden in that widget ..."

Sunday, September 28, 2008

New revisions to Curl Enterprise Framework code

Over at LogiqueWerks I have re-worked the first version of the Curl 6.0 port of Paul Sheehan's Curl framework so as not to use undocumented API's for its one use of a sub-applet.

IPC between Curl applets has been something of an art ( as you will know if you have hit invalid applet exceptions or struggled with the InlineRemoteConnection class) but there are now working examples which only use documented API's (my LogiqueWerks page includes the shape-changing example which comes with the Curl IDE documentation in the 'extended' examples code.)

The interesting thing is to be able to put a breakpoint in a working framework example such as the logon to the 'VMS MOTORS' demo and see something of the Curl IPC internals by inspecting a local instance of AppletData.

For more details, see my Curl 'Developer Community' blog over at