Difference between revisions of "PrF UG slots creating subslot"
(One intermediate revision by the same user not shown) | |||
Line 2: | Line 2: | ||
== Working with Subslots == | == Working with Subslots == | ||
− | {{PrF_UG_TOC_slots}}<div id='prf_ug'> | + | <noinclude>{{PrF_UG_TOC_slots}}<div id='prf_ug'></noinclude> |
Normally, whenever you create a new slot, it is a top-level slot. | Normally, whenever you create a new slot, it is a top-level slot. | ||
Line 52: | Line 52: | ||
<ol class='a'> | <ol class='a'> | ||
<li><p> | <li><p> | ||
− | In the Slot | + | In the Slot tab, |
select the slot that you want as the superslot of your subslot. | select the slot that you want as the superslot of your subslot. | ||
</p> | </p> | ||
Line 133: | Line 133: | ||
− | </div> | + | <noinclude></div></noinclude> |
Latest revision as of 17:45, November 13, 2008
Working with Subslots
Normally, whenever you create a new slot, it is a top-level slot. However, you can also create a subslot of an existing slot.
Understanding Subslots
Subslots have the following characteristics:
When you first create a subslot, the subslot inherits the properties of the superslot. Only the name is different.
You can only modify a subslot to make it more restrictive than its superslot. You cannot make it less restrictive.
When you attach a superslot to a class, all of its subslots are attached.
Subslots allow you to do the following:
You can create two (or more) slots which share information, but where one slot (the subslot) is more restrictive.
You can attach multiple related properties, using a single slot. To do this, create a single superslot and then create subslots that define characteristics of the superslot. By attaching the superslot to a class, you automatically attach all of its subslots.
Creating a Subslot
To create a subslot of a slot:
In the Slot tab, select the slot that you want as the superslot of your subslot.
Click the right mouse button.
Select Create Subslot from the Slot menu.
The new slot is created as a subslot of the selected slot. Except for the name, when created, it has the same properties as its parent slot.
You can use the Slot Editor to edit the properties of the new slot.
Restrictions on Edits
When you create a subslot, there are restrictions on the possible edits:
For Cardinality, the slot may be changed from Multiple to Single, but not vice versa. The at least value may be increased; the at most value may be decreased.
For certain value types, some restrictions apply:
For a slot of type Any, the slot may be restricted to one of the other types (Boolean, Class, Float, Instance, Integer, String, or Symbol). You cannot change the type of slots other than type Any.
For a slot of type Class or Instance, you cannot change the allowed classes.
A Minimum value (for types Integer or Float) may be created or increased.
A Maximum value (for types Integer or Float) may be created or decreased.
Default values cannot be removed.
These restrictions are similar to the restrictions on slot overrides, except that you can change the name of a subslot, and you cannot make any changes to the allowed classes of a subslot.