MenuHasParentException

From Xojo Documentation

Revision as of 16:26, 24 July 2019 by Gperlman (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
You are currently browsing the old Xojo documentation site. Please visit the new Xojo documentation site!

Class (inherits from RuntimeException)


New in 2011r3

Occurs when code tries to use the same MenuItem in different places.

Properties
ErrorNumber Message
Methods
Stack StackFrames

Sample Code

Whenever you need to use the same MenuItem in different places, use the Clone method to create a new copy of the MenuItem and its children, if any.

Var mi As New MenuItem("My menu item")
Var myClone As MenuItem

myClone = mi.Clone //Creates an independent copy of "mi"

See Also

MenuItem, RuntimeException classes; Function, Catch, Raise statements; Nil datatype; Exception, Try statements.