Record Cloning
- sirherrbatka
- Posts: 2159
- Joined: 07 Aug 2011, 17:21
Re: Record Cloning
I can't figure out when and how table view is refreshed. Create Command is not doing anything other than my clone command, and collections itself do not send any signals as far as I can see. What I am missing?
Re: Record Cloning
The IdTable class is sending the update signals.
- sirherrbatka
- Posts: 2159
- Joined: 07 Aug 2011, 17:21
Re: Record Cloning
Ok, Cloning works for all id-tables. However It does not work for non-id tables, for instance topics. I get exception throwed from from the following ctor.
Which comes with no surprise, though. I don't quite understand how non-id records are handled yet.
Code: Select all
CSMWorld::UniversalId::UniversalId (Type type, const std::string& id)
: mArgumentType (ArgumentType_Id), mType (type), mId (id), mIndex (0)
{
for (int i=0; sIdArg[i].mName; ++i)
if (type==sIdArg[i].mType)
{
mClass = sIdArg[i].mClass;
return;
}
throw std::logic_error ("invalid ID argument UniversalId type");
}
Re: Record Cloning
We don't have non-id records anymore. Internally OpenCS translates all record indices into string IDs. The index type is only used for subviews that do not contain record tables.
btw. topics were never indexed in the first place. They always had IDs, even in vanilla MW.
btw. topics were never indexed in the first place. They always had IDs, even in vanilla MW.
- sirherrbatka
- Posts: 2159
- Joined: 07 Aug 2011, 17:21
Re: Record Cloning
ah, this is actually usefull information. Thanks
- sirherrbatka
- Posts: 2159
- Joined: 07 Aug 2011, 17:21
Re: Record Cloning
My guess is that sRecordId is for the autogenerating ids. However, when it is increased? How references are handled, since they appear to miss the sRecordId? Sorry for being annoying, I just must know it in order to progress any further.
Re: Record Cloning
sRecordId has nothing to do with record IDs. Its the header ID for the specific record type (see components/esm/defs.hpp).
RefCollection has a getNewId function.
RefCollection has a getNewId function.
- sirherrbatka
- Posts: 2159
- Joined: 07 Aug 2011, 17:21
Re: Record Cloning
Reference ID has to be unique only in the scope of a cell or I'm missunderstanding it?
Re: Record Cloning
With Reference ID you mean the OpenCS assigned string ID for a reference? This ID is unique within a project (i.e. the content file worked on and its dependencies).