#1 2012-12-04 09:45:07

From: Bali-Indonesia
Registered: 2010-11-07
Posts: 130

where is Model and ModelTableIndex from RecordProps?

before we could get the Model and the Model Index from a Class Record, with Rec.RecordProps.
M: = Rec.RecordProps.Model. Also to get the Index of RecordClass from the Model,
RCIndex: = Rec.RecordProps.ModelTableIndex.
But now it does not get done.

Now I'm using:
M: = Client.Model and
RCIndex: = Model.GetTableIndex (aRecordClass);

Did I use the right way?

thank you


#2 2012-12-04 10:40:08

From: France
Registered: 2010-06-21
Posts: 13,192

Re: where is Model and ModelTableIndex from RecordProps?

Yes, you can have several models running on the same process.
For instance, when using within a proxy application with local and external tables, or with several layers of services.

So we split the pure-class information (mainly RTTI) in TSQLRecordProperties and a model-specific new class, named TSQLModelRecordProperties.

Since the TSQLModel index is dependent to the Model, you have to use GetTableIndex() as you wrote.
Sounds just fine to me.


Board footer

Powered by FluxBB