|
Anaristos Sorcerer
Joined: 17 Jul 2007 Posts: 821 Location: California
|
Posted: Sat Jan 31, 2009 12:59 am
A request for the #UNWINDOW command |
It would be very convenient to be able to remove a window from the settings via script rather than having to do so manually via the Settings Editor. Also as a corollary, this would allow for a cleaner way of manipulating window properties when they change, by simply removing the old setting and then creating the new setting with new properties.
The format would be:
Code: |
#UNWINDOW <exactwindowname>
|
|
|
_________________ Sic itur ad astra. |
|
|
|
Tech GURU
Joined: 18 Oct 2000 Posts: 2733 Location: Atlanta, USA
|
Posted: Sat Jan 31, 2009 2:30 am |
If you don't want a window displayed then you should use #CLOSE. I think it's fair to say that in most situations you shouldn't be creating and deleting severals windows each session.
What were you trying to get done? Perhaps there's another alternative. |
|
_________________ Asati di tempari! |
|
|
|
Anaristos Sorcerer
Joined: 17 Jul 2007 Posts: 821 Location: California
|
Posted: Sat Jan 31, 2009 3:25 am |
Aside from the clutter of windows that I no longer want, windows that were created to display some temporary information but no longer serve the purpose (just as variables are used sometimes and then destroyed), I find that changing the properties of windows after they are created causes problems with CMUD. So while the dumps I send are being reviewed, one way to get around the problem is to start out with a new window each time the procedure is executed. IF #UNWINDOW is too much or too unreasonable, perhaps functions that change window properties could be the way to go. I would love to see a function such as
Code: |
#CALL %setwindowproperty(<windowname>,<propertyname>,<value>)
|
(This function would, of course, return the current value if no value were provided)
As an example (a trivial one):
Code: |
$vflag = %setwindowproperty(INFO,visible)
;;
#IF ($vflag) {#CALL %setwindowproperty(INFO,visible,0)
|
I do know that this could be done with #CLOSE, but shows how simple and powerful a function would be.
This would bring windows out of a static (or unwieldly dynamic) realm and into a easily scriptable dynamic one. I will even settle for the requirement that the window must be invisible while this function is applied. I could live with that. Yes, #MAKEWINDOW gets the job done (sort of) and so does #MXP <FRAME> (again sort of), but there is no real substitute in a script for a function as far as simplicity and flexibility is concerned (compare #IF with %if()). Commands are there to set the overall environment while functions are there to fine tune said evironment. In many cases, using a command could be thought of as wielding an axe, while using a function could be likened to using tweezers.
In an ideal programming environment, anything that can be changed ought to be accessible to the script via a function. But for the time being I think that lacking such function(s), #UNWINDOW is a step in the right direction. |
|
_________________ Sic itur ad astra. |
|
|
|
Tech GURU
Joined: 18 Oct 2000 Posts: 2733 Location: Atlanta, USA
|
Posted: Sat Jan 31, 2009 6:21 pm |
I don't dispute that more scriptability for windows will be useful. I actually have some outstanding bugs/feature requests wrt that myself.
For temporary display of information you could/should be using #PROMPT, #YESNO or #MESSAGE. Or even the status window. I myself came up with a technique for menu (i.e. click driven) status window. Allowing to display several levels of info. |
|
_________________ Asati di tempari! |
|
|
|
|
|