[Gambas-user] Questions
Rob
sourceforge-raindog2 at ...94...
Tue Dec 23 14:59:46 CET 2003
On Tuesday 23 December 2003 11:52, Ken Schrock wrote:
> How does one do a character array or string array here?
BASIC style:
dim score[35] as String
Java style:
dim score as new String[]
The former are static (no REDIM) but are multi-dimensional.
The latter are dynamic, but you have to add elements before
referring to them (e.g.
for i = 1 to 35
score.add "default value"
next
)... of course, you can simulate multidimensionality in the
dynamic ones by making an array of objects and assigning an
array of strings to each object.... and there's also
collections, which are like a special case of array where the
keys are variants.
See also:
http://www.binara.com/gambas-wiki/bin/view/Gambas/HowDoIMakeMultidimensionalArray
> Also, I need to check a textbox for a return key press
> I tried
>
> PUBLIC SUB TextBox1_KeyPress(Ascii AS String, Code AS Integer,
> State AS Integer)
The KeyPress and KeyRelease events have changed.... they take no
parameters now, but you can just do this inside them:
IF Key.Code = Key.Return THEN
Run_Button_Click()
ENDIF
It's in the new documentation, but of course there are other
issues with the new documentation I need to work out (and in
fact I need to re-export for 0.74 over the holidays.)
> But no workee
I haven't seen that error message before. When did it come up
exactly? ;)
Rob
More information about the User
mailing list