Object <- Text <- AddressInfo |
|
|
AcceptEdit AddressPart AttributeValueFromEditor BeginEdit CanEdit Confirm |
LookUpAddressPartFromDescription MakeUniqueDescription NextStepList SetAddressPart UpdateIfNecessary |
|
AddressSubtype AddressType AutoUpdate ContactLocation Description EditSteps Empty Entity FullAddress |
Image Index OptimizeForLocale OptionEditSteps Source SourceCRC Unlisted UnlistedEditSteps Visible |
| Field | Type | |
|---|---|---|
| AddressInfo: | flags: | Unsigned |
| image: | Image | |
| source: | FullContact | |
| sourceCRC: | Unsigned |
Define Class AddressInfo; abstract; inherits from Text, EditAttributeClient, HasEntity; field flags: Unsigned; field image: Image, sharedSetter; field source: FullContact, weak, getter, setter; field sourceCRC: Unsigned, getter, setter; operation AddressPart(selector: Unsigned): Text, noFail; operation SetAddressPart(selector: Unsigned; newText: HasText); // low-level accessors to stored representation of address parts // selector values are defined in ContactsPrivate.h attribute AddressType: Unsigned; attribute AddressSubtype: Unsigned; attribute AutoUpdate: Boolean; operation CanEdit(entity: Object): Boolean; attribute EditSteps: AttributeStepList, readOnly, noGetter; // returns edit steps appropriate to this type of address attribute OptionEditSteps: AttributeStepList, readOnly; // call to get fancier edit steps appropriate to type of address // called when user edits address with option key down // returns EditSteps by default // override often to return edit steps that allow user to edit more things than standard EditSteps, usually including description attribute OptimizeForLocale: Boolean; // if set, optimize for current locale vs international use. Defaults false. attribute UnlistedEditSteps: AttributeStepList, readOnly; // call to get the steps for editing the unlisted attribute for this label // override to return different edit step list attribute Empty: Boolean, readOnly; attribute Entity: FullContact; attribute Image: Image; attribute Index: Unsigned, readOnly, safe; attribute Source: FullContact; attribute SourceCRC: Unsigned; attribute Unlisted: Boolean; attribute ContactLocation: Text, readOnly; attribute Description: Text; attribute FullAddress: Text, readOnly; attribute Visible: Boolean, safe, common; intrinsic LookUpAddressPartFromDescription(description: Text; descriptionList: ObjectList; partsList: ObjectList): Object; // looks for description in descriptionList and returns the item at the same index in partsList // usually called on Description(self), but can be used to look up descriptions without creating an AddressInfo operation MakeUniqueDescription(contact: FullContact): Boolean; // returns true if this fullContact already contains a label with the // same description as this one // called by some label's editsteps to ask the user for a description if // the default one is already on their contact (to avoid having multiple // labels all called "internet" for example) operation UpdateIfNecessary(); overrides AcceptEdit; // to limit the text entered to 255 bytes and total data to 1023 bytes // announces to user and returns false if too many characters were entered operation AttributeValueFromEditor(attributeNumber: OperationNumber; editor: Object): Object; // hack to extract a value for SetObjectAttribute from editor (used by AcceptEdit) overrides BeginEdit; // to SetAutoUpdate(self, true) overrides NextStepList; // called to decide whether the next step should be the step that lets // the user choose whether this address is unlisted overrides Confirm; // Change the delivery choice of the current telecard to this one when done editing // it. This is helpful when adding new delivery choices to a new Telecard. end class;