HasCountryCode <- HasPhoneNumber |
|
|
AcceptEdit AcceptPhoneNumber BeginEdit |
|
AllowInvalidPhoneNumbers CountryCode DialingCountry DomesticNumber PhoneNumber |
| Field | Type | |
|---|---|---|
| HasPhoneNumber: | phoneNumber: | Text |
Define Class HasPhoneNumber; mixes in with Object, EditAttributeClient; inherits from HasCountryCode; field phoneNumber: Text, getter, setter; attribute PhoneNumber: Text; // returns the global phone number that is stored in the phoneNumber field // override raraly if you need to get the phone number from a different object attribute CountryCode: Text; // getter is overridden to get country code from dialing country // setter calls SetCountryCode on dialing country attribute DomesticNumber: Text; // access the domestic portion of phoneNumber attribute DialingCountry: DialingCountry; // gets the dialing country from the country code intrinsic AcceptPhoneNumber(editor: Viewable; otherEditor: Viewable; attributeNumber: OperationNumber): Boolean; // called by HasPhoneNumber_AcceptEdit and TelephoneAddressInfo_AcceptEdit // The two routines are identical, using this intrinsic makes it easier // to maintain the code without causing differences. overrides AcceptEdit; // to reject invalid phone numbers overrides BeginEdit; // to suggest appropriate phone number beginnings attribute AllowInvalidPhoneNumbers: Boolean, readOnly; // override to return true if invalid phone numbers are no problem end class;