Home > Archive > Getting Started with dBASE > October 2006 > Function/procedure onclick









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Function/procedure onclick
dlit

2006-10-25, 7:23 am

When writing some instructions in a function or procedure (with the wrench) to characterize the action of a button, it seems that only one instruction is taken into account.
Any possibility to execute a series of instructions instead ?
Dom
Ken Mayer [dBVIPS]

2006-10-25, 7:23 am

dlit wrote:
> When writing some instructions in a function or procedure (with the wrench) to characterize the action of a button, it seems that only one instruction is taken into account.
> Any possibility to execute a series of instructions instead ?


function MyButton_onClick

do whatever you need to do
if something
do something else
endif

return

Not sure what the problem is ...?

Ken
--
/(Opinions expressed are purely my own, not those of dataBased
Intelligence, Inc.)/

*Ken Mayer* [dBVIPS]
/Golden Stag Productions/
dBASE at goldenstag dot net
http://www.goldenstag.net/dbase/dBASEBook.htm
http://www.goldenstag.net/GSP
http://www.goldenstag.net/dbase
dlit

2006-10-25, 7:23 am

For instance :

Procedure (or Function) PUSHBUTTON1_onClick
cancel
close all
close form
return

does not close the form.
Dom

Ken Mayer [dBVIPS] Wrote:

> dlit wrote:
>
> function MyButton_onClick
>
> do whatever you need to do
> if something
> do something else
> endif
>
> return
>
> Not sure what the problem is ...?
>
> Ken
> --
> /(Opinions expressed are purely my own, not those of dataBased
> Intelligence, Inc.)/
>
> *Ken Mayer* [dBVIPS]
> /Golden Stag Productions/
> dBASE at goldenstag dot net
> http://www.goldenstag.net/dbase/dBASEBook.htm
> http://www.goldenstag.net/GSP
> http://www.goldenstag.net/dbase


Ivar B. Jessen

2006-10-25, 7:23 am

On Thu, 05 Oct 2006 09:20:08 -0400, in dbase.getting-started,
Subject: Re: Function/procedure onclick,
Message-ID: <fUdi6DI6GHA.416@news-server>,
dlit <dlitl@wanadoo.fr> wrote:

>For instance :
>
>Procedure (or Function) PUSHBUTTON1_onClick
>cancel
>close all
>close form
>return
>
>does not close the form.


Your code does not close the form because it starts out with a CANCEL command which acts as a
RETURN.

Read the OLH on CANCEL.


Ivar B. Jessen
Ken Mayer [dBVIPS]

2006-10-25, 7:23 am

dlit wrote:
> For instance :
>
> Procedure (or Function) PUSHBUTTON1_onClick
> cancel
> close all
> close form
> return
>
> does not close the form.


What's the first command do?

CANCEL

This command stops all processing, correct? Try commenting it out ...
you don't need it unless you really do want to cancel all processing,
and if you want it to do it after the form is closed, place it after
the "close form" command (although form.close() would make more sense).

Ken

--
/(Opinions expressed are purely my own, not those of dataBased
Intelligence, Inc.)/

*Ken Mayer* [dBVIPS]
/Golden Stag Productions/
dBASE at goldenstag dot net
http://www.goldenstag.net/dbase/dBASEBook.htm
http://www.goldenstag.net/GSP
http://www.goldenstag.net/dbase
Sponsored Links





Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive | Programming forum archive

Copyright 2008 droptable.com