Casting VObjectPtr

Ruslan Zasukhin sunshine at public.kherson.ua
Mon Aug 28 09:43:24 CDT 2006


On 8/28/06 3:15 AM, "Steve Albin" <steve at steve-albin.com> wrote:

Hi Steve,

>> Strange. And field(10) returns really the same field of ObjectPtr type ?
>> Please check 
>> 
>>    fld = cursor.Filed(10)
>> 
>>    fld.type
>>    fld.name
> 
> OK, the field type is returning 9 - kTypeULong according to the docs.  But the
> name field is returning the correct name for the field - labelPtr.   Very
> strange to me.

Aha, all right!

I have remember, yes I have fix this mistake.
 
Cursor cannot have field of type ObjectPtr or RecID.
Such types columns can exist only in Table.

So when you build cursor Valentina replace them on ULONG type.
Column which just keep ulong values.

In fact Valentina 1.x did work always in the same way.

So you need cast to VULong


> Here is my definition for the field in the object for the table:
>       self.labelPtr = new
> VObjectPtr("labelPtr",inDB.Labels,EVOnDelete.kRestrict)   //10
>   
>   
> The database I am using is a Val 1.10 DB that I'm converting using the
> Convert_1_2 routine.  But. I tried another app that uses a database created
> using Val 2 and it is having the same problem.
> 
> I'm not saying that the problem isn't of my own making, but I can't imagine
> what I have done!  I didn't make any changes regarding cursors and such since
> I upgraded to V4RB 2.4.1.

-- 
Best regards,

Ruslan Zasukhin
VP Engineering and New Technology
Paradigma Software, Inc

Valentina - Joining Worlds of Information
http://www.paradigmasoft.com

[I feel the need: the need for speed]




More information about the Valentina mailing list