DWUTKA at marlow.com
DWUTKA at marlow.com
Mon Jun 12 10:41:44 CDT 2006
Have you ever taught before Lambert? We had a few people request a demo. If I started off with all of everything in the first lesson, most people wouldn't pick it up, in fact, they would probably shy away, and stick with even less 'mature' coding. You have to learn to crawl before you can walk. If I had given them their first class module with a thousand lines of code, they'd run away. I give them their first class with a few lines of code, and they can go 'gosh, that was simple', and it pulls them into the lesson. I do not like your comparison of that class to using a goto statement in a while loop. Not even close. Yes, it's simplified, but it did EXACTLY what it was supposed to do, and was not BAD programming, just beginning programming. Putting in Get and Let statements, with a class level module dimensioned would actually just be wasted lines of code in this demo project. Waste not, want not. Drew -----Original Message----- From: Heenan, Lambert [mailto:Lambert.Heenan at aig.com] Sent: Monday, June 12, 2006 8:16 AM To: 'Access Developers discussion and problem solving' Subject: Re: [AccessD] Basic Unbound Form with Classes and Collections Par t1. Sorry. But I'd say it's a silly class. You might as well try to teach people how to code in "Basic Basic" by pointing out how Goto can be used to circumventing the carefully design flow of a execution that loop structures provide. You can Goto out of a While loop, but it's not advisable if you want maintainable code. Lambert -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Charlotte Foust Sent: Friday, June 09, 2006 5:19 PM To: Access Developers discussion and problem solving Subject: Re: [AccessD] Basic Unbound Form with Classes and Collections Par t1. This is a simplified class, Lambert. In fact, any public variable in a class is a property of the class. You just can't control the usage of that property. I'm sure Drew will get to the "proper" approach later. ;o} Charlotte -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Heenan, Lambert Sent: Friday, June 09, 2006 2:01 PM To: 'Access Developers discussion and problem solving' Subject: Re: [AccessD] Basic Unbound Form with Classes and Collections Par t1. <snip> Our table has three fields, so we'll create three easy properties, and a fourth which will be derived. So, in the code page type the following under the 'Option Compare Database' line: Public ID As Long Public FirstName As String Public LastName As String [ These are not properties at all, they are class member fields, and making them public is a Q&D solution which defeats the purpose of data encapsulation that classes offer. A real property Get and Set pair would correct this, with the member fields being change to Private] Lambert -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com