Hi, Everybody.
I was just wondering here about some words I read on the preference Hector Correa has to create a Proxy Class, to get free of the DLL Hell... (I'm just thinking about some way to update my component COM on a server, without the need to shutdown, update and refresh...)...
well, I never saw Hector's implementation, so I just think about the using of the This_Access method... then, I wrote this code:
o=CreateObject("proxy")
DEFINE CLASS Proxy AS Relation OLEPUBLIC
oRZ = CreateObject("rapozine")
PROCEDURE This_Access
LPARAMETERS cMember
If Upper(cMember) <> "ORZ"
RETURN This.oRZ
EndIf
EndProc
Procedure Init
Set Procedure To LIB\PRG\RZCLASS.PRG ADDITIVE
EndProc
ENDDEFINE
So far, so good. Well, then I though: wonderful, I just need to change my instantiation:
instead of:
oRZ = CreateObject("rapozine.rapozine")
I need to to a:
oRZ = CreateObject("rapozine.proxy")
and inside my proxy class, everthing is re-routed to my RapoZine class...
that works fine instantiating my classes as VFP classes, but with component COM, no way... as the methods called are not known at the TLB, it gives me a COM error...
My idea was: well, keeping my logic at a prg, makes quite easy to update everything...
Did I miss something here?
Claudio Lassala