How to let user enter multiple boxes

Guest
I would like to achieve a behavior similar to leHiCreateRect where user can enter as many rectangles as he wants until he cancels the enter function.

If we try to achieve this with enterBox, this function returns immediately after the first rectangle was entered by the user.

One solution is to call:
while( enterBox(...)
t
)

This will achieve a behavior close to the built-in rectangle creation. However, it would make the options form to disappear after each box is entered.

Is there any other way to achieve behavior of the built-in hiHiCreateRect ?
 
On 02/04/13 07:48, jm.suresh@gmail.com wrote:
I would like to achieve a behavior similar to leHiCreateRect where
user can enter as many rectangles as he wants until he cancels the enter
function.
If we try to achieve this with enterBox, this function returns
immediately after the first rectangle was entered by the user.

One solution is to call: while( enterBox(...) t )

This will achieve a behavior close to the built-in rectangle
creation.
However, it would make the options form to disappear after each box is
entered.
Is there any other way to achieve behavior of the built-in
hiHiCreateRect ?

The built-in commands use a lower level interface into the enterFunction
capability, and use the "Repeat Commands" option in the layout editor to
determine whether to do this.

You could probably call enterBox() in your loop with ?alwaysMap t to get
the options form to appear each time - maybe using hiIsFormDisplayed()
to see whether the form was open when the previous command was active?

Something like that...

Andrew.
 

Welcome to EDABoard.com

Sponsor

Back
Top