On Jan 16, 2007, at 1: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"?


______________________________


If I define a variable and go through the steps of assigning the property to that variable
Passing that variable to the method
Then assigning the variable to the property the compiler is happy and things seem to work


Dim anyPict As Picture
    anyPict = Me.showPict
    orient1To1_8(anyPict)
    Me.showPict = anyPict

After reading Charles' response, i wonder if 'orient1To1_8(showPict)' would work? Both method and property are contained in the super.

-Terry



_______________________________________________
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>

Reply via email to