On Thu, 27 Nov 2014, T Lee Davidson wrote: > Wow. That is a very good explanation. Thank you, Tobi! > > I did understand that "a form is by default its own event observer". But > I guess I did not fully understand exactly what that meant. > > (And, yes, I have seen code like, "Public Sub Form_Open()", and always > wondered why it did not say "Form1_Open()".) > > I thought, when I first asked, that it would be a simple answer. (I > apologize to you, Stephen, for unintentionally hi-jacking your thread. I > did think you were done with it.) > > Okay, so: > 1. Should that warning actually say, "Unless ~Class~ is a > [Form](/comp/gb.qt4/form), if you forget to specify the ~Name~ part, > your object will never raise events!" >
Well, I'm not going to adjoin that extra information about the internals of some class in gb.qt4 seemlessly to a sentence that makes a warning about a very general case -- in the mostly component-agnostic part of the documen- tation, that is the Gambas language documentation. Granted, Form is a prominent special case, so I'll add another section talking about what happens when you use the "As name" syntax when creating forms. If someone has a problem with that, please tell me. > 2. And, should this explanation be put on the Wiki somewhere? If so, where? > Hmm, comp/gb.qt4/form already says the entire truth -- if you know what all the words mean. But doc/object-model or even def/eventhandler may be places where more detailed information may be put but still far from good... [ I drift off a little from here on: ] 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). 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. But don't listen to me because I know quite exactly already what's where in the docs. And people who got somewhere tend to forget how hard the way may have been or want others to go the same way... I feel like articles like the Gambas Magazine tries to publish are a *way* better platform for this kind of information -- backgrounds that are not of a purely technical manner (which would be the domain of a documentation) but are grown from experience and a good overview of Gambas. Regards, Tobi -- "There's an old saying: Don't change anything... ever!" -- Mr. Monk ------------------------------------------------------------------------------ Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server from Actuate! Instantly Supercharge Your Business Reports and Dashboards with Interactivity, Sharing, Native Excel Exports, App Integration & more Get technology previously reserved for billion-dollar corporations, FREE http://pubads.g.doubleclick.net/gampad/clk?id=157005751&iu=/4140/ostg.clktrk _______________________________________________ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user