Tuesday, 7 February 2012

Project Rename Produces Duplicate

In the IDE, right clicking on the Project node in the Project pane gives an option to "Rename Project ID".
Renaming a Project in the 3e IDE
On the face of it, renaming the Project seems to work as expected. However, if the IDE is refreshed (or closed and reopened), both a Project with the old name and a Project with the new name now exist. This can be seen by pressing the Open... button at the top of the Project pane.

To workaround this, best practice when renaming Projects would be to:
  1. Rename the Project.
  2. Save the Project.
  3. Refresh the IDE (Refresh button next to Logout).
  4. Open the Project with the old name.
  5. Delete the Project with the old name.
  6. Open the Project with the new name.
This avoids a build up of unnecessary, renamed Projects.

Friday, 3 February 2012

Exception Raising

The standard method of raising exceptions in 3e is to display them in the top Exception panel - the panel shared with other item lists such as the Worklist.
Exception raised in Proforma Generation Process
To raise an exception in this way, the Exception property of the Process's underlying Object must be set to an instance of the NxApplicationException class. For example, from within the Object:
Me.Exception = New NxApplicationException(New Guid("430e4f35-2834-46ea-b031-b718054c7f62"))

Or from a Process:
Me.ProfMaster.ProformaCollection(0).Exception = New NxApplicationException(New Guid("430e4f35-2834-46ea-b031-b718054c7f62"))

The GUID value is set to the Id of a Message that describes the error.
To remove the Exception, set the Exception property to null:
Me.Exception = Nothing