In the spirit of sharing what I've learned in converting code to Lasso 9 as I learn it

classic Classic list List threaded Threaded
12 messages Options
Reply | Threaded
Open this post in threaded view
|

In the spirit of sharing what I've learned in converting code to Lasso 9 as I learn it

Tami Williams-3
I need examples for this section of the Lasso Docs

http://docs9.lassosoft.com/Lasso%209%20Server/003%20Language%20Guide/002%20Programming%20Fundamentals/001%20Types%20&%20Objects/index.lasso


Can anyone tell me if this is correct?  Explaing Types, Data Members,  
Member Methods, Inheritance and Traits using an ARRAY as an example?

Thanks in advance.

And yes, I know the docs have sections on all of the above but I'm  
asking for something specific - an example using an array because  
reading the docs isn't helping me.



1. Types, Data Members, Member Methods:

Member methods are things you can do to that type object.

An array is a object of type array that can contain many values.
Array objects have the $thisArrray->Insert member method.
Each element of an array is a data member.

The integer 1 is an object of type integer containing the value 1.
The integer 1 contains the data member 1.
The integer 1 has the member methods ->isA, ->asString, +.


2. Inheritance

"If a method defined in a type conflicts with a method defined in its  
parent, then the method defined in the type will replace that of its  
parent. This is known as overriding the parent method."

How would one do this?
If an array is an object of type array then isn't the parent type for  
array, array?
What methods does the array type define?


3. Traits
???




~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
"It's better to burn out than to fade away."

Tami Williams
Creative Computing
Let us help you make frustrating, costly, and inefficient processes  
more efficient, less costly and scalable.
FileMaker and Lasso specialists.

Tel: 770.457.3221
Fax: 770.454.7419
E-Mail: [hidden email]
Web: http://www.asktami.com/
LinkedIn: http://www.linkedin.com/in/asktami
Twitter: http://twitter.com/asktami
iChat/AIM/Skype: tamiwilliamsusa

FileMaker Solutions Alliance Associate | Lasso Professional Alliance  
Member

------

If you want to receive sporadic email from Creative Computing  
regarding news at the company and announcements about upcoming Lasso  
webinars and online classes, please opt-in at http://tinyurl.com/yj7eqlg


--
This list is a free service of LassoSoft: http://www.LassoSoft.com/
Search the list archives: http://www.ListSearch.com/Lasso/Browse/
Manage your subscription: http://www.ListSearch.com/Lasso/


Reply | Threaded
Open this post in threaded view
|

Re: In the spirit of sharing what I've learned in converting code to Lasso 9 as I learn it

Tami Williams-3
It seems like the Lasso 9 docs require that you do supplemental  
reading on object oriented programming before reading them.

That sucks.

I now think that this
>
> 2. Inheritance
>
> "If a method defined in a type conflicts with a method defined in  
> its parent, then the method defined in the type will replace that of  
> its parent. This is known as overriding the parent method."

means that  if there is a member method ->Type that works on arrays  
and strings and maps and you use it on an array then the array member  
method ->Type is what's being used when you do $myArray->Type instead  
of the string->type or map->type member method.

Is that correct?  If so, why couldn't the docs just say that?  Or also  
say that as an example?

Another issue - the defining types section at
http://docs9.lassosoft.com/Lasso%209%20Server/003%20Language%20Guide/002%20Programming%20Fundamentals/080%20Defining%20Types/index.lasso

My first thought is, if an array is a type of object, the way type  
definition is described doesn't explain to me how to define an array  
type.  Is there more than one kind of type? Do they have different  
names?  Is an array type something totally different from the "person"  
type used in the example?  How?  Why?   Is the "person" type in the  
example kind of like creating a "person" table in a database where you  
create a table "person" with fields "firstName", "lastName" and when  
you define the fields you say if they're string or integer fields?  If  
that's true, why not say that - anywhere?

Frustrated and venting to the list.

Thanks in advance.



On Aug 8, 2010, at 7:58 PM, Tami Williams wrote:

> I need examples for this section of the Lasso Docs
>
> http://docs9.lassosoft.com/Lasso%209%20Server/003%20Language%20Guide/002%20Programming%20Fundamentals/001%20Types%20&%20Objects/index.lasso
>
>
> Can anyone tell me if this is correct?  Explaing Types, Data  
> Members, Member Methods, Inheritance and Traits using an ARRAY as an  
> example?
>
> Thanks in advance.
>
> And yes, I know the docs have sections on all of the above but I'm  
> asking for something specific - an example using an array because  
> reading the docs isn't helping me.
>
>
>
> 1. Types, Data Members, Member Methods:
>
> Member methods are things you can do to that type object.
>
> An array is a object of type array that can contain many values.
> Array objects have the $thisArrray->Insert member method.
> Each element of an array is a data member.
>
> The integer 1 is an object of type integer containing the value 1.
> The integer 1 contains the data member 1.
> The integer 1 has the member methods ->isA, ->asString, +.
>
>
> 2. Inheritance
>
> "If a method defined in a type conflicts with a method defined in  
> its parent, then the method defined in the type will replace that of  
> its parent. This is known as overriding the parent method."
>
> How would one do this?
> If an array is an object of type array then isn't the parent type  
> for array, array?
> What methods does the array type define?
>
>
> 3. Traits
> ???
>
>
>
>
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> "It's better to burn out than to fade away."
>
> Tami Williams
> Creative Computing
> Let us help you make frustrating, costly, and inefficient processes  
> more efficient, less costly and scalable.
> FileMaker and Lasso specialists.
>
> Tel: 770.457.3221
> Fax: 770.454.7419
> E-Mail: [hidden email]
> Web: http://www.asktami.com/
> LinkedIn: http://www.linkedin.com/in/asktami
> Twitter: http://twitter.com/asktami
> iChat/AIM/Skype: tamiwilliamsusa
>
> FileMaker Solutions Alliance Associate | Lasso Professional Alliance  
> Member
>
> ------
>
> If you want to receive sporadic email from Creative Computing  
> regarding news at the company and announcements about upcoming Lasso  
> webinars and online classes, please opt-in at http://tinyurl.com/yj7eqlg
>
>
> --
> This list is a free service of LassoSoft: http://www.LassoSoft.com/
> Search the list archives: http://www.ListSearch.com/Lasso/Browse/
> Manage your subscription: http://www.ListSearch.com/Lasso/
>
>


--
This list is a free service of LassoSoft: http://www.LassoSoft.com/
Search the list archives: http://www.ListSearch.com/Lasso/Browse/
Manage your subscription: http://www.ListSearch.com/Lasso/


Reply | Threaded
Open this post in threaded view
|

Re: In the spirit of sharing what I've learned in converting code to Lasso 9 as I learn it

stevepiercy
In reply to this post by Tami Williams-3
This article from LassoTech is an excellent primer on object
oriented programming and how the particular Lasso 8.5 terms map
to OOP terms.

http://www.lassotech.com/Lasso%20Object%20Oriented%20Programming%20Primer

The section on Terminology is a nice quick reference.

http://www.lassotech.com/Lasso%20Object%20Oriented%20Programming%20Primer#Terminology

This article has not yet been migrated to the Lasso Wiki, but I
just now created a page to hold its contents.

https://lassosoft.wiki.zoho.com/Object-Oriented-Programming-Primer-for-Lasso.html

Feel free to request new pages for the wiki, too.

--steve


On 8/8/10 at 7:58 PM, [hidden email] (Tami Williams) pronounced:

>I need examples for this section of the Lasso Docs
>
><a href="http://docs9.lassosoft.com/Lasso%209%20Server/003%20Language%20Guide/002%">http://docs9.lassosoft.com/Lasso%209%20Server/003%20Language%20Guide/002%
>20Programming%20Fundamentals/001%20Types%20&%20Objects/index.lasso
>
>
>Can anyone tell me if this is correct?  Explaing Types, Data
>Members, Member Methods, Inheritance and Traits using an ARRAY
>as an example?
>
>Thanks in advance.
>
>And yes, I know the docs have sections on all of the above but
>I'm asking for something specific - an example using an array
>because reading the docs isn't helping me.
>
>
>
>1. Types, Data Members, Member Methods:
>
>Member methods are things you can do to that type object.
>
>An array is a object of type array that can contain many values.
>Array objects have the $thisArrray->Insert member method.
>Each element of an array is a data member.
>
>The integer 1 is an object of type integer containing the value 1.
>The integer 1 contains the data member 1.
>The integer 1 has the member methods ->isA, ->asString, +.
>
>
>2. Inheritance
>
>"If a method defined in a type conflicts with a method defined
>in its parent, then the method defined in the type will replace
>that of its parent. This is known as overriding the parent method."
>
>How would one do this?
>If an array is an object of type array then isn't the parent type for array, array?
>What methods does the array type define?
>
>
>3. Traits
>???
>
>
>
>
>~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>"It's better to burn out than to fade away."
>
>Tami Williams
>Creative Computing
>Let us help you make frustrating, costly, and inefficient
>processes more efficient, less costly and scalable.
>FileMaker and Lasso specialists.
>
>Tel: 770.457.3221
>Fax: 770.454.7419
>E-Mail: [hidden email]
>Web: http://www.asktami.com/
>LinkedIn: http://www.linkedin.com/in/asktami
>Twitter: http://twitter.com/asktami
>iChat/AIM/Skype: tamiwilliamsusa
>
>FileMaker Solutions Alliance Associate | Lasso Professional Alliance Member
>
>------
>
>If you want to receive sporadic email from Creative Computing
>regarding news at the company and announcements about upcoming
>Lasso webinars and online classes, please opt-in at http://tinyurl.com/yj7eqlg
>
>
>--
>This list is a free service of LassoSoft: http://www.LassoSoft.com/
>Search the list archives: http://www.ListSearch.com/Lasso/Browse/
>Manage your subscription: http://www.ListSearch.com/Lasso/
>
>

-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
-- --
Steve Piercy               Web Site Builder              
Soquel, CA
<[hidden email]>                  <http://www.StevePiercy.com/>


--
This list is a free service of LassoSoft: http://www.LassoSoft.com/
Search the list archives: http://www.ListSearch.com/Lasso/Browse/
Manage your subscription: http://www.ListSearch.com/Lasso/


Reply | Threaded
Open this post in threaded view
|

Re: In the spirit of sharing what I've learned in converting code to Lasso 9 as I learn it

bfr00
Small quibble, shouldn't $t be $t1.

"// $t is your twitter type instance, which is an object"

On Aug 8, 2010, at 5:32 PM, Steve Piercy - Web Site Builder wrote:

> This article from LassoTech is an excellent primer on object oriented programming and how the particular Lasso 8.5 terms map to OOP terms.
>
> http://www.lassotech.com/Lasso%20Object%20Oriented%20Programming%20Primer
>
> The section on Terminology is a nice quick reference.
>
> http://www.lassotech.com/Lasso%20Object%20Oriented%20Programming%20Primer#Terminology


--
This list is a free service of LassoSoft: http://www.LassoSoft.com/
Search the list archives: http://www.ListSearch.com/Lasso/Browse/
Manage your subscription: http://www.ListSearch.com/Lasso/


Reply | Threaded
Open this post in threaded view
|

Re: In the spirit of sharing what I've learned in converting code to Lasso 9 as I learn it

stevepiercy
In reply to this post by Tami Williams-3
I can relate to your frustration.  I went through the same process.

Here are some really good resources helped me understand OOP.

* Lasso Professional 8.5 Language Guide Chapters on Custom Tags
and Custom Types
* L-Unit
http://www.l-unit.org/
* L-Debug
http://www.l-debug.org/
* "The Demystification of Lasso Custom Types"
http://tagswap.net/articles/The_Demystification_of_Lasso_Custom_Types/

Note that all of these resources are written from an 8.5
perspective, so they use 8.5 terms for OOP stuff.  But combined
with the aforementioned Terminology section of the LassoTech
article, you have a solid reference library.

To be honest, it did not sink into my thick skull until about 2
years ago.  Persistence will pay off.  The biggest hurdle is
purely mental.  Instead of thinking in procedural code (step 1,
step 2, ... step N), think of creating an object and doing stuff
to that object.  Once I understood that concept, then the
heavens parted and I heard angels sing.

In fact, Lasso's tags *are* OOP, but most people never realize
they are using OOP.  Lasso's PDF tags are a good example of OOP
in that you must first create an object (e.g., pdf_doc), then
create other objects (e.g., pdf_text) and add those objects to
the pdf_doc object.

Hope that helps.

--steve


On 8/8/10 at 8:21 PM, [hidden email] (Tami Williams) pronounced:

>It seems like the Lasso 9 docs require that you do supplemental
>reading on object oriented programming before reading them.
>
>That sucks.
>
>I now think that this
>>
>>2. Inheritance
>>
>>"If a method defined in a type conflicts with a method defined
>>in its parent, then the method defined in the type will
>>replace that of its parent. This is known as overriding the
>>parent method."
>
>means that  if there is a member method ->Type that works on
>arrays and strings and maps and you use it on an array then the
>array member method ->Type is what's being used when you do
>$myArray->Type instead of the string->type or map->type member method.
>
>Is that correct?  If so, why couldn't the docs just say that?  
>Or also say that as an example?
>
>Another issue - the defining types section at
><a href="http://docs9.lassosoft.com/Lasso%209%20Server/003%20Language%20Guide/002%">http://docs9.lassosoft.com/Lasso%209%20Server/003%20Language%20Guide/002%
>20Programming%20Fundamentals/080%20Defining%20Types/index.lasso
>
>My first thought is, if an array is a type of object, the way
>type definition is described doesn't explain to me how to
>define an array type.  Is there more than one kind of type? Do
>they have different names?  Is an array type something totally
>different from the "person" type used in the example?  How?  
>Why?   Is the "person" type in the example kind of like
>creating a "person" table in a database where you create a
>table "person" with fields "firstName", "lastName" and when you
>define the fields you say if they're string or integer fields?  
>If that's true, why not say that - anywhere?
>
>Frustrated and venting to the list.
>
>Thanks in advance.
>
>
>
>On Aug 8, 2010, at 7:58 PM, Tami Williams wrote:
>
>>I need examples for this section of the Lasso Docs
>>
>><a href="http://docs9.lassosoft.com/Lasso%209%20Server/003%20Language%20Guide/002%">http://docs9.lassosoft.com/Lasso%209%20Server/003%20Language%20Guide/002%
>20Programming%20Fundamentals/001%20Types%20&%20Objects/index.lasso
>>
>>
>>Can anyone tell me if this is correct?  Explaing Types, Data
>>Members, Member Methods, Inheritance and Traits using an ARRAY
>>as an example?
>>
>>Thanks in advance.
>>
>>And yes, I know the docs have sections on all of the above but
>>I'm asking for something specific - an example using an array
>>because reading the docs isn't helping me.
>>
>>
>>
>>1. Types, Data Members, Member Methods:
>>
>>Member methods are things you can do to that type object.
>>
>>An array is a object of type array that can contain many values.
>>Array objects have the $thisArrray->Insert member method.
>>Each element of an array is a data member.
>>
>>The integer 1 is an object of type integer containing the value 1.
>>The integer 1 contains the data member 1.
>>The integer 1 has the member methods ->isA, ->asString, +.
>>
>>
>>2. Inheritance
>>
>>"If a method defined in a type conflicts with a method defined
>>in its parent, then the method defined in the type will
>>replace that of its parent. This is known as overriding the
>>parent method."
>>
>>How would one do this?
>>If an array is an object of type array then isn't the parent
>>type for array, array?
>>What methods does the array type define?
>>
>>
>>3. Traits
>>???
>>
>>
>>
>>
>>~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>>"It's better to burn out than to fade away."
>>
>>Tami Williams
>>Creative Computing
>>Let us help you make frustrating, costly, and inefficient
>>processes more efficient, less costly and scalable.
>>FileMaker and Lasso specialists.
>>
>>Tel: 770.457.3221
>>Fax: 770.454.7419
>>E-Mail: [hidden email]
>>Web: http://www.asktami.com/
>>LinkedIn: http://www.linkedin.com/in/asktami
>>Twitter: http://twitter.com/asktami
>>iChat/AIM/Skype: tamiwilliamsusa
>>
>>FileMaker Solutions Alliance Associate | Lasso Professional
>>Alliance Member
>>
>>------
>>
>>If you want to receive sporadic email from Creative Computing
>>regarding news at the company and announcements about upcoming
>>Lasso webinars and online classes, please opt-in at http://tinyurl.com/yj7eqlg
>>
>>
>>--
>>This list is a free service of LassoSoft: http://www.LassoSoft.com/
>>Search the list archives: http://www.ListSearch.com/Lasso/Browse/
>>Manage your subscription: http://www.ListSearch.com/Lasso/
>>
>>
>
>
>--
>This list is a free service of LassoSoft: http://www.LassoSoft.com/
>Search the list archives: http://www.ListSearch.com/Lasso/Browse/
>Manage your subscription: http://www.ListSearch.com/Lasso/
>
>

-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
-- --
Steve Piercy               Web Site Builder              
Soquel, CA
<[hidden email]>                  <http://www.StevePiercy.com/>


--
This list is a free service of LassoSoft: http://www.LassoSoft.com/
Search the list archives: http://www.ListSearch.com/Lasso/Browse/
Manage your subscription: http://www.ListSearch.com/Lasso/


Reply | Threaded
Open this post in threaded view
|

Re: In the spirit of sharing what I've learned in converting code to Lasso 9 as I learn it

stevepiercy
In reply to this post by bfr00
Indeed it should.  That's the beauty of a wiki,
<FreakingHugeSarahPalinWink>anyone</FreakingHugeSarahPalinWink>
can make corrections.

--steve


On 8/8/10 at 5:46 PM, [hidden email] (Bruce Robertson) pronounced:

>Small quibble, shouldn't $t be $t1.
>
>"// $t is your twitter type instance, which is an object"
>
>On Aug 8, 2010, at 5:32 PM, Steve Piercy - Web Site Builder wrote:
>
>>This article from LassoTech is an excellent primer on object oriented programming
>and how the particular Lasso 8.5 terms map to OOP terms.
>>
>>http://www.lassotech.com/Lasso%20Object%20Oriented%20Programming%20Primer
>>
>>The section on Terminology is a nice quick reference.
>>
>>
>http://www.lassotech.com/Lasso%20Object%20Oriented%20Programming%20Primer#Terminology
>
>
>--
>This list is a free service of LassoSoft: http://www.LassoSoft.com/
>Search the list archives: http://www.ListSearch.com/Lasso/Browse/
>Manage your subscription: http://www.ListSearch.com/Lasso/
>
>

-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
-- --
Steve Piercy               Web Site Builder              
Soquel, CA
<[hidden email]>                  <http://www.StevePiercy.com/>


--
This list is a free service of LassoSoft: http://www.LassoSoft.com/
Search the list archives: http://www.ListSearch.com/Lasso/Browse/
Manage your subscription: http://www.ListSearch.com/Lasso/


Reply | Threaded
Open this post in threaded view
|

Re: In the spirit of sharing what I've learned in converting code to Lasso 9 as I learn it

decorior
In reply to this post by stevepiercy
However, it is a shame that the most important object required for OOP is the object created from a database record which Lasso 9 has missed.

Deco

On Aug 8, 2010, at 6:47 PM, Steve Piercy - Web Site Builder wrote:

> I can relate to your frustration.  I went through the same process.
>
> Here are some really good resources helped me understand OOP.
>
> * Lasso Professional 8.5 Language Guide Chapters on Custom Tags and Custom Types
> * L-Unit
> http://www.l-unit.org/
> * L-Debug
> http://www.l-debug.org/
> * "The Demystification of Lasso Custom Types"
> http://tagswap.net/articles/The_Demystification_of_Lasso_Custom_Types/
>
> Note that all of these resources are written from an 8.5 perspective, so they use 8.5 terms for OOP stuff.  But combined with the aforementioned Terminology section of the LassoTech article, you have a solid reference library.
>
> To be honest, it did not sink into my thick skull until about 2 years ago.  Persistence will pay off.  The biggest hurdle is purely mental.  Instead of thinking in procedural code (step 1, step 2, ... step N), think of creating an object and doing stuff to that object.  Once I understood that concept, then the heavens parted and I heard angels sing.
>
> In fact, Lasso's tags *are* OOP, but most people never realize they are using OOP.  Lasso's PDF tags are a good example of OOP in that you must first create an object (e.g., pdf_doc), then create other objects (e.g., pdf_text) and add those objects to the pdf_doc object.
>
> Hope that helps.
>
> --steve
>
>
> On 8/8/10 at 8:21 PM, [hidden email] (Tami Williams) pronounced:
>
>> It seems like the Lasso 9 docs require that you do supplemental reading on object oriented programming before reading them.
>>
>> That sucks.
>>
>> I now think that this
>>>
>>> 2. Inheritance
>>>
>>> "If a method defined in a type conflicts with a method defined in its parent, then the method defined in the type will replace that of its parent. This is known as overriding the parent method."
>>
>> means that  if there is a member method ->Type that works on arrays and strings and maps and you use it on an array then the array member method ->Type is what's being used when you do $myArray->Type instead of the string->type or map->type member method.
>>
>> Is that correct?  If so, why couldn't the docs just say that?  Or also say that as an example?
>>
>> Another issue - the defining types section at
>> <a href="http://docs9.lassosoft.com/Lasso%209%20Server/003%20Language%20Guide/002%">http://docs9.lassosoft.com/Lasso%209%20Server/003%20Language%20Guide/002%
>> 20Programming%20Fundamentals/080%20Defining%20Types/index.lasso
>>
>> My first thought is, if an array is a type of object, the way type definition is described doesn't explain to me how to define an array type.  Is there more than one kind of type? Do they have different names?  Is an array type something totally different from the "person" type used in the example?  How?  Why?   Is the "person" type in the example kind of like creating a "person" table in a database where you create a table "person" with fields "firstName", "lastName" and when you define the fields you say if they're string or integer fields?  If that's true, why not say that - anywhere?
>>
>> Frustrated and venting to the list.
>>
>> Thanks in advance.
>>
>>
>>
>> On Aug 8, 2010, at 7:58 PM, Tami Williams wrote:
>>
>>> I need examples for this section of the Lasso Docs
>>>
>>> <a href="http://docs9.lassosoft.com/Lasso%209%20Server/003%20Language%20Guide/002%">http://docs9.lassosoft.com/Lasso%209%20Server/003%20Language%20Guide/002%
>> 20Programming%20Fundamentals/001%20Types%20&%20Objects/index.lasso
>>>
>>>
>>> Can anyone tell me if this is correct?  Explaing Types, Data Members, Member Methods, Inheritance and Traits using an ARRAY as an example?
>>>
>>> Thanks in advance.
>>>
>>> And yes, I know the docs have sections on all of the above but I'm asking for something specific - an example using an array because reading the docs isn't helping me.
>>>
>>>
>>>
>>> 1. Types, Data Members, Member Methods:
>>>
>>> Member methods are things you can do to that type object.
>>>
>>> An array is a object of type array that can contain many values.
>>> Array objects have the $thisArrray->Insert member method.
>>> Each element of an array is a data member.
>>>
>>> The integer 1 is an object of type integer containing the value 1.
>>> The integer 1 contains the data member 1.
>>> The integer 1 has the member methods ->isA, ->asString, +.
>>>
>>>
>>> 2. Inheritance
>>>
>>> "If a method defined in a type conflicts with a method defined in its parent, then the method defined in the type will replace that of its parent. This is known as overriding the parent method."
>>>
>>> How would one do this?
>>> If an array is an object of type array then isn't the parent type for array, array?
>>> What methods does the array type define?
>>>
>>>
>>> 3. Traits
>>> ???
>>>
>>>
>>>
>>>
>>> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>>> "It's better to burn out than to fade away."
>>>
>>> Tami Williams
>>> Creative Computing
>>> Let us help you make frustrating, costly, and inefficient processes more efficient, less costly and scalable.
>>> FileMaker and Lasso specialists.
>>>
>>> Tel: 770.457.3221
>>> Fax: 770.454.7419
>>> E-Mail: [hidden email]
>>> Web: http://www.asktami.com/
>>> LinkedIn: http://www.linkedin.com/in/asktami
>>> Twitter: http://twitter.com/asktami
>>> iChat/AIM/Skype: tamiwilliamsusa
>>>
>>> FileMaker Solutions Alliance Associate | Lasso Professional Alliance Member
>>>
>>> ------
>>>
>>> If you want to receive sporadic email from Creative Computing regarding news at the company and announcements about upcoming Lasso webinars and online classes, please opt-in at http://tinyurl.com/yj7eqlg
>>>
>>>
>>> --
>>> This list is a free service of LassoSoft: http://www.LassoSoft.com/
>>> Search the list archives: http://www.ListSearch.com/Lasso/Browse/
>>> Manage your subscription: http://www.ListSearch.com/Lasso/
>>>
>>>
>>
>>
>> --
>> This list is a free service of LassoSoft: http://www.LassoSoft.com/
>> Search the list archives: http://www.ListSearch.com/Lasso/Browse/
>> Manage your subscription: http://www.ListSearch.com/Lasso/
>>
>>
>
> -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
> Steve Piercy               Web Site Builder               Soquel, CA
> <[hidden email]>                  <http://www.StevePiercy.com/>
>
>
> --
> This list is a free service of LassoSoft: http://www.LassoSoft.com/
> Search the list archives: http://www.ListSearch.com/Lasso/Browse/
> Manage your subscription: http://www.ListSearch.com/Lasso/
>
>

Deco Rior
[hidden email]

O:(720) 207-2806
F:(303) 942-7417

TennisSource.Net
software to power your tennis facility


This electronic mail message is intended exclusively for the individual or entity to which it is addressed. This message, together with any attachment, may contain confidential and privileged information.   Any unauthorized review, use, printing, copying, retention, disclosure or distribution is strictly prohibited. If you have received this message in error, please immediately advise the sender by reply email message to the sender and delete all copies of this message. Thank you


--
This list is a free service of LassoSoft: http://www.LassoSoft.com/
Search the list archives: http://www.ListSearch.com/Lasso/Browse/
Manage your subscription: http://www.ListSearch.com/Lasso/


Reply | Threaded
Open this post in threaded view
|

Re: In the spirit of sharing what I've learned in converting code to Lasso 9 as I learn it

jasonhuck
On Sun, Aug 8, 2010 at 8:52 PM, Deco Rior <[hidden email]> wrote:
> However, it is a shame that the most important object required for OOP is the object created from a database record which Lasso 9 has missed.

I appreciate that you hold the opinion that Lasso ought to include a
design pattern similar to Active Record -- it's been discussed here on
the list before -- but in the context of this thread, at best, you're
confusing people who are trying to wrap their heads around OOP.

- jason



--
tagSwap.net :: Open Source Lasso Code
<http://tagSwap.net/>

--
This list is a free service of LassoSoft: http://www.LassoSoft.com/
Search the list archives: http://www.ListSearch.com/Lasso/Browse/
Manage your subscription: http://www.ListSearch.com/Lasso/


Reply | Threaded
Open this post in threaded view
|

Re: In the spirit of sharing what I've learned in converting code to Lasso 9 as I learn it

stevepiercy
In reply to this post by decorior
L9 returns an object of records as an array or map, similar to 8.

However I think you mean something more along the lines of what
Knop offers, correct?  For example:

knop_database
     -> select
     -> getrecord
     -> addrecord
     -> saverecord
     -> deleterecord

For more information.
http://www.lassotech.com/knop

--steve


On 8/8/10 at 6:52 PM, [hidden email] (Deco Rior) pronounced:

>However, it is a shame that the most important object required
>for OOP is the object created from a database record which
>Lasso 9 has missed.
>
>Deco
>
>On Aug 8, 2010, at 6:47 PM, Steve Piercy - Web Site Builder wrote:
>
>>I can relate to your frustration.  I went through the same process.
>>
>>Here are some really good resources helped me understand OOP.
>>
>>* Lasso Professional 8.5 Language Guide Chapters on Custom Tags and Custom Types
>>* L-Unit
>>http://www.l-unit.org/
>>* L-Debug
>>http://www.l-debug.org/
>>* "The Demystification of Lasso Custom Types"
>>http://tagswap.net/articles/The_Demystification_of_Lasso_Custom_Types/
>>
>>Note that all of these resources are written from an 8.5 perspective, so they use
>8.5 terms for OOP stuff.  But combined with the aforementioned
>Terminology section of the LassoTech article, you have a solid
>reference library.
>>
>>To be honest, it did not sink into my thick skull until about 2 years ago.
>Persistence will pay off.  The biggest hurdle is purely
>mental.  Instead of thinking in procedural code (step 1, step
>2, ... step N), think of creating an object and doing stuff to
>that object.  Once I understood that concept, then the heavens
>parted and I heard angels sing.
>>
>>In fact, Lasso's tags *are* OOP, but most people never realize they are using OOP.
>Lasso's PDF tags are a good example of OOP in that you must
>first create an object (e.g., pdf_doc), then create other
>objects (e.g., pdf_text) and add those objects to the pdf_doc object.
>>
>>Hope that helps.
>>
>>--steve
>>
>>
>>On 8/8/10 at 8:21 PM, [hidden email] (Tami Williams) pronounced:
>>
>>> It seems like the Lasso 9 docs require that you do supplemental reading on object
>oriented programming before reading them.
>>>   That sucks.
>>>   I now think that this
>>>>   2. Inheritance
>>>>   "If a method defined in a type conflicts with a method
>>>>defined in its parent,
>then the method defined in the type will replace that of its
>parent. This is known as overriding the parent method."
>>>   means that  if there is a member method ->Type that works
>>>on arrays and strings
>and maps and you use it on an array then the array member
>method ->Type is what's being used when you do $myArray->Type
>instead of the string->type or map->type member method.
>>>   Is that correct?  If so, why couldn't the docs just say
>>>that?  Or also say that as
>an example?
>>>   Another issue - the defining types section at
>>> <a href="http://docs9.lassosoft.com/Lasso%209%20Server/003%20Language%20Guide/002%">http://docs9.lassosoft.com/Lasso%209%20Server/003%20Language%20Guide/002%
>>> 20Programming%20Fundamentals/080%20Defining%20Types/index.lasso
>>>   My first thought is, if an array is a type of object, the
>>>way type definition is
>described doesn't explain to me how to define an array type.  
>Is there more than one kind of type? Do they have different
>names?  Is an array type something totally different from the
>"person" type used in the example?  How?  Why?   Is the
>"person" type in the example kind of like creating a "person"
>table in a database where you create a table "person" with
>fields "firstName", "lastName" and when you define the fields
>you say if they're string or integer fields?  If that's true,
>why not say that - anywhere?
>>>   Frustrated and venting to the list.
>>>   Thanks in advance.
>>>     On Aug 8, 2010, at 7:58 PM, Tami Williams wrote:
>>>
>>>> I need examples for this section of the Lasso Docs
>>>>   <a href="http://docs9.lassosoft.com/Lasso%209%20Server/003%20Language%20Guide/002%">http://docs9.lassosoft.com/Lasso%209%20Server/003%20Language%20Guide/002%
>>> 20Programming%20Fundamentals/001%20Types%20&%20Objects/index.lasso
>>>>    Can anyone tell me if this is correct?  Explaing Types,
>>>>Data Members, Member
>Methods, Inheritance and Traits using an ARRAY as an example?
>>>>   Thanks in advance.
>>>>   And yes, I know the docs have sections on all of the
>>>>above but I'm asking for
>something specific - an example using an array because reading
>the docs isn't helping me.
>>>>     1. Types, Data Members, Member Methods:
>>>>   Member methods are things you can do to that type object.
>>>>   An array is a object of type array that can contain many values.
>>>> Array objects have the $thisArrray->Insert member method.
>>>> Each element of an array is a data member.
>>>>   The integer 1 is an object of type integer containing the
>>>>value 1.
>>>> The integer 1 contains the data member 1.
>>>> The integer 1 has the member methods ->isA, ->asString, +.
>>>>    2. Inheritance
>>>>   "If a method defined in a type conflicts with a method
>>>>defined in its parent,
>then the method defined in the type will replace that of its
>parent. This is known as overriding the parent method."
>>>>   How would one do this?
>>>> If an array is an object of type array then isn't the parent type for array,
>array?
>>>> What methods does the array type define?
>>>>    3. Traits
>>>> ???
>>>>      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>>>> "It's better to burn out than to fade away."
>>>>   Tami Williams
>>>> Creative Computing
>>>> Let us help you make frustrating, costly, and inefficient processes more
>efficient, less costly and scalable.
>>>> FileMaker and Lasso specialists.
>>>>   Tel: 770.457.3221
>>>> Fax: 770.454.7419
>>>> E-Mail: [hidden email]
>>>> Web: http://www.asktami.com/
>>>> LinkedIn: http://www.linkedin.com/in/asktami
>>>> Twitter: http://twitter.com/asktami
>>>> iChat/AIM/Skype: tamiwilliamsusa
>>>>   FileMaker Solutions Alliance Associate | Lasso
>>>>Professional Alliance Member
>>>>   ------
>>>>   If you want to receive sporadic email from Creative
>>>>Computing regarding news at
>the company and announcements about upcoming Lasso webinars and
>online classes, please opt-in at http://tinyurl.com/yj7eqlg
>>>>    --
>>>> This list is a free service of LassoSoft: http://www.LassoSoft.com/
>>>> Search the list archives: http://www.ListSearch.com/Lasso/Browse/
>>>> Manage your subscription: http://www.ListSearch.com/Lasso/
>>>>  
>>>    --
>>> This list is a free service of LassoSoft: http://www.LassoSoft.com/
>>> Search the list archives: http://www.ListSearch.com/Lasso/Browse/
>>> Manage your subscription: http://www.ListSearch.com/Lasso/
>>>  
>>
>>-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
>>Steve Piercy               Web Site Builder               Soquel, CA
>><[hidden email]>                  <http://www.StevePiercy.com/>
>>
>>
>>--
>>This list is a free service of LassoSoft: http://www.LassoSoft.com/
>>Search the list archives: http://www.ListSearch.com/Lasso/Browse/
>>Manage your subscription: http://www.ListSearch.com/Lasso/
>>
>>
>
>Deco Rior
>[hidden email]
>
>O:(720) 207-2806
>F:(303) 942-7417
>
>TennisSource.Net
>software to power your tennis facility
>
>
>This electronic mail message is intended exclusively for the
>individual or entity to which it is addressed. This message,
>together with any attachment, may contain confidential and
>privileged information.   Any unauthorized review, use,
>printing, copying, retention, disclosure or distribution is
>strictly prohibited. If you have received this message in
>error, please immediately advise the sender by reply email
>message to the sender and delete all copies of this message.
>Thank you
>
>
>--
>This list is a free service of LassoSoft: http://www.LassoSoft.com/
>Search the list archives: http://www.ListSearch.com/Lasso/Browse/
>Manage your subscription: http://www.ListSearch.com/Lasso/
>
>

-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
-- --
Steve Piercy               Web Site Builder              
Soquel, CA
<[hidden email]>                  <http://www.StevePiercy.com/>


--
This list is a free service of LassoSoft: http://www.LassoSoft.com/
Search the list archives: http://www.ListSearch.com/Lasso/Browse/
Manage your subscription: http://www.ListSearch.com/Lasso/


Reply | Threaded
Open this post in threaded view
|

Re: In the spirit of sharing what I've learned in converting code to Lasso 9 as I learn it

decorior
As Jason said it has been discussed before, and requested not to be discussed in this thread.

However, for further reading the subject is called object-relational mapping or ORM, especially for those doing any iPhone, etc. development.


On Aug 8, 2010, at 7:13 PM, Steve Piercy - Web Site Builder wrote:

> L9 returns an object of records as an array or map, similar to 8.
>
> However I think you mean something more along the lines of what Knop offers, correct?  For example:
>
> knop_database
>    -> select
>    -> getrecord
>    -> addrecord
>    -> saverecord
>    -> deleterecord
>
> For more information.
> http://www.lassotech.com/knop
>
> --steve
>
>
> On 8/8/10 at 6:52 PM, [hidden email] (Deco Rior) pronounced:
>
>> However, it is a shame that the most important object required for OOP is the object created from a database record which Lasso 9 has missed.
>>
>> Deco
>>
>> On Aug 8, 2010, at 6:47 PM, Steve Piercy - Web Site Builder wrote:
>>
>>> I can relate to your frustration.  I went through the same process.
>>>
>>> Here are some really good resources helped me understand OOP.
>>>
>>> * Lasso Professional 8.5 Language Guide Chapters on Custom Tags and Custom Types
>>> * L-Unit
>>> http://www.l-unit.org/
>>> * L-Debug
>>> http://www.l-debug.org/
>>> * "The Demystification of Lasso Custom Types"
>>> http://tagswap.net/articles/The_Demystification_of_Lasso_Custom_Types/
>>>
>>> Note that all of these resources are written from an 8.5 perspective, so they use
>> 8.5 terms for OOP stuff.  But combined with the aforementioned Terminology section of the LassoTech article, you have a solid reference library.
>>>
>>> To be honest, it did not sink into my thick skull until about 2 years ago.
>> Persistence will pay off.  The biggest hurdle is purely mental.  Instead of thinking in procedural code (step 1, step 2, ... step N), think of creating an object and doing stuff to that object.  Once I understood that concept, then the heavens parted and I heard angels sing.
>>>
>>> In fact, Lasso's tags *are* OOP, but most people never realize they are using OOP.
>> Lasso's PDF tags are a good example of OOP in that you must first create an object (e.g., pdf_doc), then create other objects (e.g., pdf_text) and add those objects to the pdf_doc object.
>>>
>>> Hope that helps.
>>>
>>> --steve
>>>
>>>
>>> On 8/8/10 at 8:21 PM, [hidden email] (Tami Williams) pronounced:
>>>
>>>> It seems like the Lasso 9 docs require that you do supplemental reading on object
>> oriented programming before reading them.
>>>>  That sucks.
>>>>  I now think that this
>>>>>  2. Inheritance
>>>>>  "If a method defined in a type conflicts with a method defined in its parent,
>> then the method defined in the type will replace that of its parent. This is known as overriding the parent method."
>>>>  means that  if there is a member method ->Type that works on arrays and strings
>> and maps and you use it on an array then the array member method ->Type is what's being used when you do $myArray->Type instead of the string->type or map->type member method.
>>>>  Is that correct?  If so, why couldn't the docs just say that?  Or also say that as
>> an example?
>>>>  Another issue - the defining types section at
>>>> <a href="http://docs9.lassosoft.com/Lasso%209%20Server/003%20Language%20Guide/002%">http://docs9.lassosoft.com/Lasso%209%20Server/003%20Language%20Guide/002%
>>>> 20Programming%20Fundamentals/080%20Defining%20Types/index.lasso
>>>>  My first thought is, if an array is a type of object, the way type definition is
>> described doesn't explain to me how to define an array type.  Is there more than one kind of type? Do they have different names?  Is an array type something totally different from the "person" type used in the example?  How?  Why?   Is the "person" type in the example kind of like creating a "person" table in a database where you create a table "person" with fields "firstName", "lastName" and when you define the fields you say if they're string or integer fields?  If that's true, why not say that - anywhere?
>>>>  Frustrated and venting to the list.
>>>>  Thanks in advance.
>>>>    On Aug 8, 2010, at 7:58 PM, Tami Williams wrote:
>>>>
>>>>> I need examples for this section of the Lasso Docs
>>>>>  <a href="http://docs9.lassosoft.com/Lasso%209%20Server/003%20Language%20Guide/002%">http://docs9.lassosoft.com/Lasso%209%20Server/003%20Language%20Guide/002%
>>>> 20Programming%20Fundamentals/001%20Types%20&%20Objects/index.lasso
>>>>>   Can anyone tell me if this is correct?  Explaing Types, Data Members, Member
>> Methods, Inheritance and Traits using an ARRAY as an example?
>>>>>  Thanks in advance.
>>>>>  And yes, I know the docs have sections on all of the above but I'm asking for
>> something specific - an example using an array because reading the docs isn't helping me.
>>>>>    1. Types, Data Members, Member Methods:
>>>>>  Member methods are things you can do to that type object.
>>>>>  An array is a object of type array that can contain many values.
>>>>> Array objects have the $thisArrray->Insert member method.
>>>>> Each element of an array is a data member.
>>>>>  The integer 1 is an object of type integer containing the value 1.
>>>>> The integer 1 contains the data member 1.
>>>>> The integer 1 has the member methods ->isA, ->asString, +.
>>>>>   2. Inheritance
>>>>>  "If a method defined in a type conflicts with a method defined in its parent,
>> then the method defined in the type will replace that of its parent. This is known as overriding the parent method."
>>>>>  How would one do this?
>>>>> If an array is an object of type array then isn't the parent type for array,
>> array?
>>>>> What methods does the array type define?
>>>>>   3. Traits
>>>>> ???
>>>>>     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>>>>> "It's better to burn out than to fade away."
>>>>>  Tami Williams
>>>>> Creative Computing
>>>>> Let us help you make frustrating, costly, and inefficient processes more
>> efficient, less costly and scalable.
>>>>> FileMaker and Lasso specialists.
>>>>>  Tel: 770.457.3221
>>>>> Fax: 770.454.7419
>>>>> E-Mail: [hidden email]
>>>>> Web: http://www.asktami.com/
>>>>> LinkedIn: http://www.linkedin.com/in/asktami
>>>>> Twitter: http://twitter.com/asktami
>>>>> iChat/AIM/Skype: tamiwilliamsusa
>>>>>  FileMaker Solutions Alliance Associate | Lasso Professional Alliance Member
>>>>>  ------
>>>>>  If you want to receive sporadic email from Creative Computing regarding news at
>> the company and announcements about upcoming Lasso webinars and online classes, please opt-in at http://tinyurl.com/yj7eqlg
>>>>>   --
>>>>> This list is a free service of LassoSoft: http://www.LassoSoft.com/
>>>>> Search the list archives: http://www.ListSearch.com/Lasso/Browse/
>>>>> Manage your subscription: http://www.ListSearch.com/Lasso/
>>>>>
>>>>   --
>>>> This list is a free service of LassoSoft: http://www.LassoSoft.com/
>>>> Search the list archives: http://www.ListSearch.com/Lasso/Browse/
>>>> Manage your subscription: http://www.ListSearch.com/Lasso/
>>>>
>>>
>>> -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
>>> Steve Piercy               Web Site Builder               Soquel, CA
>>> <[hidden email]>                  <http://www.StevePiercy.com/>
>>>
>>>
>>> --
>>> This list is a free service of LassoSoft: http://www.LassoSoft.com/
>>> Search the list archives: http://www.ListSearch.com/Lasso/Browse/
>>> Manage your subscription: http://www.ListSearch.com/Lasso/
>>>
>>>
>>
>> Deco Rior
>> [hidden email]
>>
>> O:(720) 207-2806
>> F:(303) 942-7417
>>
>> TennisSource.Net
>> software to power your tennis facility
>>
>>
>> This electronic mail message is intended exclusively for the individual or entity to which it is addressed. This message, together with any attachment, may contain confidential and privileged information.   Any unauthorized review, use, printing, copying, retention, disclosure or distribution is strictly prohibited. If you have received this message in error, please immediately advise the sender by reply email message to the sender and delete all copies of this message. Thank you
>>
>>
>> --
>> This list is a free service of LassoSoft: http://www.LassoSoft.com/
>> Search the list archives: http://www.ListSearch.com/Lasso/Browse/
>> Manage your subscription: http://www.ListSearch.com/Lasso/
>>
>>
>
> -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
> Steve Piercy               Web Site Builder               Soquel, CA
> <[hidden email]>                  <http://www.StevePiercy.com/>
>
>
> --
> This list is a free service of LassoSoft: http://www.LassoSoft.com/
> Search the list archives: http://www.ListSearch.com/Lasso/Browse/
> Manage your subscription: http://www.ListSearch.com/Lasso/
>
>

Deco Rior
[hidden email]

O:(720) 207-2806
F:(303) 942-7417

TennisSource.Net
software to power your tennis facility


This electronic mail message is intended exclusively for the individual or entity to which it is addressed. This message, together with any attachment, may contain confidential and privileged information.   Any unauthorized review, use, printing, copying, retention, disclosure or distribution is strictly prohibited. If you have received this message in error, please immediately advise the sender by reply email message to the sender and delete all copies of this message. Thank you


--
This list is a free service of LassoSoft: http://www.LassoSoft.com/
Search the list archives: http://www.ListSearch.com/Lasso/Browse/
Manage your subscription: http://www.ListSearch.com/Lasso/


Reply | Threaded
Open this post in threaded view
|

Re: In the spirit of sharing what I've learned in converting code to Lasso 9 as I learn it

Brian Loomis-3
For anyone who wants more information on this read:

http://en.wikipedia.org/wiki/Object-relational_mapping

In lasso there are some types that do this to some extent already:

http://tagswap.net/Auto_Record (Adam Randall)

http://tagswap.net/autoctype (Deco Rior)

There's also an older version of something similar on lassoforge.

http://lassoforge.com/projects.lasso?PR=65


On Aug 8, 2010, at 7:49 PM, Deco Rior wrote:

> As Jason said it has been discussed before, and requested not to be discussed in this thread.
>
> However, for further reading the subject is called object-relational mapping or ORM, especially for those doing any iPhone, etc. development.
>
>
> On Aug 8, 2010, at 7:13 PM, Steve Piercy - Web Site Builder wrote:
>
>> L9 returns an object of records as an array or map, similar to 8.
>>
>> However I think you mean something more along the lines of what Knop offers, correct?  For example:
>>
>> knop_database
>>   -> select
>>   -> getrecord
>>   -> addrecord
>>   -> saverecord
>>   -> deleterecord
>>
>> For more information.
>> http://www.lassotech.com/knop
>>
>> --steve
>>
>>
>> On 8/8/10 at 6:52 PM, [hidden email] (Deco Rior) pronounced:
>>
>>> However, it is a shame that the most important object required for OOP is the object created from a database record which Lasso 9 has missed.
>>>
>>> Deco
>>>
>>> On Aug 8, 2010, at 6:47 PM, Steve Piercy - Web Site Builder wrote:
>>>
>>>> I can relate to your frustration.  I went through the same process.
>>>>
>>>> Here are some really good resources helped me understand OOP.
>>>>
>>>> * Lasso Professional 8.5 Language Guide Chapters on Custom Tags and Custom Types
>>>> * L-Unit
>>>> http://www.l-unit.org/
>>>> * L-Debug
>>>> http://www.l-debug.org/
>>>> * "The Demystification of Lasso Custom Types"
>>>> http://tagswap.net/articles/The_Demystification_of_Lasso_Custom_Types/
>>>>
>>>> Note that all of these resources are written from an 8.5 perspective, so they use
>>> 8.5 terms for OOP stuff.  But combined with the aforementioned Terminology section of the LassoTech article, you have a solid reference library.
>>>>
>>>> To be honest, it did not sink into my thick skull until about 2 years ago.
>>> Persistence will pay off.  The biggest hurdle is purely mental.  Instead of thinking in procedural code (step 1, step 2, ... step N), think of creating an object and doing stuff to that object.  Once I understood that concept, then the heavens parted and I heard angels sing.
>>>>
>>>> In fact, Lasso's tags *are* OOP, but most people never realize they are using OOP.
>>> Lasso's PDF tags are a good example of OOP in that you must first create an object (e.g., pdf_doc), then create other objects (e.g., pdf_text) and add those objects to the pdf_doc object.
>>>>
>>>> Hope that helps.
>>>>
>>>> --steve
>>>>
>>>>
>>>> On 8/8/10 at 8:21 PM, [hidden email] (Tami Williams) pronounced:
>>>>
>>>>> It seems like the Lasso 9 docs require that you do supplemental reading on object
>>> oriented programming before reading them.
>>>>> That sucks.
>>>>> I now think that this
>>>>>> 2. Inheritance
>>>>>> "If a method defined in a type conflicts with a method defined in its parent,
>>> then the method defined in the type will replace that of its parent. This is known as overriding the parent method."
>>>>> means that  if there is a member method ->Type that works on arrays and strings
>>> and maps and you use it on an array then the array member method ->Type is what's being used when you do $myArray->Type instead of the string->type or map->type member method.
>>>>> Is that correct?  If so, why couldn't the docs just say that?  Or also say that as
>>> an example?
>>>>> Another issue - the defining types section at
>>>>> <a href="http://docs9.lassosoft.com/Lasso%209%20Server/003%20Language%20Guide/002%">http://docs9.lassosoft.com/Lasso%209%20Server/003%20Language%20Guide/002%
>>>>> 20Programming%20Fundamentals/080%20Defining%20Types/index.lasso
>>>>> My first thought is, if an array is a type of object, the way type definition is
>>> described doesn't explain to me how to define an array type.  Is there more than one kind of type? Do they have different names?  Is an array type something totally different from the "person" type used in the example?  How?  Why?   Is the "person" type in the example kind of like creating a "person" table in a database where you create a table "person" with fields "firstName", "lastName" and when you define the fields you say if they're string or integer fields?  If that's true, why not say that - anywhere?
>>>>> Frustrated and venting to the list.
>>>>> Thanks in advance.
>>>>>   On Aug 8, 2010, at 7:58 PM, Tami Williams wrote:
>>>>>
>>>>>> I need examples for this section of the Lasso Docs
>>>>>> <a href="http://docs9.lassosoft.com/Lasso%209%20Server/003%20Language%20Guide/002%">http://docs9.lassosoft.com/Lasso%209%20Server/003%20Language%20Guide/002%
>>>>> 20Programming%20Fundamentals/001%20Types%20&%20Objects/index.lasso
>>>>>>  Can anyone tell me if this is correct?  Explaing Types, Data Members, Member
>>> Methods, Inheritance and Traits using an ARRAY as an example?
>>>>>> Thanks in advance.
>>>>>> And yes, I know the docs have sections on all of the above but I'm asking for
>>> something specific - an example using an array because reading the docs isn't helping me.
>>>>>>   1. Types, Data Members, Member Methods:
>>>>>> Member methods are things you can do to that type object.
>>>>>> An array is a object of type array that can contain many values.
>>>>>> Array objects have the $thisArrray->Insert member method.
>>>>>> Each element of an array is a data member.
>>>>>> The integer 1 is an object of type integer containing the value 1.
>>>>>> The integer 1 contains the data member 1.
>>>>>> The integer 1 has the member methods ->isA, ->asString, +.
>>>>>>  2. Inheritance
>>>>>> "If a method defined in a type conflicts with a method defined in its parent,
>>> then the method defined in the type will replace that of its parent. This is known as overriding the parent method."
>>>>>> How would one do this?
>>>>>> If an array is an object of type array then isn't the parent type for array,
>>> array?
>>>>>> What methods does the array type define?
>>>>>>  3. Traits
>>>>>> ???
>>>>>>    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>>>>>> "It's better to burn out than to fade away."
>>>>>> Tami Williams
>>>>>> Creative Computing
>>>>>> Let us help you make frustrating, costly, and inefficient processes more
>>> efficient, less costly and scalable.
>>>>>> FileMaker and Lasso specialists.
>>>>>> Tel: 770.457.3221
>>>>>> Fax: 770.454.7419
>>>>>> E-Mail: [hidden email]
>>>>>> Web: http://www.asktami.com/
>>>>>> LinkedIn: http://www.linkedin.com/in/asktami
>>>>>> Twitter: http://twitter.com/asktami
>>>>>> iChat/AIM/Skype: tamiwilliamsusa
>>>>>> FileMaker Solutions Alliance Associate | Lasso Professional Alliance Member
>>>>>> ------
>>>>>> If you want to receive sporadic email from Creative Computing regarding news at
>>> the company and announcements about upcoming Lasso webinars and online classes, please opt-in at http://tinyurl.com/yj7eqlg
>>>>>>  --
>>>>>> This list is a free service of LassoSoft: http://www.LassoSoft.com/
>>>>>> Search the list archives: http://www.ListSearch.com/Lasso/Browse/
>>>>>> Manage your subscription: http://www.ListSearch.com/Lasso/
>>>>>>
>>>>>  --
>>>>> This list is a free service of LassoSoft: http://www.LassoSoft.com/
>>>>> Search the list archives: http://www.ListSearch.com/Lasso/Browse/
>>>>> Manage your subscription: http://www.ListSearch.com/Lasso/
>>>>>
>>>>
>>>> -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
>>>> Steve Piercy               Web Site Builder               Soquel, CA
>>>> <[hidden email]>                  <http://www.StevePiercy.com/>
>>>>
>>>>
>>>> --
>>>> This list is a free service of LassoSoft: http://www.LassoSoft.com/
>>>> Search the list archives: http://www.ListSearch.com/Lasso/Browse/
>>>> Manage your subscription: http://www.ListSearch.com/Lasso/
>>>>
>>>>
>>>
>>> Deco Rior
>>> [hidden email]
>>>
>>> O:(720) 207-2806
>>> F:(303) 942-7417
>>>
>>> TennisSource.Net
>>> software to power your tennis facility
>>>
>>>
>>> This electronic mail message is intended exclusively for the individual or entity to which it is addressed. This message, together with any attachment, may contain confidential and privileged information.   Any unauthorized review, use, printing, copying, retention, disclosure or distribution is strictly prohibited. If you have received this message in error, please immediately advise the sender by reply email message to the sender and delete all copies of this message. Thank you
>>>
>>>
>>> --
>>> This list is a free service of LassoSoft: http://www.LassoSoft.com/
>>> Search the list archives: http://www.ListSearch.com/Lasso/Browse/
>>> Manage your subscription: http://www.ListSearch.com/Lasso/
>>>
>>>
>>
>> -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
>> Steve Piercy               Web Site Builder               Soquel, CA
>> <[hidden email]>                  <http://www.StevePiercy.com/>
>>
>>
>> --
>> This list is a free service of LassoSoft: http://www.LassoSoft.com/
>> Search the list archives: http://www.ListSearch.com/Lasso/Browse/
>> Manage your subscription: http://www.ListSearch.com/Lasso/
>>
>>
>
> Deco Rior
> [hidden email]
>
> O:(720) 207-2806
> F:(303) 942-7417
>
> TennisSource.Net
> software to power your tennis facility
>
>
> This electronic mail message is intended exclusively for the individual or entity to which it is addressed. This message, together with any attachment, may contain confidential and privileged information.   Any unauthorized review, use, printing, copying, retention, disclosure or distribution is strictly prohibited. If you have received this message in error, please immediately advise the sender by reply email message to the sender and delete all copies of this message. Thank you
>
>
> --
> This list is a free service of LassoSoft: http://www.LassoSoft.com/
> Search the list archives: http://www.ListSearch.com/Lasso/Browse/
> Manage your subscription: http://www.ListSearch.com/Lasso/
>
>

Brian Loomis
http://www.virtualrelations.us
(208) 639-2569 - 208 NEW BLOX
-- email checked daily --


--
This list is a free service of LassoSoft: http://www.LassoSoft.com/
Search the list archives: http://www.ListSearch.com/Lasso/Browse/
Manage your subscription: http://www.ListSearch.com/Lasso/


Reply | Threaded
Open this post in threaded view
|

Re: In the spirit of sharing what I've learned in converting code to Lasso 9 as I learn it

Steve Upton
In reply to this post by stevepiercy
At 5:47 PM -0700 8/8/10, Steve Piercy - Web Site Builder wrote:
>
>
>To be honest, it did not sink into my thick skull until about 2 years ago.  Persistence will pay off.  The biggest hurdle is purely mental.  Instead of thinking in procedural code (step 1, step 2, ... step N), think of creating an object and doing stuff to that object.  Once I understood that concept, then the heavens parted and I heard angels sing.

Not to be too hair-splitting but.

I prefer to think of the object doing stuff itself, rather than 'doing stuff to the object'.

It's subtle but speaks to the power of encapsulation, where the world knows an *absolute minimum* about the innards of an object. It allows for maximum flexibility in changing how the object is implemented underneath.

(probably what you meant but I thought I'd add it anyway)

regards,

Steve

--


--
This list is a free service of LassoSoft: http://www.LassoSoft.com/
Search the list archives: http://www.ListSearch.com/Lasso/Browse/
Manage your subscription: http://www.ListSearch.com/Lasso/