Robert Shiplett's Blog

6 Posts tagged with the curl tag
1

If you have a Curl NITRO project and you want to have, say, the documentation for the Curl opensource web toolkit available as a library which you can search when working in Curl7, just add 7.0 to the WSDK docs manifest.mcurl file.

For example, I unzipped the 1.0.6 WSDK zip into a Curl7 folder and then went to my


C:\Curl7\WSDK_071120\docs-install\WSDK


and changed the manifest header to


{curl 6.0, 7.0 manifest}


This only means that I can search across those Curl 6 API docs when doing a Curl 7 project without the documentation viewer complaining about a version inconsistency.


If you haven't added documentation before, it is very straight-forward: just open the HELP menu of the doc viewer (the 'help' window of the Curl IDE.) You will want to select a manifest.mcurl that is in a folder designated as being the 'documentation' version of a package such as the WSDK.


The nice thing about the viewer is that if you close it, close your project and then open a Curl 5 project, the documentation in HELP will now be whatever you have selected (i.e. installed) as your Curl 5 documentation.


Documentation for your own code can be improved by using the macro's {doc } and {doc-next } which are detailedin the Contents menu of the Curl Documentation Viewer in the section


Curl IDE User's Guide


under the heading


Documenting Your Application


Of course, as you may recall, COBOL programmers document best while sleeping.

1 Comments 0 References Permalink
9

Over at another blog I have tried to explain the rationale for my proposals for encouraging high-quality industrial Curl code.

Some languages are deliberately casual: Python for example, with its "we are all adults here" approach. Some languages eschewed access modifiers the way they refused SELECT statements ( I am thinking of Smalltalk, of course ;-)


In the spirit of hoping to see Curl evolve, I hope you will feel free to contribute with a comment on either my rationale or the details or both.

9 Comments 0 References Permalink
1

This afternoon I was looking at whether much was new over at the folks who took over Metacard when I stumbled into the Google 'Android' code project.

The link to an XML example of a UI layout was a good reminder of why we love Curl.

A UI layout is typically hierarchical and models a containment structure, but a comparison of that XML to a comparable Curl declarative layout could be misleading: and that is because in addition to that XML there is still all of the Java code required to to get that little UI up and running.

What Google may be after is the mobile market (OpenLaszlo may be the competitor they have in their sights) and perhaps they can rely on the perception that competant java UI developers are cheap and plentiful.. But the reality may be a little different if there is any big demand for Android app's. Because tolerance for bugs in mobile software is, well, you know, low: the thing has gotta work. Those little gadgets are, well, kinda personal ... and we rely on them in corporate life when we are far removed from any friendly, near-my-cubicle rescue-techie.

Just what Dilbert needed: an Android running on Java ...

It might be fun to parse some of the example XML as UI spec's for a Curl applet ... stay connected; more to follow.

1 Comments 0 References Permalink
4


The Curl framework for the book, Enterprise Curl, has been upgraded to Curl 6.0 and is now in an SVN repository at http://code.google.com/p/curl-enterprise-framework-v1-1/

The code can be downloaded from the same site in a ZIP file.

It has only been testing in IE7 on Windows XP

To run the VMS Motors example from the book, visit www.logiquewerks.com

The demo may take a moment to start as the PCurls load. Not all features have been restored (the splash screen used undocumented code from a 2.0 pre-release for subapplets; the MDI interface and the toolbar need some work.

All scurl files have been renamed to lowercase for the yahoo host, but only a few have been converted to hyphenated names.

There are a few minor changes to AppParameters class for ease of use in a web container or running locally; some GIF files are now JPG's; there is now use of {register-suspend-proc}; a TabPane abstract class was added.

I have started an index to the Enterprise Curl book at another link at logiquewerks.

Some of the code is of slightly uneven quality and there are memory and GUI issues once the MDI windows are opening. But since the book is available, I thought it worthwhile to have a working version of the example from the book.

The book has treatments of SOAP with web services and the basics of using a SAXParser.

That so much code from early in version 2.0 could be upgraded with such ease to Curl 6.0 is a testament to the backward-compatibility achieved by the Curl team: all code ran from local files once the version was flipped toCurl 6.0, including the dodgy subapplet code for a splash pane.

4 Comments 0 References Permalink
2

My second iteration has added another TocDocument but this one has a procedure to populate an index entry and its pages.

That procedure might also be a place to add the values to a printable container should a user wish to print the index.

The procedure definition below follows the declaration of 2 variables which we will populate on each call.

{let public v1:#Visual, v2:#Visual}
{define-proc public {idx-entry entry:String, pages:String}:(Visual, Visual)

The procedure returns two visual objects which ensures that all entries and pages are formatted with the same look-n-feel.

A typical call might be

{set (v1, v2) = {idx-entry "parse", "369"}}
{heading level=4, {value v1}}
{heading level=5, {value v2}}

which is often preferrable to the simpler, error-prone and no-fun-to-maintain repetition of sequences such as

{heading
level=4,
{paragraph
paragraph-left-indent = 0.25in,
{bold parse}
}
}
{heading
level=5,
{paragraph
paragraph-left-indent = 0.50in,
{text
text-preserve-whitespace?=true,
text-breakable?=false,
369
}
}
}

for each entry.

With the simple abstraction which the procedure provides, we can change the layout in one place and we can consider adding a facility such that the user could customize the index and retain their changes as client-side persistent data. All of which points to a role for Curl in The-Future-of-the-Book, n'est-pas?

The complete procedure follows:

{define-proc public {idx-entry entry:String, pages:String}:(Visual, Visual) || TocTreeItem
{return
{paragraph
paragraph-left-indent = 0.25in,
{bold {value entry}}},
{paragraph
paragraph-left-indent = 0.50in,
{text
text-preserve-whitespace?=true,
text-breakable?=false,
{value pages}
}
}
}
}

You no doubt see many opportunities to improve this (the user is required to remember to add spaces between page numbers or otherwise format the string of page numbers; there are no options yet to control the font, emphasis etc)

2 Comments 0 References Permalink
3

Folks,

Within the limits of a personal Curl license, I have started testing some Curl pages over at my www.LogiqueWerks.com

I'll try to keep y'all posted here at this blog of progress and hiccups at that site.

The next page up will be a TocDocument to supplement the index of one of the available books on Curl.

In the past my Curl blogs were at www.eclectic-pencil.com and www.eclectic-pencil.blogspot.com but very likely now they will be home to my related interests in Smalltalk, Rebol, Icon, Unicon, Converge, Oz, Jython and such while my Curl blogging moves to this address.

There are two open source modules for Python that I intend to port to Curl, so their progress should also track from this blog.

Cheers

3 Comments 0 References Permalink

Robert Shiplett's Blog

Notes from the workday of a lead Curl developer at a commercial software house specializing in integrated financial packages for audit, governance, compliance and enterprise risk assessment and management