call tbd

Hey,

I was trying to use SUB TD_InputM. I know there is some limitations on it, mainly the maximum number of items. However I found another difficulty: the widths of the 2 columns are fixed and I need a left one wider. Anybody knows ways to turn it more flexible. I went to the internal call trying to find a way to change field widths. In order to try to understand the basics I tried to run the following program:

LIBRARY "c:\truebasic gold v6\TrueCtrl.trc", "TrueDial.trc"

DIM name$(3), t1$(3)

LET titulo$ = "titulo 123456789012345678901234567890"
LET mensagem$ = "MENSAGEM 123456789012345678901234567890xxxxxxxxxx1234567890"
LET btn$ = "OK 1234567890|cancel 12345678901234567890"
LET name$(1), name$(2), name$(3) = "esquerda 123456789012345678901234567890"
LET t1$(1) = "direita 123456789012345678901234567890"

CALL TBD (-1,-1,1,titulo$,mensagem$,btn$, name$, t1$, st, dflt, to, rslt)

END

However I allways get an error message related to the name$ cal: "... … 11:43 wrong type".

Any idea?

david

Comments

CALL TBD

Hello David,

TD_InputM is not the same as TBD. (Chapter 21)

TBD is a built-in routine, so you don't need the Libraries.

And the arguments are not vectors (arrays); they are strings separated by "|", e.g., "na1|na2|na3"

They ARE arrays in TD_InputM; see "DemInptM.tru" in the tbdemos folder.

Also, the the formatting can't be changed in either one, so you're stuck with the peculiar way the labels are truncated.

!LIBRARY "TrueCtrl.trc", "TrueDial.trc" ! not needed for TBD
!DIM na$(3), t1$(3) ! these are NOT vectors in TBD, therefore the "wrong type" error
!LET t1$(1) = "direita 123456789012345678901234567890" etc.

Try running the following:

LET titulo$ = "titulo 123456789012345678901234567890"
LET mensagem$ = "MENSAGEM 123456789012345678901234567890xxxxxxxxxx1234567890"
LET btn$ = "OK 1234567890|cancel 12345678901234567890"

LET na0$ = "esquerda 123456789012345678901234567890"
LET na$=na0$ &"|"& na0$ &"|"& na0$
! LET na$="na1|na2|na3" ! i.e., simply this.

LET t1$="direita 123456789012345678901234567890|direita 123456789012345678901234567890|direita 123456789012345678901234567890"

CALL TBD (-1,-1,1, titulo$, mensagem$, btn$, na$, t1$, st, dflt, to, rslt)

END

Your program would probably work if you had CALLed TD_InputM instead of TBD.

Hope this helps.
Regards, Mike C