Musisback Posted March 10, 2011 Share Posted March 10, 2011 Is it possible to create warning ourself? As the build-in function getname(hd) send a waring when hd = nil, I would like my user made functions to sent warnings in some cases. EX: GetMyPIOtype (hd) send a warning if hd is not a pio.... Thanks, Quote Link to comment
Miguel Barrera Posted March 10, 2011 Share Posted March 10, 2011 You can use: Message('hd = nil'); and/or SysBeep; as in IF hd = NIL THEN Message('hd = nil') ELSE BEGIN .... END; This is also a method used to debug a script. Quote Link to comment
JBenghiat Posted March 10, 2011 Share Posted March 10, 2011 If you want the user to respond to the warning, you can throw an alert dialog. See the predefined alerts: http://developer.vectorworks.net/index.php?title=Category:VS_Function_Reference:Dialogs_-_Predefined -Josh Quote Link to comment
Pat Stanford Posted March 10, 2011 Share Posted March 10, 2011 Check out AlertInform. It has an option IsMinorAlert? that just puts the message into the bottom border of the window. Julian Carr brought this to my attention back in 2007. I don't think I have used it since that project so I can't be certain it works in 2010 or 2011, but it did back then. Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.