A bit of annoying, now i have an object which i may not pass directly.
In an interface i have a property returning another interface (think of parent) and i can use it with OOP syntax.
Now i wish to pass this parent object to a function which is declared byref like:
Function Hello( ByRef oParent As IMyParentInterface ) and get a similar error.
If i use a variable and pass that it is ok like:
local oParent As IMyParentInterface
oParent = IChild.parent
Hello( oParent )
That is overhead.
Announcement
Collapse
No announcement yet.
Property returniong type ok, usage not
Collapse
X
-
Hmm, a bit like peek and poke isn't?
Oh well, i'll reconsider using a property then.
(Usually i return it byref)
Leave a comment:
-
And it is, but you have to use TYPE SET or LSET to assign it, i.e. TYPE SET R = Me.Size().
Leave a comment:
-
hI Edwin,
Looking at your code, the R in the Get Property will not contain any
values since R is locally defined and not an Instance veriable. Is this
what you want ?
Ok, then to the meat of the problem.
Try Lset R = me.Size()
Cheers
Steven
Leave a comment:
-
Property returniong type ok, usage not
I get this error:
PowerBASIC for Windows
PB/Win Version 9.00
Copyright (c) 1996-2008 PowerBasic Inc.
Venice, Florida USA
All Rights Reserved
Error 426 in ----
Variable expected
Line 802: R = Me.Size
Code:Property Get Size() As RECT Local R As RECT Property = R End Property Method Hello() As Long Local R As RECT R = Me.Size() End Method
Tags: None
Leave a comment: