Hi William,

I haven't seen any general answers to your original question so I will take 
a shot at it.

Disclaimer:  Some of this discussion may infringe on the religious bent of 
certain programming cults.  This author has no desire to challenge any 
deeply held beliefs.

The reason that classes were born IMHO is basically three fold 
encapsulation, reuse, and inheritance.
encapsulation allows you to create variables and functions that are only 
recognized within the context of the instance of a class you have 
created.  In Lingo you can create a class, or parent script in lingo 
parlance, properties and functions created within the class are referenced 
only through the class.  This means that you can have multiple classes and 
use the same names for functions and properties unambiguously.  It also 
means that each instance you create can have its own values for the classes 
properties. Reuse means that once you have developed and debugged a class 
you can create instances of it without worrying about introducing new 
errors.  Inheritance means that one class can be based on another the new 
class has the properties and methods of the parent class, or super class 
plus whatever new properties and methods are made available in the new class.

This is a very rough thumbnail sketch of classes and why we use them.  In 
the example below I have not used inheritance but have show the basics of 
classes.
--------------------------------------------------------
-- member name: foo
--------------------------------------------------------
property val

On new me
     val = "foo"
     return me
end

On Set me, v
     val = v
end

On Get me
     return val
end


--------------------------------------------------------
-- member name: bar
--------------------------------------------------------
property val

On new me
     val = "bar"
     return me
end

On Set me, v
     val = v
end

On Get me
     return val
end


--------------------------------------------------------
-- Message window
--------------------------------------------------------

f1 = new(script "foo")

f2 = new(script "foo")

f2.set(10)

b1 = new(script "bar")

put f1.Get()
-- "foo"

put f2.Get()
-- 10

put b1.Get()
-- "bar"


In summary, your friend is right fully understanding all this takes time 
and experience.

Mark M. Henwood







At 07:38 AM 12/26/2001 -0500, you wrote:

>No need to appologize, you are saving me countless hours of trying to
>figure this out on my own. I have pretty much taurgt myself all that I know
>sbout programming with a degree of success, but I had a feeling this was
>something I needed to get more insight on before I wasted time with code
>that I couldn't use.
>
>Thanks again,
>william m-
>
>Quoting Irv Kalb <[EMAIL PROTECTED]>:
>
> > Sorry for the typo.  Here it is:
> >
> >    http://www.furrypants.com/loope
> >
> > Irv
>
>
>[To remove yourself from this list, or to change to digest mode, go to
>http://www.penworks.com/lingo-l.cgi  To post messages to the list,
>email [EMAIL PROTECTED]  (Problems, email [EMAIL PROTECTED])
>Lingo-L is for learning and helping with programming Lingo.  Thanks!]





At 07:38 AM 12/26/2001 -0500, you wrote:

>No need to appologize, you are saving me countless hours of trying to
>figure this out on my own. I have pretty much taurgt myself all that I know
>sbout programming with a degree of success, but I had a feeling this was
>something I needed to get more insight on before I wasted time with code
>that I couldn't use.
>
>Thanks again,
>william m-
>
>Quoting Irv Kalb <[EMAIL PROTECTED]>:
>
> > Sorry for the typo.  Here it is:
> >
> >    http://www.furrypants.com/loope
> >
> > Irv
>
>
>[To remove yourself from this list, or to change to digest mode, go to
>http://www.penworks.com/lingo-l.cgi  To post messages to the list,
>email [EMAIL PROTECTED]  (Problems, email [EMAIL PROTECTED])
>Lingo-L is for learning and helping with programming Lingo.  Thanks!]
At 07:38 AM 12/26/2001 -0500, you wrote:

>No need to appologize, you are saving me countless hours of trying to
>figure this out on my own. I have pretty much taurgt myself all that I know
>sbout programming with a degree of success, but I had a feeling this was
>something I needed to get more insight on before I wasted time with code
>that I couldn't use.
>
>Thanks again,
>william m-
>
>Quoting Irv Kalb <[EMAIL PROTECTED]>:
>
> > Sorry for the typo.  Here it is:
> >
> >    http://www.furrypants.com/loope
> >
> > Irv
>
>
>[To remove yourself from this list, or to change to digest mode, go to
>http://www.penworks.com/lingo-l.cgi  To post messages to the list,
>email [EMAIL PROTECTED]  (Problems, email [EMAIL PROTECTED])
>Lingo-L is for learning and helping with programming Lingo.  Thanks!]


[To remove yourself from this list, or to change to digest mode, go to
http://www.penworks.com/lingo-l.cgi  To post messages to the list,
email [EMAIL PROTECTED]  (Problems, email [EMAIL PROTECTED])
Lingo-L is for learning and helping with programming Lingo.  Thanks!]

Reply via email to