get (lasterror) not working in 9.0
get (lasterror) not working in 9.0
am 22.09.2007 20:24:45 von darren
I have an 8.5 solution that uses get (lasterror) following a print
setup (restore) script step. I have set error capture to ON in the
script
If I open this file in 9.0, the get(lasterror) function always returns
0 when I hit the cancel button in the print setup dialogue.
Whats up with that?!?!
darren
Re: get (lasterror) not working in 9.0
am 22.09.2007 20:34:57 von darren
addendum
I even set up a small test file to test just this function and got the
same result.
Here is the script:
set field [test::gLastErrorCode; ""]
set error capture (on)
Print Setup (restore)
set field [test::gLastErrorCode; get (lasterror)]
gLastErrorCode is a number field. Tried it as text as well.
Darren
> I have an 8.5 solution that uses get (lasterror) following a print
> setup (restore) script step. I have set error capture to ON in the
> script
>
> If I open this file in 9.0, the get(lasterror) function always returns
> 0 when I hit the cancel button in the print setup dialogue.
>
> Whats up with that?!?!
>
> darren
Re: get (lasterror) not working in 9.0
am 22.09.2007 20:44:24 von darren
Addendum2
If I replace the print setup (restore) with just Print Setup, then
cancel returns error code 1.
8.5 did not behave in this manner.
Is there a workaround or another way?
Darren
> addendum
>
> I even set up a small test file to test just this function and got the
> same result.
>
> Here is the script:
> set field [test::gLastErrorCode; ""]
> set error capture (on)
> Print Setup (restore)
> set field [test::gLastErrorCode; get (lasterror)]
>
> gLastErrorCode is a number field. Tried it as text as well.
>
> Darren
>
>
Re: get (lasterror) not working in 9.0
am 22.09.2007 22:43:04 von ursus.kirk
"Darren" schreef in bericht
news:1190486664.199201.25430@n39g2000hsh.googlegroups.com...
> Addendum2
>
> If I replace the print setup (restore) with just Print Setup, then
> cancel returns error code 1.
>
> 8.5 did not behave in this manner.
>
> Is there a workaround or another way?
>
> Darren
>> addendum
>>
>> I even set up a small test file to test just this function and got the
>> same result.
>>
>> Here is the script:
>> set field [test::gLastErrorCode; ""]
>> set error capture (on)
>> Print Setup (restore)
>> set field [test::gLastErrorCode; get (lasterror)]
>>
>> gLastErrorCode is a number field. Tried it as text as well.
>>
>> Darren
I dunno, but I have recreated the situation you describe and got the same
unexpected errors.
Returning a 1 on no options then cancel
Returning a 0 on restore then cancel
Returning a 0 on restore, no dialog
Also observing that when I changed printer settings in the last option then
hitting cancel, the new printer settings were activated.
here's my test script
Set error capture [on]
print setup [restore]
set field [MyField::Get ( lasterror)]
print setup
When in the first print setup I make a change but then hit cancel. The
lasterror returns 0 and the the second print setup comes around and shows me
that the changes I made are activated. Now this looks like a clear bug....
Keep well, Ursus
Re: get (lasterror) not working in 9.0
am 23.09.2007 04:48:24 von darren
I submitted a bug report. Anyone want to suggest a workaround for
this one?
Darren
>
> I dunno, but I have recreated the situation you describe and got the same
> unexpected errors.
> Returning a 1 on no options then cancel
> Returning a 0 on restore then cancel
> Returning a 0 on restore, no dialog
>
> Also observing that when I changed printer settings in the last option then
> hitting cancel, the new printer settings were activated.
>
> here's my test script
>
> Set error capture [on]
> print setup [restore]
> set field [MyField::Get ( lasterror)]
> print setup
>
> When in the first print setup I make a change but then hit cancel. The
> lasterror returns 0 and the the second print setup comes around and shows me
> that the changes I made are activated. Now this looks like a clear bug....
>
> Keep well, Ursus- Hide quoted text -
>
> - Show quoted text -