[Valentina][VSDK] M:M problems
Ruslan Zasukhin
sunshine at public.kherson.ua
Tue Jan 21 08:58:17 CST 2003
on 1/21/03 7:27 AM, Eric Forget at forgete at cafederic.com wrote:
>>> class CGroupPerson : public VDK_BaseObject
>>> {
>>> public:
>>> VDK_ObjectPtr mGroupPtr;
>>> VDK_ObjectPtr mPersonPtr;
>>>
>>> VDK_ULONG mG;
>>> VDK_ULONG mP;
>>>
>>> VDK_ULLONG mGP;
>>>
>>> public:
>>> CGroupPerson ()
>>> : VDK_BaseObject( "GroupPerson" ),
>>> mGroupPtr( "GroupPtr", NULL, kFBL_CASCADE ),
>>> mPersonPtr( "PersonPtr", NULL, kFBL_CASCADE )
>>> mG( "mG" ),
>>> mP( "mP" ),
>>> mGP( "GP", fUnique )
>>> {
>>> // next call make field to be calculated
>>> mG.SetMethod("GroupPtr"); // now mg = GroupPtr, but has type ulong
>>> mP.SetMethod("PersonPtr");
>>>
>>> mGP.SetMethod( "(mg << 32) + mp" ); // case insensitive, btw
>>> }
>>> };
>>>
>>> I have check here, formula on ULONG fields works correctly.
>>
>> I've still have the same error. Maybe the cast in VDK_ULong doesn't work?
>
> I finally made some progress. However read the following...
>
> 1) I didn't called the SetPointedObject() on mGroupPtr and mPersonPtr...
And this explains why in Browser mode VAPP did not show table.
Just this third table was not completed yet, because you have not establish
ObjectPtrs correctly.
In fact you can send pointers on objects into CGroupPerson() and use them
instead of NULL.
Sorry that I have not catch this from your code.
> 2) The mG and mP are useless (I means it may work without them).
This is good.
> 3) VDK_ULLong doesn't support fUnique when you specify a method (oops!!).
> But it works when you do not specify a method. Check with your VAPP! It
> looks like it doesn't work for about any type (even VDK_String).
>
> 4) However, if you change, on the fly from one type to another (again try it
> in VAAP): e.g. VDK_ULLong to VDK_Llong (or the reverse) it starts to work.
This sounds strange!
We need investigate this more.
No Eric, I have check it works fine, in VAPP with ULLong.
May be you have click unique check box but forget click button Modify?
Check this.
For me I get dialog "value not unique" when I try add wrong value.
May be try write your code as
mGP( "GP", fIndexed + fUnique )
--
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://listserv.macserve.net/mailman/listinfo/valentina
-------------------------------------------------------------
More information about the Valentina
mailing list