DWUTKA at marlow.com
DWUTKA at marlow.com
Mon Jun 12 19:25:20 CDT 2006
A class object with custom events. If you want multiple objects to 'see' that/those event(s), then you have to declare it globally. Putting it as a property of a form and keeping that form open is just a hackneyed way of creating a global variable. (And is pretty stupid, because if that form isn't needed, it's a waste of resources to keep it open for a class that could be kept open on it's own.) Drew -----Original Message----- From: Josh McFarlane [mailto:darsant at gmail.com] Sent: Monday, June 12, 2006 4:18 PM To: Access Developers discussion and problem solving Subject: Re: [AccessD] Class Rebuttal was: Basic Unbound Form ... I'd be interested in seeing this instance where an unprotected global variable has to exist. Josh On 6/12/06, DWUTKA at marlow.com <DWUTKA at marlow.com> wrote: > Well Lambert, I'm glad you didn't write the MSDN, because if I had to wade > through this kind of logic to learn what I have, I would probably go back to > being a mechanic. > > First of all, "But not as much of a waste of time as the process of > explaining later on why public members fields have drawbacks.", they don't > have drawbacks, they have limitations, which I explained. I made it very > obvious that a Public declaration is the same as a BASIC Get/Let statement. > BASIC!!!! You can't put logic into a Public declaration, but you can with a > Get/Let statement, which would no longer be a 'BASIC' Get/Let statement. > > Next, "but globals are bad news in any context", not this again. Public > variables are not BUGGY, nor are they 'bad news'. They have a purpose, that > is why they are there in the first place. The are things that you can do > with a public variable that are simply nightmares to try and do without. In > the advanced demo, I will show a method of public declaration which I'd LOVE > to see you duplicate in another manner. > > As far as data encapsulation, look, if you build every class to go far > beyond what you need it for, you're wasting time. I have a pretty flexible > job, but even I don't over-program that much. If all you need is a place > holder for a value, then just put a place holder for the value. Not a lot > of lines, eh? Let's look at that. -- Josh McFarlane "Peace cannot be kept by force. It can only be achieved by understanding." -Albert Einstein -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com