[Gambas-user] Gambas Help - PLEASE - Object Arrays - Need help ASAP
Stefano Palmeri
rospolosco at ...152...
Thu Nov 6 13:16:13 CET 2008
Il giovedì 6 novembre 2008 13:05:42 Robert Moss ha scritto:
> Hello, I am fairly new to GAMBAS but a experienced in C++ and VB 6. I am
> trying to create an array of sockets, so that I can maintain a dynamic
> number of connections, and use the same code for each.
>
> I've been struggling for HOURS searching for the answer on google, and
> trying as much different code as I can think of, experimenting, but to no
> avail. I can create the objects, but I can't figure out how to receive
> messages from them (actually I can't figure out how to distinguish them).
>
> A simpler example with buttons: This works, but I need to know WHICH
> button fired the event,
>
> PUBLIC SUB Form_Open()
>
> DIM btns[2] AS Button
>
> btns[0] = NEW Button(FMain) AS "btns"
>
> btns[0].Caption = "Test"
> btns[0].Left = 50
> btns[0].Top = 50
> btns[0].Show
>
> btns[1] = NEW Button(FMain) AS "btns"
>
> btns[1].Caption = "Test 2"
> btns[1].Left = 150
> btns[1].Top = 50
>
> btns[1].Show
>
> END
>
> PUBLIC SUB btns_Click()
> Message.Info("augh: ")
> END
> ' using PUBLIC SUB btns_Click(Index as Integer) doesnt work
> ' nor does PUBLIC SUB btns[key]_Click()
>
> 'also, using the current function, I tried maybe Message.Info("ID: " &
> btns.Id) or ANYTHING
>
> This functionality is CRUCIAL please help asap.
>
> -Robert
> -------------------------------------------------------------------------
> This SF.Net email is sponsored by the Moblin Your Move Developer's
> challenge Build the coolest Linux based applications with Moblin SDK & win
> great prizes Grand prize is a trip for two to an Open Source event anywhere
> in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/
> _______________________________________________
> Gambas-user mailing list
> Gambas-user at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/gambas-user
PUBLIC SUB btns_Click()
Message.Info("augh: ")
PRINT LAST.Caption
END
More information about the User
mailing list