I'm a bit uncertain as this is how it's supposed to work, I'm doing something wrong here or if it's something the compiler is supposed to handle?
Compiler: PB/WIN 10.04
Given the following code:
So why is a property's WSTRING return value different from a variable's or UCode$ one?
On a related note: I'd like to see a PB CVnt() function (~the opposite of VARIANT#/VARIANT$/VARIANT$$), similar to the other Cxxx() conversion functions.
Compiler: PB/WIN 10.04
Given the following code:
Code:
Class CMYClass Interface IMYInterface Inherit Dual Instance mwsKey As WString ' *** Property Key Property Get Key() As WString Property = mwsKey End Property Property Set Key(ByVal wsValue As WString) mwsKey = wsValue End Property '------------------------------------------------------------------------------ Method ToVariant() As Variant ' Results in Error 595: Object return type required 'Method = Me.Key ' Does work Method = mwsKey ' Results in Error 595: Object return type required Local vnt As Variant Let vnt = Me.Key ' Does work Let vnt = UCode$(Me.Key) End Method '------------------------------------------------------------------------------ End Interface End Class
On a related note: I'd like to see a PB CVnt() function (~the opposite of VARIANT#/VARIANT$/VARIANT$$), similar to the other Cxxx() conversion functions.
Comment