cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Have a PTC product question you need answered fast? Chances are someone has asked it before. Learn about the community search. X

Non-blocking popup with ACL?

ptc-925411
1-Newbie

Non-blocking popup with ACL?

Related to my earlier thread about looping over files, I'd like to popup a dialog telling the user that the work is happening (in a big directory, it can take a while). The best option I've found for that is response, but it requires a response, so it blocks the rest of the script. Is creating a dialog box in XUI be the best option? Would that work?

Steve
4 REPLIES 4

Hi Steve--



You might try using the "eval" command, which will pop up a log window
and display your message, something like this:



eval "processing directory " . $dir . " to check for XPath expression "
. $xpath output=>*;



The last bit (output=>*) tells it that you want the output to go to the
log window, and to be appended to any contents already there.



The log window won't block execution.



--Clay





Clay Helberg

Senior Consultant

TerraXML


If you are popping up a dialog, that must mean that the user is watching. If the user is watching, what's the problem with asking him/her to click on an "OK" button? Or do you want this to run with or without human monitoring?
The "message" command might work better for that. However, if the text is short enough to fit in the Arbortext window message area in the lower border of the window, it will. So you need to make sure the message is big enough to cause a separate dialog to appear.

Ed, what I'd really like is a progress bar, which is what I should have posted originally rather than asking for a popup.

Clay, nifty solution.

Steve

If you want a progress bar, you might be able to use something like this:



function pbar(pct) {

local n = (pct * 20) / 100;

response("n is " . n);

local bar = ";

for (i=0; i < n; i++) {

bar .= "█";

}

window_set(current_window(),"message",bar);

window_update();

}



You'll need to call this function and pass it the status value (% completed) whenever you want to update the progress bar.



--Clay



Clay Helberg

Senior Consultant

TerraXML


Announcements

Top Tags