Removing actions from a Context Menu

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Removing actions from a Context Menu

Lindsey, Portland

We have an annotation layer containing GraphicsGroups that one of our dock windows is watching, and if the user were to delete, convert, copy or rename this layer, it would cause our code to crash. We have removed the actions from the context menu for Delete, Convert, Copy and Rename of the annotation layer, but the Rename action for the child GraphicGroups still appear and causes a crash if the user clicks it. Is there a way to remove this action as well?

 


This message and any enclosures are intended only for the addressee.  Please  
notify the sender by email if you are not the intended recipient.  If you are  
not the intended recipient, you may not use, copy, disclose, or distribute this  
message or its contents or enclosures to any other person and any such actions  
may be unlawful.  Ball reserves the right to monitor and review all messages  
and enclosures sent to or from this email address.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

RE: Removing actions from a Context Menu

Kip Streithorst
Administrator

Dave might know if you can remove those context menu actions.  Let me say however, that the user can rename the layer if it’s the session explorer without using the context menu.  The user can rename a layer by either double-clicking on it in the session explorer or pressing F2.  Because of that I would suggest you fix the crashes in your code instead of trying to remove context menu’s.  If you think the crash is somehow related to something in Opticks, please send along another question.

 

Thanks,

Kip

 


From: Lindsey, Portland [mailto:[hidden email]]
Sent: Monday, February 11, 2008 10:28 AM
To: [hidden email]
Subject: Removing actions from a Context Menu

 

We have an annotation layer containing GraphicsGroups that one of our dock windows is watching, and if the user were to delete, convert, copy or rename this layer, it would cause our code to crash. We have removed the actions from the context menu for Delete, Convert, Copy and Rename of the annotation layer, but the Rename action for the child GraphicGroups still appear and causes a crash if the user clicks it. Is there a way to remove this action as well?

 


This message and any enclosures are intended only for the addressee.  Please  
notify the sender by email if you are not the intended recipient.  If you are  
not the intended recipient, you may not use, copy, disclose, or distribute this  
message or its contents or enclosures to any other person and any such actions  
may be unlawful.  Ball reserves the right to monitor and review all messages  
and enclosures sent to or from this email address.

This message and any enclosures are intended only for the addressee.  Please  
notify the sender by email if you are not the intended recipient.  If you are  
not the intended recipient, you may not use, copy, disclose, or distribute this  
message or its contents or enclosures to any other person and any such actions  
may be unlawful.  Ball reserves the right to monitor and review all messages  
and enclosures sent to or from this email address.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

RE: RE: Removing actions from a Context Menu

rgoffena

“The user can rename a layer by either double-clicking on it in the session explorer or pressing F2.  Because of that I would suggest you fix the crashes in your code instead of trying to remove context menu’s.  If you think the crash is somehow related to something in Opticks, please send along another question.”

 

So if I have an object which currently depends on an AnnotationLayer having a certain name, I should probably modify my class to store an AttachmentPtr<AnnotationLayer> instead of having the class store a string containing the name of the AnnotationLayer?

 


Robert Goffena
Ball Aerospace & Technologies Corp.
2875 Presidential Dr.

Fairborn, OH 45324-6269
Phone:  (937) 320-4096
Fax:  (937) 429-1687
Email:  [hidden email]


From: Streithorst, Kip [mailto:[hidden email]]
Sent: Monday, February 11, 2008 10:38 AM
To: [hidden email]
Subject: RE: Removing actions from a Context Menu

 

Dave might know if you can remove those context menu actions.  Let me say however, that the user can rename the layer if it’s the session explorer without using the context menu.  The user can rename a layer by either double-clicking on it in the session explorer or pressing F2.  Because of that I would suggest you fix the crashes in your code instead of trying to remove context menu’s.  If you think the crash is somehow related to something in Opticks, please send along another question.

 

Thanks,

Kip

 


From: Lindsey, Portland [mailto:[hidden email]]
Sent: Monday, February 11, 2008 10:28 AM
To: [hidden email]
Subject: Removing actions from a Context Menu

 

We have an annotation layer containing GraphicsGroups that one of our dock windows is watching, and if the user were to delete, convert, copy or rename this layer, it would cause our code to crash. We have removed the actions from the context menu for Delete, Convert, Copy and Rename of the annotation layer, but the Rename action for the child GraphicGroups still appear and causes a crash if the user clicks it. Is there a way to remove this action as well?

 


This message and any enclosures are intended only for the addressee.  Please  
notify the sender by email if you are not the intended recipient.  If you are  
not the intended recipient, you may not use, copy, disclose, or distribute this  
message or its contents or enclosures to any other person and any such actions  
may be unlawful.  Ball reserves the right to monitor and review all messages  
and enclosures sent to or from this email address.

This message and any enclosures are intended only for the addressee.  Please  
notify the sender by email if you are not the intended recipient.  If you are  
not the intended recipient, you may not use, copy, disclose, or distribute this  
message or its contents or enclosures to any other person and any such actions  
may be unlawful.  Ball reserves the right to monitor and review all messages  
and enclosures sent to or from this email address.

This message and any enclosures are intended only for the addressee.  Please  
notify the sender by email if you are not the intended recipient.  If you are  
not the intended recipient, you may not use, copy, disclose, or distribute this  
message or its contents or enclosures to any other person and any such actions  
may be unlawful.  Ball reserves the right to monitor and review all messages  
and enclosures sent to or from this email address.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

RE: RE: RE: Removing actions from a Context Menu

Kip Streithorst
Administrator

That would be the way to do it.  And then just remember to check AttachmentPtr::get() doesn’t return NULL before calling methods on the AttachmentPtr.

 

Thanks,

Kip

 


From: Goffena, Robert [mailto:[hidden email]]
Sent: Monday, February 11, 2008 11:13 AM
To: [hidden email]
Subject: RE: RE: Removing actions from a Context Menu

 

“The user can rename a layer by either double-clicking on it in the session explorer or pressing F2.  Because of that I would suggest you fix the crashes in your code instead of trying to remove context menu’s.  If you think the crash is somehow related to something in Opticks, please send along another question.”

 

So if I have an object which currently depends on an AnnotationLayer having a certain name, I should probably modify my class to store an AttachmentPtr<AnnotationLayer> instead of having the class store a string containing the name of the AnnotationLayer?

 


Robert Goffena
Ball Aerospace & Technologies Corp.
2875 Presidential Dr.

Fairborn, OH 45324-6269
Phone:  (937) 320-4096
Fax:  (937) 429-1687
Email:  [hidden email]


From: Streithorst, Kip [mailto:[hidden email]]
Sent: Monday, February 11, 2008 10:38 AM
To: [hidden email]
Subject: RE: Removing actions from a Context Menu

 

Dave might know if you can remove those context menu actions.  Let me say however, that the user can rename the layer if it’s the session explorer without using the context menu.  The user can rename a layer by either double-clicking on it in the session explorer or pressing F2.  Because of that I would suggest you fix the crashes in your code instead of trying to remove context menu’s.  If you think the crash is somehow related to something in Opticks, please send along another question.

 

Thanks,

Kip

 


From: Lindsey, Portland [mailto:[hidden email]]
Sent: Monday, February 11, 2008 10:28 AM
To: [hidden email]
Subject: Removing actions from a Context Menu

 

We have an annotation layer containing GraphicsGroups that one of our dock windows is watching, and if the user were to delete, convert, copy or rename this layer, it would cause our code to crash. We have removed the actions from the context menu for Delete, Convert, Copy and Rename of the annotation layer, but the Rename action for the child GraphicGroups still appear and causes a crash if the user clicks it. Is there a way to remove this action as well?

 


This message and any enclosures are intended only for the addressee.  Please  
notify the sender by email if you are not the intended recipient.  If you are  
not the intended recipient, you may not use, copy, disclose, or distribute this  
message or its contents or enclosures to any other person and any such actions  
may be unlawful.  Ball reserves the right to monitor and review all messages  
and enclosures sent to or from this email address.

This message and any enclosures are intended only for the addressee.  Please  
notify the sender by email if you are not the intended recipient.  If you are  
not the intended recipient, you may not use, copy, disclose, or distribute this  
message or its contents or enclosures to any other person and any such actions  
may be unlawful.  Ball reserves the right to monitor and review all messages  
and enclosures sent to or from this email address.

This message and any enclosures are intended only for the addressee.  Please  
notify the sender by email if you are not the intended recipient.  If you are  
not the intended recipient, you may not use, copy, disclose, or distribute this  
message or its contents or enclosures to any other person and any such actions  
may be unlawful.  Ball reserves the right to monitor and review all messages  
and enclosures sent to or from this email address.

This message and any enclosures are intended only for the addressee.  Please  
notify the sender by email if you are not the intended recipient.  If you are  
not the intended recipient, you may not use, copy, disclose, or distribute this  
message or its contents or enclosures to any other person and any such actions  
may be unlawful.  Ball reserves the right to monitor and review all messages  
and enclosures sent to or from this email address.
Loading...