[Gambas-user] Parsing through all controls of a form
Rob Kudla
sourceforge-raindog2 at ...94...
Thu Jan 19 21:06:59 CET 2006
On Thu January 19 2006 12:30, johnf wrote:
> the moment I'm storing information in the tag property to help
> build a "Update" string for SQL Update strings. So I can have
> a general class that can build the SQL Update string when the
> user clicks my save button. Pass the routine a "window" and
> have the routine loop through the control and build the
> string. I'm not using "edit" or any of the Gambas SQL
> resultset routines - exec everything. So if I had just one
> more property I would not have to have a strange parsing
> routine.
Well, if you'd rather not set up a collection for each control,
why not use the tag as a key for as many different collections
as you need?
I agree that it would be easier to just be able to type stuff
into a bunch of custom properties at design time (though I don't
do that myself because I try to keep the presentation and the
logic separate, as good coding style dictates) and it would
probably be possible with the advent of user-created controls to
subclass the controls you need, adding as many custom properties
as you need.
But maybe what we really need is some capability in the IDE to
support storing a collection in the tag, and editing that
collection at design time. I don't think it would be hard to do
that, though you'd have to generate code to be stored in
a .class file and not a .form file (unless we changed the
compiler too, and I don't think I'm up to that.)
Rob
More information about the User
mailing list