[Gambas-user] Parsing through all controls of a form

johnf jfabiani at ...1109...
Thu Jan 19 19:36:45 CET 2006


On Thursday 19 January 2006 10:18, Rob Kudla wrote:
> On Thu January 19 2006 13:09, Rob Kudla wrote:
> > This was also the case in VB, but since a number of the things
> > we commonly do in Gambas with the tag property (control name,
> > index or other identifier for when we're iterating over the
> > controls on the form) are available through other means in VB,
> > most developers just treat it as a string.
>
> I just found out that the reason most developers treat it as a
> string is that a bug in VB prevented them from assigning an
> object reference to the Tag property.  So in effect, it really
> was just a string.  Gambas for the win once again.
>
> Rob

Yes I understood that I could put a collection in the tag property.  But then 
that requires that I setup the collection. I was considering something like 
that when I realized that I had to write code for each control and it was 
much easier to just type something into the tag property at design time. What 
I did not realize was I was going to need a strange parsing routine to get 
all the useful info back out.  Currently I'm using the spilt routine (which 
is very fast) and the looping through the array.  So would it have been 
better to use a collection? - maybe!  At this point I'm reconsidering the 
issue.  With a collection I could use .Updatestr = "Set custno = 
editfield1.Text" (or something like that) along with other details that could 
be made available.  Just learning how to use Gambas everyday.

John

John




More information about the User mailing list