Complex Layout Problem

Graham Samuel livfoss at
Fri Oct 31 17:34:17 EST 2003

On Thu, 30 Oct 2003 13:53:23 -0600,  Bojsza <gbojsza at> wrote:
At 16:22 -0500 31/10/03, use-revolution-request at wrote:
>Has anyone ever had to layout an interface that the user can input
>various values into fields and build a logical AND, OR and NOT string?
>For example I have two fields sAddr and dAddr in which the user can
>enter any ip address they want. But they also can define a logical
>statement from these fields:
>Example: The user enters sAddr dAddr and wants this
>combination OR sAddr AND NOT dAddr
>This builds the expression
>(sAddr AND dAddr OR (sAddr NOT dAddr
>The grouping is key and must be maintained as the user continues to add
>addition statements.
>My thought was to have three identical groups of for each
>logical operator. Allow the user to enter his first requirements, build
>the expression and then see if they have another set of requirements.
>Is the most efficient way to approach this? Sorry this is not a
>Revolution specific problem but I was hoping the board would still have
>some insight.

Not sure if I entirely understand where your problem lies, but 
couldn't you lay out a rectangular area in which you have a structure 

  <field> <option list> <field> <option list> <field> etc

Where the items in the option lists are the logical operators (OR, 
AND and any other more fancy ones you may wish to include, including 
inversion - NOT).

Then the user picks an option, which stays put after being selected, 
so he/she sees the logical expression laid out on the screen. I'm 
doing something a little bit like this to allow my user to program a 
finite state automaton - well only a little bit, but the option lists 
have proved the key element.

How you actually operate on the expression(s) depends of course on 
what you want the result to look like, but it appears that a very 
limited amount of scripting would be needed to interpret the strings 
and apply the operators.

Hope I didn't misunderstand completely

          Graham Samuel / The Living Fossil Co. / UK & France

More information about the Use-livecode mailing list