[V4rb] ObjectPtr query
Ruslan Zasukhin
sunshine at public.kherson.ua
Wed Sep 24 14:01:59 CDT 2003
on 9/24/03 10:45 AM, Fred.Stephenson at
Fred.Stephenson at communication-unltd.com wrote:
Hi Fred,
>> But you try send iobjptr.target
>> This is BaseObject of first database, yes?
>
> correct
>
>> And you send it to second db which DO NOT know it :-)
>
> duh, right ;?)
>
>>
>> You need get from iobjptr.target its name
>> Then in second db obtain BaseObject with such name and use its pointer.
>
>
> Ok so
>
> case kv_typeobjectPtr
>
> iobjptr=vobjectptr(thefield)
> targ=iobjptr.target
> newtarg=olddb.baseobject(targ.name)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
I think must be
newtarg = newdb.baseobject(targ.name)
> i=iobjptr.deletionControl
> fieldname=iobjptr.name
> // everthing above looks correct when debugging
> vf=bo.createfield(fieldname,kv_typeobjectPtr,newtarg,i)
> 'breakpoint here
> 'kobjPtr=bo.createObjectPtrField(fieldname,newtarg,i)
>
> doesn't create a valid objectptr. It creates the pointer but there's
> never any target when looking in Vapp (therefore red baseobject).
> When stopping at the breakpoint 'vf' displays the correct target
> and pointedobject.
>
> Am I just being really dumb orshould the above work now
> BTW I'm using V4RB 1.9.8
--
Best regards,
Ruslan Zasukhin [ I feel the need...the need for speed ]
-------------------------------------------------------------
e-mail: ruslan at paradigmasoft.com
web: http://www.paradigmasoft.com
To subscribe to the Valentina mail list go to:
http://lists.macserve.net/mailman/listinfo/valentina
-------------------------------------------------------------
More information about the Valentina
mailing list