Hiding a window

IanC74

Member
Hi

I have a window that I want to display if a condition is true, if the condition is false the window is not to display.

I have achieved part of this, but when the program is running in batch on the queue it is generating numerous **unable to set widget...(4053) errors.

Is there a way to either suppress all these sort of error messages or a simple way to prevent a window from displaying.

TIA
Ian
 
Best thing to do is move the business (non display) logic to a seperate procedure, and call that from both your Window and your batch script.

It's not a good idea to have GUI and business logic locked together in the same procedure, or to run a procedure containing widgets in batch mode.

There are a couple of kludges that may work, but really you need to seperate your logic.
 
attribute

I am not at my development machine at the mo, so I can NOT give exact syntax. Though if you follow this principle you will get the idea.
Try using the VISIBLE / HIDDEN attribute.
Simply use code like this
ASSIGN
{&WINDOW-NAME}:HIDDEN = TRUE
.

OR
ASSIGN
{&WINDOW-NAME}:VISIBLE = FALSE
.
 

Casper

ProgressTalk.com Moderator
Staff member
I'd go for the solution Lee gave you. To make a window not visible you have to create it first, which isn't possible in batch mode.

Just seperate BL form UI and your fine both ways.


Regards,

Casper.
 
Top