[V4RB] Sorry about that...
Ruslan Zasukhin
sunshine at public.kherson.ua
Thu Mar 4 14:40:30 CST 2004
on 3/3/04 2:00 PM, Chuck at rwc1717 at shaw.ca wrote:
> Hi Ruslan:
> I have attached one zip files..the smallest that demonstates the problem
> described below
>
> I have attached a REALBasic project...very small that simply tries to
> create the database that I codified. It too produces objectptrs with no
> target association. It happens regardless of how many files are being
> used to store the database and its associated information.
>
> What am I doing wrong?
Chuck,
You really do wrong code.
Your MyDb constructor do:
mA = new boAct(self)
mEx = new boExp(self)
mSp = new boSpec(self)
mWd = new boWd(self)
Now go to constructor boAct:
// set name of the Table
name = "active"
DateFld = new VString( "dateset", 20 )
DescriptFld = new VString( "descript", 70 )
TimeFld = new VString("aptime",7)
IDFld = new VString( "id", 25,"Ascii",kV_Indexed)
mAPtr = new VObjectPtr( "active", inDatabase.mA, kV_SetNull )
^^^^^^^^^^^^^^^
this must be target BaseObject
but you specify the same mA.
Chuck, here 2 mistakes in the same time.
1) you specify in ObjectPtr as target table boAct itself.
even if assume that you want do self recursion,
look on your code, myDB calls boAct(), and only on return
from boAct it will assign value to mA,
but you try to use inDatabase.mA value, which is GARBAGE.
Must be
mAPtr = new VObjectPtr( "active", self, kV_SetNull )
But again, this is only if assume that you really want table with
self-recursion. Mosy probably you want something else.
QUESTION TO YOU:
ObjectPtr "active" must point on OTHER table ?
If yes, then you must use OTHER table pointer here.
And note, you can use OTHER table pointer only when you construct it.
--
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