Description of Methods and Functions
EntryChangeXmit
and EntryRemoveFromSoupXmit
. Other functions are used less often.
EntryRemoveFromSoupXmit(entry, changeSymbol)
entry
from its soup. The changeSymbol
is a symbol specifying who made the change (it is usually an application symbol). If changeSymbol
is nil
, no change notification is done. For example:
namesSoup := GetUnionSoup("Names"); s := namesSoup:Query(nil); e := s:Entry(); EntryRemoveFromSoupXmit(e, '|ProgNewton:Calliope|); Print(s:Entry()) deleted
EntryChangeXmit(entry, changeSymbol)
changeSymbol
is a symbol specifying who made the change (it is usually an application symbol). If changeSymbol
is nil
, no change notification is done. For example:
namesSoup := GetUnionSoup("Names"); s := namesSoup:Query(nil);
e := s:Entry(); Print(e);
{class: person, address2: NIL, addresses: [], pagers: [],address: "217 Crocker Lane", class: person, postal_code: "44704", cardType: 0, anniversary: NIL, region: "OH", city: "Hillsdale", email: NIL, bdayEvent: NIL, title: NIL, country: NIL, name: {class: person, first: "Royce", last: "Walthrop"}, ...} e.address := "123 Main Street"; EntryChangeXmit(e, '|ProgNewton:Calliope|);
Print(e); {class: person, address2: NIL, addresses: [], pagers: [], address: "123 Main Street",
class: person, postal_code: "44704", cardType: 0, anniversary: NIL, region: "OH", city: "Hillsdale", email: NIL, bdayEvent: NIL, title: NIL, country: NIL, name: {class: person, first: "Royce", last: "Walthrop"}, ...}
EntryUndoChangesXmit(entry, changeSymbol)
entry
since it was last read from or written to the soup are lost. The changeSymbol
is a symbol specifying who made the change (it is usually an application symbol). If changeSymbol
is nil
, no change notification is done. For example:
namesSoup := GetUnionSoup("Names"); s := namesSoup:Query(nil); e := s:Next(); Print(e); { sortOn: "LaGaly", region: NIL, name: { first: "Carolyn", last: "LaGaly"}, _uniqueID: 11, _modtime: 47130480} e.region := "CA"; Print(e); { sortOn: "LaGaly", region: "CA", name: { first: "Carolyn", last: "LaGaly"}, _uniqueID: 11, _modtime: 47130480} EntryUndoChangesXmit(e, '|ProgNewton:Calliope|); Print(e); { sortOn: "LaGaly", region: NIL, name: { first: "Carolyn", last: "LaGaly"}, _uniqueID: 11, _modtime: 47130480}
EntrySoup(entry)
printDepth:=-1; internalStore:=GetStores()[0]; Print(internalStore:GetSoup("Names")); {#440F7F1} externalStore:=GetStores()[1]; Print(externalStore:GetSoup("Names")); {#440F991} s := GetUnionSoup("Names"); Print(s); {#440F979} q := s:Query(nil); e := q:Entry(); Print(EntrySoup(e));
{#440F991} e := q:Next(); Print(EntrySoup(e));
{#440F7F1}
EntryStore(entry)
Entry-Store
returns an entry's store. For example:
printDepth:=0; Print(GetStores()); [{#44039B1}, {#4409BA1}]
printDepth:=-1; s := GetUnionSoup("Names"); q := s:Query(nil);
e := q:Entry(); Print(EntryStore(e)); {#4409BA1}
e := q:Next(); Print(EntryStore(e)); {#44039B1}
EntryModTime(entry)
entry
. If entry
has never been modified, it returns the time it was added to the soup. You must use this routine instead of directly accessing an entry's undocumented _modtime
slot. The time is an integer equivalent to the minutes passed since midnight, January 1, 1904.
EntryUniqueID(entry)
entry
. You should use this routine instead of directly accessing the undocumented _uniqueID
slot of an entry.
An online version of Programming for the Newton using Macintosh, 2nd ed. ©1996, 1994, Julie McKeehan and Neil Rhodes.
Last modified: 1 DEC 1996