On 29/04/2006, at 1:43 AM, Steve Weintraut wrote:

I'm writing a product configuration system. I have a list rules to code, as if part A is added, then parts B and C need to be added as well. etc, etc.
...

Sure, RBScript seems like an easy answer, but that's too techy for the intended audience.

I wrote something similar for writing code for picture effects, combining calls mainly to the Einhugur PictureEffects library, for a printing app.

It doesn't include any conditional logic but something I did which I suggest you consider is generate RBScript & expose it.

There's a GUI which allows people to pick effects and configure their parameters with sliders and colour pickers (a data-driven UI).

The GUI adds rows to the script.

The user can flip to an Expert pane and edit the text there. They can also copy, paste, email favourite combined effects around etc.

This requires:
- the GUI entry components can generate RBScript lines
- each entry component can also parse a line

For your conditionals, rather than thinking in terms of classic if- then logic, maybe you can structure it as a series of conditional tests, more as a pattern-matching thing, that maps across into a Select Case statement.

Alternatively, for every category of stuff, have some generator function in the RBScript - the idea being to have some extremely regular code as a framework and then just specific bits, maybe bracketed by some comments, that people can edit as the "experts".

Big tip - remember you don't have to expose the entire RBScript for people to edit, you can always have a considerable preamble and append the edited bit before running!

I'm sure we will all be very interested to see how it works out!

regards

Andy
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>

Reply via email to