NetTalk Central

Author Topic: Dct fields for disconnected app  (Read 4950 times)

peterH

  • Sr. Member
  • ****
  • Posts: 413
    • View Profile
Dct fields for disconnected app
« on: May 26, 2019, 11:18:48 PM »
In prepping for writing my first disconnected app in NT I'm studying the BasicMobile app/dct.
This leads to a question regarding the 3 timestamp fields:

It seems a bit overkill to have to designate these fields in three different ways:
  • fixed field name (e.g. 'TimeStamp')
  • external name (e.g.'ts')
  • user option (property 'timestamp' value '1')
Are they really all needed?

Peter

PS. And apparently neither ext name nor user option is needed for the guid field to work (?)
« Last Edit: May 26, 2019, 11:28:10 PM by peterH »

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11244
    • View Profile
Re: Dct fields for disconnected app
« Reply #1 on: May 27, 2019, 12:10:19 AM »
hi Peter,

>> It seems a bit overkill to have to designate these fields in three different ways:

    fixed field name (e.g. 'TimeStamp')
    external name (e.g.'ts')
    user option (property 'timestamp' value '1')

>> Are they really all needed?

no, they are "in order". Having the user option allows the fieldname and external field name to be changed (although this is NOT something I'd recommend) - the external field name being short can be useful in places where the work timestamp is already used.

Setting the first 2 is a good idea, primarily because that's the way my apps are setup, and so the way that is most likely to work "clean".

Your question suggests though that you don't know that fields in the dict can be cut-&-pasted. the key is to set it up just once, correctly, in one table, and then just copy those fields to the other tables. That's pretty fast.

Alas you can't cut&paste keys, so that's a manual process to add them - and is slow.

cheers
Bruce

peterH

  • Sr. Member
  • ****
  • Posts: 413
    • View Profile
Re: Dct fields for disconnected app
« Reply #2 on: May 27, 2019, 12:27:49 AM »
Thanks Bruce.
And yes, I do know that you can copy/paste dct fields, I do it all the time  ;)

In fact, you can also (sort of) copy keys. If you copy the entire file definition the keys get copied as well.

Peter
« Last Edit: May 27, 2019, 12:45:55 AM by peterH »