properties and methods
Quote from Forum Archives on December 3, 1997, 6:37 amPosted by: Waverly <Waverly@...>
>Except that the BEGIN/END CLASS statement does not bracket the methods -
>only the class property record. So it will look more like this:
>
>BEGIN CLASS "Main Window", "cWindow"
> DIM helpRect.8
> DIM currentTool%
> DIM dataHandle&
>END CLASS
>
>PROPERTY helpRect = helpRect
>PROPERTY currentTool% = currentTool%
>PROPERTY dataHandle& = dataHandle&
>
>BEGIN METHOD redrawMain
> 'yadda
>END METHOD
>
>BEGIN METHOD showHelp
> 'yadda again
>END METHOD
>
>========================================
>| David Blache - Developer |
>How do you tell that a method or property belongs to a particular class if
it is not within the BEGINCLASS/ENDCLASS structure? This has a feel of
having group of statments outside a LOCAL FN/END FN structure.CLEAR LOCAL
LOCAL FN myFunction
'do something here
END FN'and do something here to because I belong to myFunction.
Of course, I will be quickly corrected if I've not understood the syntax.
W.
................................................................................
"If the only tool you have is a hammer, then every solution looks like a nail."
Abraham MaslowThe only time you should look down on a man is when you're helping him get up.
................................................................................
Posted by: Waverly <Waverly@...>
>only the class property record. So it will look more like this:
>
>BEGIN CLASS "Main Window", "cWindow"
> DIM helpRect.8
> DIM currentTool%
> DIM dataHandle&
>END CLASS
>
>PROPERTY helpRect = helpRect
>PROPERTY currentTool% = currentTool%
>PROPERTY dataHandle& = dataHandle&
>
>BEGIN METHOD redrawMain
> 'yadda
>END METHOD
>
>BEGIN METHOD showHelp
> 'yadda again
>END METHOD
>
>========================================
>| David Blache - Developer |
>
How do you tell that a method or property belongs to a particular class if
it is not within the BEGINCLASS/ENDCLASS structure? This has a feel of
having group of statments outside a LOCAL FN/END FN structure.
CLEAR LOCAL
LOCAL FN myFunction
'do something here
END FN
'and do something here to because I belong to myFunction.
Of course, I will be quickly corrected if I've not understood the syntax.
W.
................................................................................
"If the only tool you have is a hammer, then every solution looks like a nail."
Abraham Maslow
The only time you should look down on a man is when you're helping him get up.
................................................................................