m: --VoiceMessage-- Entity; -- how to declare a var of type voicemsg --

foo← GetP[m, miCreated]; -- retrieve an attribute as a property, given the key --

fooList← GetPList[m, irID]; -- retrieve list of attributes, given an ambiguous key --

rs: RelshipSet← RelationSubset[interestRelation, LIST[[irUser, x], [irID, y]]];
-- assign to rs the set of relationships in interestRelation with user=x AND irID=y --

t: Relship← NextRelship[rs]; -- iterate through that set. --



Example Walnut calls to Nuthatch primitives:

0. Walnut calls InitializeNuthatchUser to get a NuthatchUserHandle that will identify the client to Nuthatch in future calls.

1. During NewMail (actually, reading log & updating database), Walnut calls CatalogVoiceFile to associate a gvID with a VoiceID.

2. During MoveTo or AddTo, Walnut calls Walnuthatch.MoveTo[msgset, nuthatchUserHandle, RefID, time], which in turn calls Nuthatch.AddInterest.

3. During Expunge, Walnut calls Nuthatch.RemoveInterestEntry with the gvID of each destroyed message.

4. Nuthatch will register the button procs:

RecordProc
StopRecordProc
 Attach
Proc
 Playback
Proc


 Play
Proc
 StopPlay
Proc
 KeepVoice
Proc
 RemoveVoice
Proc

Walnuthatch.MoveTo [msgset, nuthatchUserHandle, RefID, time]
MakeInterestEntry[
 nuthatchUserHandle: Nuthatch.NuthatchUserHandle,
 voiceFileID: rope, -- optional
 RefID: rope, -- GVID
 time] RETURNS[] =
-- Writes a log entry to create an entry in the InterestList relation for this voice file, associating the RefID with the voiceMessageID.
{};
(b) During MoveTo, Finch is called with the gvID and message set movedTo.

Walnuthatch.MoveTo tests for (msgset # active AND msgset # deleted)