Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

[Uniface-L] $status not 0 after macro "^quit" and "^accept"

36 views
Skip to first unread message

dammie

unread,
Feb 25, 2010, 3:57:04 AM2/25/10
to unif...@uug.org
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

Disco Octopus

unread,
Feb 25, 2010, 5:29:36 AM2/25/10
to

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

Ulrich Merkel

unread,
Feb 25, 2010, 5:35:04 AM2/25/10
to Uniface User Group Discussion Forum
Hi David,

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

Disco Octopus

unread,
Feb 25, 2010, 5:29:36 AM2/25/10
to uniface...@lists.umanitoba.ca

Hi David,

dammie

unread,
Feb 25, 2010, 6:25:32 AM2/25/10
to unif...@uug.org
Thanks Uli and Disco.

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

Zdeněk Socha

unread,
Feb 25, 2010, 11:53:01 AM2/25/10
to Uniface User Group Discussion Forum
Hello,

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

0 new messages