MasterStudio Release Notes

The following pages contain detailed notes for each MasterStudio release:

For PlanBoard-specific issues, please refer to the latest PlanBoard for Omnis Studio Release Notes.

MasterStudio Known Issues

Limitations in all MasterStudio versions (including 1.x and 2.0):

  • You can use the local preferences manager MoManagerPreferencesLocal to store custom objects and variables, as long as the total (UUEncoded) Preferences file size does not exceed 10,000,000 characters.
  • In order to correctly print an entity grid, calculated fields it contains must use $cinst.iMyInstanceVariable to refer to instance variables that are defined in the entity grid. The report will not print calculated fields correctly if you omit the $cinst. prefix.

Notes about Omnis Studio version support:

  • Version 2.x of MasterStudio was tested and is supported on Omnis Studio 4.3.1, 5.0-5.2.2, or 6.0.1. Download the latest updates from www.omnis.net.
  • Version 1.1.x of MasterStudio requires Omnis Studio 4.1.1, 4.2, or 4.3.1. MasterStudio 1.1.x running on Omnis Studio versions below 4.3.1 was supported until July 1, 2010 and on Omnis Studio 4.3.1 until March 1 1, 2013.
  • In Omnis Studio 4.1 on Mac OS X, you may need to upgrade the libraries by opening them from the Omnis Studio browser. The No/Yes messages that Omnis displays during this process may not work if you dragged the demo library onto the Omnis icon or into the Omnis Studio browser.
  • MasterStudio on Omnis Studio versions below 4.1 was desupported on January 1, 2008.

Issues that were fixed in Omnis Studio 4.3:

  • When closing the demo library from the Omnis Studio 4 Browser by clicking on the "Close Library" button, the "Are you sure you want to quit this application?" message will not work. This does not happen when you close the library using the context menu.
  • On Mac OS X 10.4 "Tiger", small round buttons display with a small "black line" across the top and the bottom. This is true for all Omnis apps that use these small round buttons.

Limitation in MasterStudio 1.x:

  • A controller can have up to 100 subcontrollers. This means that you can never have more than 100 subwindows inside of another subwindow.

Known issue in MasterStudio 1.0.6 through 1.0.8:

  • When you edit an unmodified record and press Return without first leaving the field, the record is marked "Modified" but it is not yet saved. In that case, saving requires pressing Return a second time.
  • When running Omnis Studio versions older than 4.2 in "Rosetta" on Intel versions of Mac OS X 10.4.8, you must use MasterStudio 1.0.9 or PlanBoard 4.2.7 or higher. These updates contain a work-around for a bug in the Rosetta environment that causes the "int()" function to fail.

Known issue in MasterStudio 1.0.5:

  • Very rarely, Omnis may crash when browsing through master records that do not contain any detail records. This is fixed in MasterStudio 1.0.6, but can also be solved by commenting the following line in class MoDatabaseStatement, method $prepare:

    If len(iStatementSqlText)&iStatementPrepareOnceNY
      If pSqlText_opt=iStatementSqlText
        If pfTableRef_opt.$ref=iStatementTableRef.$ref
          If iV3StatementObject.$state<>kStatementStateClear
            ;  Quit method kTrue  ;; <-- comment this line
          End If
        End If
      End If
    End If
    ...

Known issues in MasterStudio 1.0.5 and earlier:

  • In a schema used by the Master-Detail framework, you must include a <PROMPT> tag for every column, even if you only use a few columns in your Master-Detail windows.
  • The demo application may prompt more than once whether you want it to quit, if you quit it by closing its library. To quit the demo application, please use "Quit" or "Exit" from the Demo menu. You can then close the main library without getting additional dialog messages.

Known issues in MasterStudio 1.0.2:

  • Before using MasterStudio 1.0.2 with Omnis Studio 4: Using the Omnis "Find and Replace" tool, select ALL libraries. Then replace all occurrences of method "$userInfo" to "$notificationInfo".
  • If you modify an entity by pasting a value into one of its fields (by using Control-V or the corresponding Edit menu) MasterStudio may not recognize the change.

Known issues in MasterStudio 1.0.0 - 1.0.1:

  • If you override or replace any of MasterStudio's classes in your own library, please be sure to remove the <MO_CHECK> tag from the $vcsbuildnotes attribute of the MasterStudio libraries. This ensures that the class broker will rescan your library and use your newer versions of these classes. See "Library Class Scan" in chapter 4.2.2 of the MasterStudio manual.

For known issues related to PlanBoard, please refer to the PlanBoard for Omnis Studio Known Issues.

MasterStudio Programming Tips
  1. You can use masked entry fields instead of regular entry fields. Even though masked entry fields do not have a $text attribute, the fields manager will work fine if you assign the $text attribute of $cfield in the $construct method of the masked entry field.
  2. If you implement an $event method, it may be triggered again if you quit it using "Quit event handler {Pass to next handler}". When implementing an $event method behind a field, you should pass the event to the next handler by calling $cinst.$control(), instead of using "Quit even handler {Pass to next handler}":

    On evKey
      Do $cinst.$objs.$findname('pbSpeak').$enableDisable
      Do $cinst.$control()
      Quit event handler

  3. If you open a MasterStudio dialog message after trapping an event such as evKey or evClick, then please make sure that you process the event before opening the dialog message, using:
    Process event and continue ;; with or without the "Discard event" option
    Due to a bug in Omnis Studio, if you do not process the event before entering the Omnis Enter data statement, then the method containing Enter data may not return the value it should.
  4. If you queue notifications (that is, post them using kMoPostWhenIdle), then these notifications are usually posted as soon as the last $releaseNotifications is called at the end of MasterStudio's event handlers. However, these notifications are not yet sent if they are queued from behind a simple custom event handler behind a field or button, unless the custom event handler passes the event on to the $control method of the (sub)window. If no MasterStudio event handler is called, then the notifications will remain queued until the next event happens.
    On evClick
      Process event and continue
      Do MoContext.$notificationCenter().$holdNotifications
      ;; YOUR METHOD(S) HERE
      Do MoContext.$notificationCenter().$releaseNotifications
      Quit event handler

    Note that sometimes notifications are queued implicitly. For example, an error message is queued when a SQL error occurs. It is therefore a good idea to always call the MasterStudio event handler from your own field event handlers using ...
      Do $cinst.$control()
      Quit event handler
  5. To support users running Omnis 3.3.3, 4.0.3, or 4.1.1 in the Rosetta environment on Intel Macs, you should call method MoManagerPlatform.$int() instead of the built-in int() Omnis function. This work-around is not needed with Omnis Studio 4.2 and higher.

MasterStudio Book Errata

This is a listing of errors found in the first edition of the MasterStudio Developer Manual. These errors were fixed in the second and third editions.
  • Page 38: $superclass in the screenshot at the top of the page still refers to library "MdFrameworkClasses". This should be "MoMasterDetailClasses".
  • Page 47: "In this chapter," should read: "In this section,".
  • Page 81, first line: The reference to chapter "fi" should be chapter "4.3".
  • Page 122: $isWindows: Returns kTrue on any Windows platform.
  • Page 190, last sentence: Remove the words "these values".
  • Page 208, bottom of page: Last "pFirstRow_opt" item should read "pLastRow_opt".
  • Page 234, chapter 6.2.6 last sentence of first paragraph: "when after" should be "after".
  • Page 243, side note: You cannot currently use your own #ICONS system table to replace icons that are being used by classes in the MasterStudio libraries. If you add icons that replace default MasterStudio icons, we recommend you store them in USERPIC.DF1.
  • Page 251, Master-Detail UML Diagram: The aggregate relationship between an entity controller and its grid controller(s) is 1:n. Thus the line between MdEntityController and MdEntityGridControllerGeneric should have an "*" instead of a "1".

MasterStudio Book Addenda

The following addenda are for the SECOND EDITION of the manual:
  • Chapter 4.10.1 "Table Classes and Schema Classes", page 184:
    Accessor $columns was renamed to $moColumns for improved compatibility with Omnis Studio 4.x in MasterStudio 1.0.9 and higher.
  • New features of MasterStudio 1.0.9, 1.1.0, and 2.0.0 were incorporated into the third edition of the manual.



The list below includes addenda for the FIRST EDITION of the manual. These enhancements were included in the SECOND EDITION of the MasterStudio Developer Manual.

The following features were added in version 1.0.1 of MasterStudio. You may want to add notes to the corresponding chapters in your manual:
  • Chapter 4.3.7 "Window Contexts", page 101:
    A window context's $openWindow method now accepts a notification object as an alternative to the location type, meaning that you can trigger a window to be opened by using $notifyOnce. Pass the window location parameter as $userInfo of the notification.
  • Chapter 4.5.4 "String Functions", page 113:
    Functions Manager/$conciseText: This function returns a concise version of a text variable you pass into it, suitable for display in a tooltip. Carriage returns are replaced by bullets; if the text is too long, it is automatically postfixed by an ellipsis.
  • Chapter 4.5.5 "List Fields Manager", page 115:
    Fields Manager/$redrawColumn: This new method allows you to automatically redraw all field instances for a column name. Obviously, this only works for fields that previously registered themselves with the fields manager.
  • Chapter 4.5.5 "List Fields Manager", page 115:
    Fields Manager/$register...: These methods now accept a second parameter pkIsPreparedNY_opt. If you pass kTrue, then the field's visual styles will NOT be controlled by the fields manager. You can now give the field any visual style and still have its events handled by the fields manager. (Previously, you had to implement your own $event handler for fields that were not managed by the fields manager).
  • Chapter 4.6.3 "Component Controller Operations", page 136:
    Component controller/$componentDidConstruct: This template method is called right before a component becomes visible after it is opened or after the component is reloaded. Note that the component's $construct method may already have finished if the subcomponent is instantiated simultaneously to its parent component. In this case, $componentDidConstruct is called right before the outer parent component's $construct method finishes executing. $componentDidConstruct is especially useful in cases where complex code in $componentWillConstruct exceeds the Omnis method stack. Just like $componentWillConstruct, $componentDidConstruct receives a reference to the newly constructed component.
  • Chapter 4.7.4 "Pane Selector Controller Operations", page 150:
    Pane Selector Controller/$initializePane: This new method allows a pane controller that is nested under a pane selector to be initialized BEFORE it is activated. Normally, a pane selector will call $finishInitialization only for the subcontroller that matches the currently visible pane (tab or icon). This speeds up initialization of a complex window: Subcontrollers for invisible tabs do not need to finish initializing. Method $initializePane accepts the same parameters as $activatePane: pPaneIndex_opt and pPaneId_opt.
  • Chapter 4.7.4 "Pane Selector Controller Operations", page 150:
    Pane Selector Controller/$redrawSelectors can be used to force redraw of the individual tabs or icons in a pane selector. You should call this method after the text or tooltip of one of the sub-panes changes.
  • Chapter 4.11.3 "Posting Modes", page 176:
    You can now pass a "hold level" to $notificationCenter().$holdNotifications: By passing 2 or higher, you can release notifications in multiple phases using release conditions (explained in chapter 4.11.4).
  • Chapter 5.3.1 "Entity Schemas", page 201:
    Support of case insensitive searching of character and national fields (FP 27): From now on, all searches are case insensitive by default. On Oracle, queries use the UPPER function. On OmnisSQL, the where-clause uses multiple AND comparisons. To re-enable case sensitive searching, add a <CASE/> tag to the primary key in the schema class.

The following features were added in version 1.0.2 of MasterStudio:
  • Chapter 4.10.3 "Database Menus", page 170:
    The standard database menu MoDatabaseMenu no longer requires a parameter pointing to the session it should use. It will automatically use MoContext.$application().$session if you omit the session reference.
  • Chapter 5.2.2 "Entity Delegate Initialization Methods", page 196:
    Fields Manager/$addModelDefinition can be used to add column definitions for custom columns that were added to a list.
  • Chapter 5.2.2 "Entity Delegate Methods", page 198:
    Entity Delegate/$currentRecordEdited: This template method is called right after the user starts editing a record, i.e. as soon as the first modification is made to a record. Parameter pkIsNewRecord contains kTrue if the record is a new record; kFalse if it is an existing record. Parameter pColumnName_opt contains the name of the column the user started editing (if the column is managed by the fields manager). You may use this parameter to avoid overwriting a column the user started typing into.
  • Chapter 5.2.2 "Entity Delegate Methods", page 198:
    Entity Delegate/$defaultRecord: This template method is called right after a new empty line is added to the entity list. While this method is being executed, the current line of iMdListRef is set to the new line. Do not count on this being the last line; this may not necessarily be the case in the future! Note that the list manager will call $mdDefaultRecord in the list (table class) before calling $defaultRecord for the entity delegate.
  • Chapter 5.2.2 "Entity Delegate Methods", page 198:
    Entity Delegate/$filterRecords: This template method is called right after records are fetched from the database. iMdListRef contains all newly fetched records. You may filter the list by removing unwanted records, update calculated values, etc. To accept the (remaining) records, return kTrue. Return kFalse (or remove all lines) to reject the new records.
  • Chapter 5.3.2 "Entity Table", page 205:
    Entity Table/$mdCurrentRecordChanged: Override this new template method to adjust variables whenever the current record changes. This method is called BEFORE $currentRecordChanged in the entity delegate or any of the entity panes.
  • Chapter 5.3.2 "Entity Table", page 205:
    Entity Table/$mdDefaultRecord: This template method is called right after a new line is added to the entity list. While this method is called, the current line is set to the new line. Do not count on this being the last line; this may not necessarily be the case in the future!
  • Chapter 5.3.2 "Entity Table", page 205:
    Entity Table/$mdDidModify: Override this template method to take action after a column value is modified. If parameter pColumnName_opt is empty, then an unspecified column has changed.
  • Chapter 5.3.2 "Entity Table", page 205:
    Entity Table/$mdMayModifyColumn: Override this template method to influence whether a column may be modified. Single parameter: pColumnName. Return kFalse if the column may not be modified: The user will not be able to modify the column and it is reverted to its previous value. Note that this method is only called for single columns that are handled by the fields manager. If you modify a column yourself (i.e. hard-coded), it is your own responsibility to call this list method. You usually would do this by calling $setModified('COLUMN_NAME') of the record manager (see below).
  • Chapter 5.3.3 "List Manager Attributes", page 207:
    List Manager/$managerDetail: This new attribute returns a reference to the list manager of a named detail entity. Parameter pEntityId must be the entity id of the detail entity, as it was specified as the paneId in $initFrameset.
  • Chapter 5.3.3 "List Manager Attributes", page 207:
    List Manager/$managerParentFields: This new attribute returns a reference to the fields manager of the parent entity.
  • Chapter 5.3.3 "List Manager Attributes", page 207:
    List Manager/$managerParentList: This new attribute returns a reference to the list manager of the parent entity. (Use ...$managerParentList().$list to get a reference to the parent list itself).
  • Chapter 5.3.3 "List Manager Attributes", page 207:
    List Manager/$managerParentRecord: This new attribute returns a reference to the record manager of the parent entity.
  • Chapter 5.3.3 "List Manager Attributes", page 207:
    List Manager/$managerReturnedList points to the object that requested data from the pick list. Usually, this is the list manager that requested the data.
  • Chapter 5.3.3 "List Manager Attributes", page 207:
    List Manager/$previousRecord: This new attribute returns the previously current record, or an empty record if none exists. You could use this to copy values from the previous line as default values into a new line.
  • Chapter 5.3.4 "Record Manager Operators", page 212:
    Record Manager/$setModified: This method now optionally accepts the name of the column that is to be modified. If the column or record may not be modified, this method returns kFalse. Otherwise, the record is marked "modified".
  • Chapter 5.4.4 "Sort Buttons", page 217:
    If you set the $tooltip attribute for a sort button managed by the fields manager, then this $tooltip will be used as the sort button text instead of the label from the schema <PROMPT> tag. This allows a foreign key sort button (which often points to a field that has "Name" or "Description" in its <PROMPT> tag) to have a label that is more specific than the prompt defined in the schema.
  • Chapter 5.4.5 "Installing the Component Store as a Tool", page 218:
    The class broker now automatically opens any tasks that have a <STARTUP/> tag in their description. If you have the MoDevelopmentClasses library installed, then the MasterStudio Component Store is automatically installed as an add-on tool as soon as you open the root context.
  • Chapter 6.3.3 "Field Styles", page 241:
    New field styles MoMdEditText and MoMdEditTextDisabled were added to the #STYLES table. These field styles can be used to assign the appropriate font to a field whose other attributes (background color and pattern) are controlled by the developer or by notation.

The following features were added in version 1.0.3 of MasterStudio:
  • Chapter 4.7.4 "Pane Selectors", page 149:
    A new pane selector type, kMoPaneSelectorInvisible, was added. This pane selector type can be used to implement "invisible" pane selectors that are managed by your own code. Pane selectors now also support a number of delegate methods (see below). If a pane selector is instantiated by a frameset controller, then the frameset delegate is also used as the delegate for the subpane selectors.
  • Chapter 4.7.4 "Pane Selectors", new section "Pane Selector Delegate Methods", page 149:
    New Pane Selector delegate methods were created and added to a new superclass, MoControllerPaneSelectorDelegateSuperclass: $subpaneSelectorInitialized, $subpaneInitialized, $subpaneActivated, $subPaneDeactivated. These new delegate methods give developers fine-grained control over pane selectors: You can now add code right when a pane selector controller is initialized, when each subpane is initialized, when a subpane is activated, and when a subpane is deactivated. A frameset delegate (and thus each entity delegate) automatically becomes the delegate for each pane selector initialized by that frameset. Note that these delegate methods receive a reference to the corresponding pane controller, allowing you to access any of their attributes (including their pane id, $paneId).
  • Chapter 4.11.2 "Sending Notifications", page 174:
    Notification coalescing option kMoNotificationCoalesceKeepFirst was added to the notification center. This allows notifications to be coalesced, whereby the first notification is sent rather than the last one. To activate this function, add MoConstants.kMoNotificationCoalesceKeepFirst to any of the other coalescing modes.
  • Chapter 4.11.4 "Conditional Notifications", page 177:
    Notification condition MoConstants.kMoConditionCommand was added. This condition is raised before any command is executed by the command controller.
  • Chapter 5.2.2 "Entity Delegate Methods", page 198:
    Entity Delegate/$showPreviousNext: By returning kFalse from this method, a developer can remove the "Previous" and "Next" commands from the entity's window.
  • Chapter 5.2.2 "Entity Delegate Methods", page 198:
    Entity Delegate/$showAppend: By returning kFalse from this method, you can remove the "Append" option from Find mode. Users will no longer be able to append records found to the previous result set.
  • Chapter 5.2.2 "Entity Delegate Methods", page 198:
    Entity Delegate/$sqlAndConditionFromRow: This delegate method allows you to change each SQL "AND" condition that is added by the list manager after the user enters a search value for a column in Find mode. You can replace the default condition by your own, or you can omit the condition entirely. See the source code for parameters and other details.
  • Chapter 5.2.2 "Entity Delegate Methods", page 198:
    Entity Delegate/$sqlAppendConditionsForRow: This delegate method allows you to append your own search conditions to the default SQL where clause. You can also modify or replace the default AND-conditions that were generated by the list manager. See the source code for parameters and other details.
  • Chapter 5.3.1 "Entity Schemas", page 201, extra note:
    If a non-text column in a schema class allows #NULL values (i.e., its $nonull attribute is kFalse), then MasterStudio will accept 0 (zero) as a valid value if that column is mandatory.
  • Chapter 5.3.1 "Entity Schemas BATCH", page 201, extra note:
    A new optional MODE attribute was added to the BATCH tag in the schema class. If MODE="0" or if you omit this attribute, a window that is based on a table that has the <BATCH> tag will open in Find mode. If you do not want the window to initially open in Find mode, add MODE="1" to the tag, as in: <BATCH MODE="1">500</BATCH>.
  • Chapter 5.3.1 "Entity Schemas VIEW", pages 204/205, extra note:
    The <VIEW> tag accepts and optional attribute CONTEXT allowing you to have the schema use a custom window context rather than the default window context (MdWindowContext): <VIEW CONTEXT="MyWindowContextClass">MyEntityDelegate</VIEW>.
  • Chapter 5.3.2 "Entity Table", page 205:
    Entity Table/$mdShouldCommit: This template method is called right before changes are committed to the database, i.e. right before the transaction is finished. You could use this method to call a stored procedure in the database, or to calculate custom list columns to reflect the new records. Return kTrue if the commit may take place. Return kFalse if you want a rollback to occur.
  • Chapter 5.3.3 "List Manager Operators", page 208:
    List Manager/$addJoinColumn: This method now has an optional fifth parameter pkCouldBeNull_opt. Pass kTrue if #NULL is a valid value for the joined column. If you do not pass any parameter, then this value is automatically derived from the column's $nonull setting in the schema..
  • Chapter 5.4.5 "Hyperlinks", page 219, extra note:
    When the cursor is in a joined field, the user can press <Alt>-<Return> (Option-Return on the Mac) to open the corresponding pick list.

The following features were added in version 1.0.4 of MasterStudio:
  • Chapter 4.9 "Standalone View Objects", page 159:
    A new reusable view class MoViewProgressBar was added. This view class can be used as a progress bar at the top or bottom of a containing subwindow.
  • Chapter 4.10.5 "Database Statements", page 172:
    The $prepare statement in the MasterStudio statement object MoDatabaseStatement will not prepare the same database statement twice. This improves performance for multiple repeated database actions, such as updates, deletes, or repeated selects.

    In order for $prepare to determine whether the SQL statement is the same, you must pass the full SQL string into it as the first parameter and a reference to the table instance as the second parameter. If you have already written the statement using STA: commands, the third parameter must be kTrue.

    (Note that OmnisSQL will crash if a select statement containing one or more joins is repeated. MasterStudio's table superclass automatically detects this)
  • Chapter 5.3.1 "Entity Schemas BATCH", page 201, extra note:
    A new optional COUNT attribute was added. If you set the new "COUNT" attribute in the <BATCH> tag of a schema class to "1", MasterStudio windows will perform a count of the total number of records in the database. The total number of records is displayed at the top of the entity grid. For an example, see the "Employees" window in the demo application.

The following features were added in version 1.0.5 of MasterStudio:
  • Chapter 5.2.2 "Entity Delegate Methods", page 198:
    A new delegate attribute $countMode allows individual windows to override the default value of the "COUNT" attribute in the <BATCH> tag of the schema class. This allows individual windows to control whether they should count (and display) the total number of records in the database.
  • Chapter 5.2.2 "Entity Delegate Methods", page 198:
    Entity delegate method $sqlAndConditionFromRow now receives an optional parameter pSearchCriterion_opt that indicates the search criterion used by the current search (one of the MdConstants.kMdCriterion... constants indicating AND, OR, NOT, Larger Than, or Smaller Than).
  • Chapter 5.3.3 "List Manager Operators", page 208:
    Method $performSearch allows you to perform a search as if the user has clicked on the "Find" button. You can pass in your own list containing the search criteria to be used. List manager function $performSearch allows the search list to contain multiple search criterion rows. To use this feature, pass in the column number for the column containing the search criterion.

Changes in MasterStudio 1.0.6 through 1.0.8 are included in the second edition of the book and PDF. See the detailed release notes.



Copyright © 2014 Master Object AB Terms of Use