develop-20 9412 December 1994
From the originals
13 scansMachine-transcribed text and image descriptions. Check the linked original for uncertain words or fine print.
These are transcribed pages from the documents, not the full publications. Open the original for the remaining pages.
PDF page 12
In our example, the aspect template defines the properties for the new information page being added to an existing record type — “aoce User.” Because User records already have a main aspect template provided as part of the PowerTalk system software, you don’t have to provide one yourself. In fact, declaring a template to be the main aspect template for User records would cause a conflict and the User records would no longer work correctly. To replace an existing main aspect template, you use a killer template, which is not covered in this article. See Inside Macintosh: AOCE Application Interfaces for more on killer templates.• Aspect templates, like other templates, have a name that must be unique to be identified by other templates. To guarantee uniqueness, start the names of all your templates (as well as all the new record types and attribute types for which you provide main aspect templates) with your four-character application signature as registered with Apple’s Developer Support Center. Here’s our aspect template name resource: resource 'rstr' (kEInfoPageAspect+kDETTemplateName, purgeable) { "ACFC InfoPage aspect" }; The record type resource identifies the record that the aspect applies to, in this case the User record: resource 'rstr' (kEInfoPageAspect+kDETRecordType, purgeable) { "aoce User" }; Although we’re going to be defining a new attribute type that goes in User records, we don’t provide a resource (of type kDETAttributeType) to specify that attribute type for the aspect template. In fact, if an attribute type were specified for the aspect template, the CE could use the template only for that attribute type and could not use it to modify the User record itself. (If the new attribute type were in a sublist and we provided a main aspect template to describe how that attribute should appear in the sublist, that main aspect template would contain a kDETAttributeType resource, as shown in the sample code on this issue’s CD.)• DRAG AND DROP RESOURCES The aspect template drag and drop resources in the sample code make it possible for users to drag keyword records and drop them either on a closed User record or directly on a sublist on an information page, thereby adding those records to the sublist. The kDETAspectRecordDragIn resource specifies what types of records can be dropped on a sublist. Because the CE can’t actually store a record in a record, it adds to the sublist an attribute containing an alias to the dropped record. For each type of record the user can drag in, you also need to specify the type of attribute to store the alias in. The following resource indicates that aliases to keyword records should be stored as attribute type “ACFC Alias keyword”: resource 'rst#' (kEInfoPageAspect+kDETAspectRecordDragIn, purgeable) { { "ACFC Keywords", "ACFC Alias keyword" } }; d e v e l o p Issue 20 December 1994 10
- Printed dates
- 1994
- Languages
- English