realbasic-nug
[Top] [All Lists]

Re: Method vs Property

To: REALbasic NUG <realbasic-nug at lists dot realsoftware dot com>
Subject: Re: Method vs Property
From: CV <atauqua at hit dot net>
Date: Sat, 30 Sep 2006 06:38:13 -0700
Delivered-to: listarchive at realsoftware dot com
Delivered-to: realbasic-nug at lists dot realsoftware dot com
References: <20060929170038 dot 743DC153AF65 at lists dot realsoftware dot com> <1108DAEC-0D85-44AB-9D29-3F123622D610 at mac dot com>

On Sep 29, 2006, at 11:05 PM, Robert Livingston wrote:

When is something a property and when a method?

Take the ListBox class as described in the LR


Cell is said to be a method

ListBox1.Cell(1,2) = "Dog"



CellType is said to be a property

ListBox1.CellType(1,3) = True



The syntax of their use seems to be the same. What makes one a property and the other a method? Its seems strange to me that you can assign a value to a method. (ListBox1.Cell(1,2) = "Dog")


When a class is designed, the author creates certain properties and certain methods. When the author is asked: "What are the methods and properties of your class?" the author is going to say: "These are my methods and these are my properties." That's all RS is doing, and it's really all under the hood.

Best regards,

Jack

_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>


<Prev in Thread] Current Thread [Next in Thread>