PDA

View Full Version : How to open new panel from a lsript?



vashts
11-23-2007, 03:39 AM
Hi all, I have a lscript and I want to open a secondary panel if, for example, I click on a button. Can it be made with lscript? If so, where can I find documentation or -better- examples?

Thank you.

vashts

Dodgy
11-23-2007, 07:01 AM
You can just add a button which calls a procedure which aborts the current requester and makes another one, then calls the old requester when it's finished.

Dodgy
11-23-2007, 07:07 AM
For example:
options
{

...
b1=ctlbutton("New Panel",50,"MakeNewPanel");
...
}


MakeNewPanel
{

reqabort(); // ends the old requester

reqbegin("New requester");
t1=ctlstring("Blah","blahblahblah");
if !reqpost() return;
reqend();
mystr=getvalue(t1);

options(); // calls the old requester

}

vashts
11-24-2007, 10:08 AM
thankyou so much. :thumbsup: before posting, I used reqbegin(), but without reqabort(), and lw crashed.

again, thank you.

vashts

jeremyhardin
11-28-2007, 06:05 AM
reqabort() has been superceded by reqend() for the record (reqord? hehe).

So particularly in the case of multiple panels closing and opening, you'll want to replace reqabort() with reqend().

EDIT: And I realize the docs say otherwise, but in this particular instance they are wrong. :)