To work around a bug in the personalization lessons, introduced a new type of lesson step: the no-op step. This lesson step just hangs around and does nothing (doesn't restrict the user's touches, doesn't show a lesson window) until someone calls NextStep(iLessonTool). Added kStepIsNoOp bit to stepFlags.Added kStepCloseKeyboardAfter step flag to handle steps that have the user type in a text field so that the keyboard can be put away when the step is over. The keyboard is put away by CleanUpPreviousStep().
It's now easier for packages to install their own lessons. Rosemary introduces a new class, LessonStack, which knows to put cards in order. LessonCard now has a SortValue() attribute. Lesson stacks will sort cards based on this value. LessonCard_lessonField has been removed; this is now determined automatically.
Lesson windows now dynamically resize according to the size of the enclosed text.
Added ClassroomScene_SetTurnPageIndicator() which allows you to flash the page turn box of the "Getting Started" book without needing to directly reference the page turn box.
Lesson stacks now keep around a list of names of objects they know about. LessonCards no longer specify the position into which they should be installed in a LessonStack. Now, LessonStacks maintain a list of names for LessonCards that should go in a known order.
The implementation of class SingleLinkable in current versions of Magic Cap has special code to allow the healing of linkable chains that span multiple memory devices. For example, it is possible to have a linkable object in main memory whose next field refers to a linkable object on a PC card whose next field in turn refers to another linkable object residing back in main memory. If the PC card is removed, Magic Cap coalesces the linkable chain so that the next field of the first linkable object will refer to the third linkable object. This healing mechanism relies on the Reference class. Because this class will go away in Rosemary, linkable chains will no longer be able to span multiple memory devices. SingleLinkable subclasses that rely on this ability, like Actor, Semaphore and Viewable have been reworked for Rosemary so that chains of instances of these classes will continue to be able to span memory devices.In the Rosemary release of Magic Cap, the Linkable class no longer exists. The fact that Actor, Semaphore and Viewable no longer inherit from these classes should have little impact on your code, as the APIs for these classes will not be affected by this change. However, the change in the inheritance hierarchy changes the format of instances of these classes; instances of viewable classes in object definition files will need to be updated to reflect the new object structure. Specifically, these instances will no longer have next and previous fields. The changes to the viewable object format is described in more detail later in this document. Actors and semaphores are typically created at runtime, so the change to their data format should have no significant effect.
View chains, which are currently implemented as viewables linked by their next and previous fields, need to be re-implemented, probably as lists. Class ViewChainList will not exist in Rosemary.
In Rosemary, the extra data of objects can be structured or unstructured. Structured information is stored in extra data as a list. Entries in this extra list must be of the same data type. This allows Magic Cap to iterate through an object's extra data without needing custom EachExtraField() methods, which is the case in Magic Cap 1.x. This new structure affects the many list classes in Magic Cap.Because the type of an extra list entry is declared in a class definition, the object compiler can calculate the length of static list instances, making the length field of list classes unnecessary: the first word of extra data contains the count of list entries and the word format of the entries. A bit in the object header specifies whether extra data should is a structured list or contains unstructured data.
Since the length field is no longer present, the Length() and SetLength() attribute of lists have been removed. Use Count() to find the length of a list object.
The format of the extra list can be queried using the new operations ObjectFormat(), FixedFormat(), ExtraListFormat(), and SetExtraListFormat(). You can find out of the extra data of an object is a list by using the new ExtraIsList() attribute. Subclasses of FixedList can control the format of list entries by overriding InitialListWordFormat().
Class AbstractList has been removed; its API has been moved into class FixedList, which is now an abstract class. Because only one data type can be stored in structured extra data, many subclasses of FixedList have been created to store different types of data: ByteList, ClassNumberList, ClassOperationList, IntegerList, IntrinsicNumberList, ObjectList, OperationNumberList, and ShortIntegerList.
The Array class has been removed from Magic Cap. Use a FixedList subclass instead.
The EachElement() operation had some half-baked support for allowing iterators to modify elements. This code has been removed. EachElement() iterators can only read from list elements.
The basic list element manipulation methods implemented by FixedList have been renamed. The word "element" is now spelled out in names of methods instead of using the abbreviation "elem". Classes which override any of these methods need to change to reflect the new names.
Removed FixedList_ElementValue.
Removed the FirstElement() and LastElement() methods from the FixedList class.
Rosemary provides distinct list classes for various data types, such as ByteList, ClassNumberList, ClassOperationNumberList, IntegerList, etc. Some of these classes did not implement the full set of list operations (At, ReplaceAt, AddAt, AddLast, and Find). The missing calls have been completed. These routines are type safe and should be used instead of the old Element calls.
Added SwapElements() call to class FixedList so you can swap elements without removing one and adding another.
A new class ConcatenatedList has been added. This class acts like a read-only list composed of a number of other lists. This class was introduced as part of the work to speed up unpacking name cards.
The parts of class SortedList that handle stacks have been moved into a new class, SortedStackOfCards. Class SortedList now uses a faster sorting technique, using a fat-pivot QuickSort that uses the median technique for choosing pivot values, instead of the slower insertion sort.
SortedList_FindItem is now a public method.
Removed Empty() from HasCount and subclasses and replaced it with a new method, HasElements(). HasElements() can be more efficient than Count() for some list implementations. HasElements() is better than Empty() because it can be noFail, since HasElements(nil) should be false, but Empty(nil) should be true.
Moved FirstNonNil() from class HasIndexing to its superclass HasIterator, where it should have been in the first place.
The Rosemary Magic Cap API tries to avoid having multiple operations have the same name but different interfaces. Since Magic Cap doesn't do polymorphism, this is just plain confusing. Many operations have been removed or renamed to avoid this problem. Removed the collection operations Compare(), Examine(), Exclude(), Include(), ShallowCopy(), Difference(), Intersection(), Union(), Drop(), Find(), Rekey(), Transpose(), Append(), Add(), Get(), Reposition(), Set(), PushItems(), Top() and Swap().
The CustomList class has been removed. Custom lists were object lists that did not own the objects referenced in the list. Class ObjectList now defines the attribute OwnsElements() which specify whether the object list maintains strong or weak references to the list elements.
Push() and Pop(), which are methods of class Stack in Magic Cap 1.x, are methods of class ObjectList in Rosemary.
Rosemary changes the way extra data can be used. If extra data is used to keep a list, only one data type can be represented in the extra data. Because class Viewable already uses extra data to store strong object references to subviews, class GridView can no longer keep column information entries in extra data. Instead, new fields have been added to GridView to keep the information that used to be stored in extra data. There are individual lists that keep the column offsets, column flags and column keys. The type entry was never used so has been removed without create a new list for it.The method ListView_ValueAt has been replaced by CellValue(). The original routine was generic; it could return cell values as various data types. The price of this flexibility was complexity of the ListView class. For Rosemary, the functionality of ListView has been restricted to text data in cells. Introduced new mechanism for coming up with a small image to display next to list entries. The class operation Object_SmallClassImage returns an image to be displayed next to entries in a list view. To provide an image for a class, add the class to iClassesWithSmallImages, and the image to be displayed to iSmallImagesForClasses. The suggestions for discarding lists will use these images.
Because of the restrictions imposed on extra data by the new runtime, the key field, which was used to hold operation numbers, is no longer specified in the extra data portion of grid views. Instead, these keys are kept in an operation number list referenced by the new field, GridView_columnKeys.
List views now reset their scroll position when they notice that so many items have been destroyed that they are now displaying zero items. This was showing up when the user checked multiple rows in the suggestions for discarding or filing scene and then pressed "discard".
Created new mixin HasBuiltInScrollArrows so classes other than list views can save the overhead of separate ScrollArrow objects. ListView now inherits from this class.
CheckboxListView now calls NoticeChange on itself when a row is checked or unchecked so observers will be told. Added operations CheckRow(), UncheckRow(), CheckAllRows() and UncheckAllRows(). Option-touching a checkbox turns all checkboxes on or off.
BrowsingListViewScene now contains a CheckboxListView instead of an ordinary ListView.
Class SynchedListView now defines a listAttribute field that is used by an instance to get its list from its target. Before this, each target had to implement a List() operation to work with this kind of list view. Removed Task_List and NumberingPlan_List which were only there to support synched list views.
Some additional list view classes have been created to support the new user interface. EditableTargetedListView allows a list view to edit its selection with the attribute window's spout pointing to the center of the list view. DialingCountryListView is a subclass of EditableTargetedListView that allows users to add new locales from from the list view.
Class IndexedListView is a fully internationalized list view that contains an initial column that makes it easy to find a name:
A Abel Adams Anderson B Baker Bobbsey Added the operation GridView_GridLineBounds which returns the content bounds used for drawing column and row lines. IndexedListView overrides this operation so that grid lines don't get drawn in the index column.
The AttributeType() operation has been removed from Magic Cap in Rosemary. The TargetedListView class has been changed to not call AttributeType(). A new subclass of TargetedListView, ChoiceBoxListView, has been created to deal with the single case in Magic Cap where TargetedListView was used to handle non-object attributes. The useItemSelected flag is now defined for this subclass only, and is no longer defined in gridFlags.
ColumnTitle() now returns a text object instead of modifying one.
The editableListFlags field of class EditableList, the entryFlags field of class ListEntry, and gridFlags field of class GridView have been split into individual Boolean attributes.
Several column information flag values are obsolete and are no longer supported. The flags valueIsAttribute, valueIsTextInfo, valueIsEditable, omitColumnLine and valueIsAbbreviated are obsolete. If you used these flags, you should set the appropriate bit to 0.