I am testing form with two buttons - OK and Cancel, I have macros on them ( macro "^accept" and macro "^quit" ).
If I look at execute trigger via debug, I ve see that $status is set to 9 ( "^accept" ) or 10 ( "^quit" ) after edit command...
(Both triggers ACCEPT and QUIT are not defined - no code there)
// _execute trigger running... button OK/Cancel pressed //
edit
done <end of module> ..... there is $status != 0 after edit
Can someone explain why is $status not 0?
If I check help library, there is info that :
After macro, return values $status is always set to 0.
If no Accept/Quit trigger is defined, it preforms action equal to return 0.
So how is possible that I got $status 10 or 9?
Thanks
David
Hi David,
Indeed this is defined behaviour.
Although there is no code in your ACEEPT or QUIT triggers, at the end of
your component (after the edit statement on a modal form) it will
produce $status=9 for accept and 10 for quit.
Note that code that says macro "^ACCEPT" is the same as perform an
accept (eg. GOLD+A). The same for macro "^QUIT".
--
Disco Octopus
www.choicebeefjerky.com.au
your macro statements fire the triggers you have specified.
Uniface sets $status to 9 or 10 by default
to denote if the Structure Editor was left via QUIT or ACCEPT.
Success, Uli
-- Ulrich Merkel --
ulrich...@web.de
+49(69)317881
Hi David,
There is info in help about this -- under info to command "run" ... (default values returned by run)... But I looked at "activate" and there is not such information....
Thanks again...
David
you are talking about $status after edit... just look at ulibrary at
edit proc statement. There is stated, that return status in a normal
client/server environment is 9 if user used ^ACCEPT to leave the form
that was started with edit, and it is 10 if user used ^QUIT to leave the
form that was started with edit.
So, if you use execute trigger and use edit... and user uses accept or
quit trigger (which is the same as you use macro ^accept or macro
^quit), the return status is 9 or 10 (respectively). Should you need
status 0, you can always use exit 0.
Zdeněk
dammie napsal(a):
> Hello,
>
> I am testing form with two buttons - OK and Cancel, I have macros on them ( macro "^accept" and macro "^quit" ).
>
> If I look at execute trigger via debug, I ve see that $status is set to 9 ( "^accept" ) or 10 ( "^quit" ) after edit command...
> (Both triggers ACCEPT and QUIT are not defined - no code there)
>
>
> // _execute trigger running... button OK/Cancel pressed //
> edit
> done <end of module> ..... there is $status != 0 after edit
>
>
>
> Can someone explain why is $status not 0?
>
> If I check help library, there is info that :
>
> After macro, return values $status is always set to 0.
> If no Accept/Quit trigger is defined, it preforms action equal to return 0.
>
> So how is possible that I got $status 10 or 9?
>
> Thanks
>
> David
> _______________________________________________
> Uniface User Group Discussion Forum
> For more information: http://lists.umanitoba.ca/mailman/listinfo/uniface-l
> To unsubscribe/set options: http://lists.umanitoba.ca/mailman/options/uniface-l
>
>
--
Bc. Zdeněk Socha
FULLCOM systems s.r.o.
Korunní 934/22
709 00 Ostrava - Mariánské Hory
tel.: +420 595 626 032, +420 596 633 779
fax: +420 595 626 033
e-mail: zdenek...@fullcom-systems.cz
http: http://www.fullcom-systems.cz