Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Code - Which embed is best to place code to close window? 2

Status
Not open for further replies.

emaduddeen

Programmer
Mar 22, 2007
184
US
Hi Everyone,

Can you tell me which embed is best to place this code which closes the window? I would like to place it so the window does not get a change to open yet.

Code:
If GLO:Administrator <> 'Yes' |
Then
   Post (EVENT:CloseWindow)
End

Thanks.
Emad
 
Hi Emad,

The best place is WindowManager.Init.

If it is before the Window is opened you can just do a RETURN LEVEL:Fatal.
If it is after, you can do a POST(EVENT:CloseWindow) ; RETURN LEVEL:Fatal.

Regards
 
Hi ShankarJ,

Doing Return Level:Fatal before opening the window did the trick.

Thanks for the help.

Truly,
Emad
 
Hi Emad,

I know, I saw your post and the replies in the NG.

Actually RETURN LEVEL:Fatal is enough before or after the opening of the window, but I post the EVENT:CloseWindow just in case there is some Window Closing code to be executed.

Regards
 
Hi ShankarJ,

Thanks. I will also include POST(EVENT:CloseWindow) to play it safe.

Truly,
Emad
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top