Groups > Superbase > Superbase 2 programming > Re: dialog return value




dialog return value

dialog return value
Tue, 11 Apr 2006 18:15:27 -040
I have tried to use a value in a filled array as the return value in a 
command button in the Dialog editor.

Example:

ADD DIALOG "test",1,28,43,16,12,1,d1$(2),dnum%(2),1

the array d1$ is fine and displays the button text correctly

the array dnum% return 0 every time.

When I print memory, the dnum% array has values.

What am I missing?

Any info would be greatly appreciated!
Jean

Post Reply
Re: dialog return value
Tue, 11 Apr 2006 20:23:55 -040
Help says:

ADD DIALOG dialogname, 1, x, y, width, height, style, buttontext, buttonno,
action [, nested-dialog]

It appears you are using these arrays with element numbers, so d1$(2) would be
just like d1$ holding buttontext, and dnum%(2) is the buttonno, 1 is the action
returned by the control when activated.

So dnum% would not do anything at all, it's the number of the button control on
that dialog.

Buttons only return the number assigned, so you can capture which one was
clicked. The value is found in a%% if you used:

  DIALOG d$,a%%

To display the dialog and wait for user to do something.



On Tue, 11 Apr 2006 18:15:27 -0400, jvallee <jvallee@windowareinc.com>
wrote:

> I have tried to use a value in a filled array as the return value in a
> command button in the Dialog editor.
>
> Example:
>
> ADD DIALOG "test",1,28,43,16,12,1,d1$(2),dnum%(2),1
>
> the array d1$ is fine and displays the button text correctly
>
> the array dnum% return 0 every time.
>
> When I print memory, the dnum% array has values.
>
> What am I missing?
>
> Any info would be greatly appreciated!
> Jean
>
>
>



-- 
Post Reply
about | contact