I am completely new to Tinderbox, which I am trying better to understand from the documentation and videos before committing to a licence.
The approach taken to managing notes seems very similar to the entity-attribute-value model for generalised data; in this case the entity being a note. I would like to understand two things better: whether, and if so how, attributes can be validated; and can links between notes be held as attributes?
Regarding the first, I understand that when a user attribute is defined it can be given one of a small number of built in types – string, number, URL etc. I would like to go further and constrain the value that can assigned to an attribute. For example, if I have an attribute called “altitude”, which records the height above some datum of an object, the value can’t be less than zero and shouldn’t be more than some maximum. The general solution would be to attach code to the attribute that is triggered whenever an instance of the attribute (i.e. the value of it for some note) is updated. I’m not convinced that this is an appropriate task for an agent, which I understand to be triggered whenever a note is created not, as needed here, before the note is saved.
Regarding the second question, it’s really a question of enforcing (in database terms) referential integrity. For example, if I have a collection of notes relating to different Authors, all derived from an Author prototype (aside, am I correct in thinking the prototype is also the collection?) and I create a note related to a Book which has an attribute “author”, I don’t want it to be just a string (albeit that Tinderbox will prompt me with all values of author as I type), but a link that I can follow. Is this possible? I know I can put a ?ziplink in the text, but that’s not a reliable technique for ensuring all Books are attributed to an Author and I am prompted to create on if he or she doesn’t yet have a note.
Thanks for any help.