On Jan 16, 2007, at 4:57 PM, Robert Livingston wrote:
I have a canvas class that has a few methods and properties
assigned to it
One of those properties is a Picture (showPict)
One of these methods is orient1To1_8 which takes one parameter
a picture which I am passing by reference
Method Name: orient1To1_8
Parameters: ByRef anyPict As Picture
___________________________________________
orient1To1_8(Me.showPict)
This line of code makes the compiler object:
Error Message: "You cannot pass an expression as a parameter that
is defined as ByRef.
orient1To1_8(Me.showPict)
Why is a property considered "an Expression"?
This has been discussed at length on the list. The short answer is
that it is a way to guarantee that an object will not disappear while
this method is in progress. It is not the only way, but for that I
refer you to the archives.
Charles Yeomans
_______________________________________________
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>