[Gambas-user] Documentation: Events not firing in dynamically instantiated forms.

T Lee Davidson t.lee.davidson at ...626...
Fri Nov 28 00:27:30 CET 2014


On 11/27/2014 04:02 PM, Tobias Boege wrote:
> Hmm, comp/gb.qt4/form already says the entire truth -- if you know what all
> the words mean.

All comp/gb.qt4/form says about events is:
===
Event management

By default, a form is its own event observer.

It means that all the events raised by the Form object are caught by 
event handlers defined in the form source code.
===

It does not say anything about the change in event observer when 
instantiating a form AS FormWhatever. So, to me, not the entire truth.


> I must admit that I don't really care: I think I understand what happens to
> a good extent and if someone asks the question again, I can pull of the
> explanation again (or more likely I'll link to this thread).

Rhetorically, wouldn't it be nice, though, if someone didn't *have* to ask?


> If everything was in the docs, what fun would there be in learning [ being
> able to discover things on your own over time ] ?;-)  It's at least what I
> enjoy most.

Lol. Yes, discovering and learning can be fun.

But, I think it is more fun to learn how to do something with the tools 
at hand than having to learn the special nuances of any particular tool.

As a farmer, I sometimes have to make a tool to get the job done. Do I 
enjoy that? Well, I enjoy making things. But I do not enjoy feeling 
robbed of my productive time.

Not knowing that instantiating a form As FormWhatever overrides the 
default event handler could be a "gotcha" for someone who is not as 
knowledgeable as you, as Stephen found out.

And, "As Name" is a feature of the Gambas language implementation. So, 
in my opinion, the appropriate venue for documenting this behavior would 
not be in a GambasMag article.

But, whatever. I was just looking to try to make things better for others.


-- 
Lee
__________

"Artificial Intelligence is no match for natural stupidity."




More information about the User mailing list