On Mar 9, 2007, at 8:58 AM, VGSoftware wrote:

>> How did a dropdown list get a Name like 'dTextBox6'? ;-)
>
> It does if you copy the declaration of a dTextBox and forget to change
> it :-D

        Thought so!

> I'm using class designer to generate the initial mockup of the  
> forms and
> changing/editing the cdxml and -code.py files by hand..., i have  
> lots of
> similar forms so i find this method faster, it also gives me a greater
> grip of what is going on behind....
>
> ClassDesigner is great...but nothing beats good old vim, sorry :-P

        That's the idea behind making these two-way tools: you can work with  
them however you like.

> As for the combobox problem, i eventually figured it out, with the  
> help
> of the wiki link you gave me....
> I suggest a change in the wiki referring the fact you must add code to
> the afterInit method...
> It is obvious now how it works, but i was looking for a way to let the
> combobox do the "dirty work", something like this:
>
> dCombobox.Query = "SELECT id, name FROM mytable"
> dCombobox.BoundColumn = 0
>
> or
>
> dCombobox.listDataSet = listDataSet
> dCombobox.BoundColumn = 0
>
> so i found it quite strange to have to load Choices and Keys by  
> hand....

        While I don't like the idea of a dumb form control knowing how to  
write SQL statements, I do understand your point; there is certainly  
room here for additional automation. I'll have to think about this a  
bit, since there are several ways this could work.

> when i saw that getAvailableTypes was not an overwritten method as i
> initially considered it was quite obvious how things should work,  
> sorry
> for wasting your time...

        That's always the danger of providing examples: people assume that  
that's the *only* way to do something, instead of one of any number  
of possible ways.

        And you're not wasting my time. You've given me some good ideas, and  
I'm sure also helped others who might have had the same impression.

> BTW, i used the form's afterInitAll method, not the combobox  
> afterInit,
> works like a charm....

        I believe that when that wiki page was written, afterInitAll()  
didn't exist. I just got tired of always using the callAfter()  
construct in the form's afterInit() to do stuff at the form level  
that relied on its contents already having been created that I came  
up with that method as a better solution.

-- Ed Leafe
-- http://leafe.com
-- http://dabodev.com



_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-users

Reply via email to