jngibert
(Lurker)
2007-09-25 01:13 AM
WKIX32 and WrapAtEOL

Noticed something interesting when using WKIX32: Calling the SetOption function to set WrapAtEOL will show the Kixtart command window.

I set WrapAtEOL = ON just in case the command window needs to be displayed later during script execution (for error handling.) Having the command window appear when script execution begins just because this option is being set is a little frustrating.

Is this a behavior that can be changed?

-Jon


Les
(KiX Master)
2007-09-25 01:34 AM
Re: WKIX32 and WrapAtEOL

It is expected behavior.

It_took_my_meds
(Hey THIS is FUN)
2007-09-25 05:27 AM
Re: WKIX32 and WrapAtEOL

Why do you say that it is expected behaviour?

Les
(KiX Master)
2007-09-25 05:35 AM
Re: WKIX32 and WrapAtEOL

Any console directive has always caused a console to to be created. AFAIK it has always been this way.

It is not a beta issue so belongs in suggestions if you wish to change expected behavior.


It_took_my_meds
(Hey THIS is FUN)
2007-09-25 05:43 AM
Re: WKIX32 and WrapAtEOL

Running
 Code:
Break on 

$=SetOption("Explicit","On")
$=SetOption("NoVarsInStrings","On")
$=SetOption("NoMacrosInStrings","On")
$=SetOption("DisableDebugging","On")
with wkix32.exe doesn't create a console but
 Code:
Break on 

$=SetOption("WrapAtEOL","On")
does.

It doesn't seem consistent to me.


Les
(KiX Master)
2007-09-25 06:15 AM
Re: WKIX32 and WrapAtEOL

None of the first group are console directives, meaning that they don't need the console to be put in effect.

Only the last one is a console directive. Makes perfect sense to me. Any of the SetConsole() directives will do the same thing.


Witto
(MM club member)
2007-09-25 11:06 AM
Re: WKIX32 and WrapAtEOL

 Code:
Break on 
$=SetOption("Explicit","On")
$=SetOption("NoVarsInStrings","On")
$=SetOption("NoMacrosInStrings","On")
$=SetOption("DisableDebugging","On")
If @SCRIPTEXE = "KIX32.EXE"
	$=SetOption("WrapAtEOL", "On")
EndIf


Richard H.Administrator
(KiX Supporter)
2007-09-25 11:15 AM
Re: WKIX32 and WrapAtEOL

 Quote:
It doesn't seem consistent to me.


It's perfectly logical - you are mis-attributing the effect.

Maybe a bit of background will help.

The console is an object - if you want console output you have to create it through an API. If you want to change a console property you need the object otherwise you have no property to change!

KiXtart makes the reasonable assumption that you set the "WrapAtEOL" in your script because you do actually want to change the property, so it *has* to create the console object to do so.

If you only don't want the console to appear and you are only setting the WrapAtEOL in case you need it (for example) to display debugging information in the event of an exception, then you need to defer the WrapAtEOL option until you need to write to the console.

None of the other SetOption() properties require a change to the console object, so none of the will trigger the console object creation.