Saturday 31 October 2009

RBScript opensource site

Back in July, I was wondering aloud how I could help improve RB and whether I should start up and host a testing suite.

Well I had a few abortive attempts at designing the suite and never really came up with a decent spec.

I don't have extensive knowledge of the existing bugs, I don't have consistent access to an Intel Mac and I'm not convinced I could do a good job.

So I was casting around for something I might be able to help with and I came across a few questions about RBScript.

So I decided to set up an opensource site and hope it will make a reasonable contribution to the sum of RBScript knowledge in the RB community.

The site revolves around a subversion repository. I chose this because I make quite a lot of use of TortoiseSVN on Windows and SVN workbench on Linux so I'm reasonably comfortable with it.

I like RBScript and I've used it for a number of personal project, one of which I may tidy up and add to rbscriptjottings but the starting point is new harness project.

This harness will contain a number of RBScript subclasses, some context classes, some RBscript class definitions (some of which should probably be hidden from the RBScript coder) and some sample RBScript code. All this will be organised as mini-projects within the harness program which starts at harness.rbvcp

So far I've dabbled in RBScript subclasses with extensions to

  • print methods
  • input methods
  • error-reporting

I've added contexts which provide
  • basic ui (multiple msgbox styles, speak, debuglog)
  • controlled read/write access to RectControls such as ListBox & ProgressBar
  • a reasonable emulation of the RB Date class
Each context currently has its own demo window. I tend to write major class definitions in the constant editor of the appropriate module.

The contexts all need more work but they can all be chained together by making them subclasses of each other and therefore provide access to as much current functionality as is required.

I expect to work on the harness program on and off for quite a while with varying amounts of concentration.

Hopefully, once I've spent a while on it, there will be something for everyone to learn from the site. I've already found out several things I didn't know about the subject at hand.

It is my fervent hope that others will come on board at some stage and add to the RB code and/or to a store of scripts.

The test scripts are in need of lots of rethinking. They tend to be just odd bits of script I used when writing the contexts to make sure they worked. A bit of design effort will need to go into them at some point.

That's one of the advantages of using version control. It's nice and simple to keep making changes without messing things up.

A quick look at the issues list will show that I've got a lot of small things planned for the project. I could easily swamp the list with lots more ideas but I need to see how quickly the current work gets done first.

If anyone has any particular requests or comments, feel free to raise a new issue on the site. Or if you don't have a gmail or google login, leave a comment here.

And of course if you have any contributions to make, please let me know.

A couple of comments before I stop writing:
  1. I've used EditFields in the project for backward compatibility and intend to keep them there until Cocoa in RB makes them obsolete.
  2. For those who are just curious, I've put a single file (rbp) version of the project at the downloads page. It is the same as the version-control version at the time of writing but I make no promises about keeping it up-to-date. The current source is in the repository.
And so to bed.

No comments: