Tuesday, May 21, 2013
HomeHomeDiscussionsDiscussionsS-Expert 3.0S-Expert 3.0Extending Smart Command missing private variable to access entity Extending Smart Command missing private variable to access entity
Previous
 
Next
New Post
5/17/2011 6:26 PM
 
During the tutorial for Adding a Smart Command chapter 6.2 it is mentioned in step 3 that there should be a private variable "selectedObject" to access the associated entity name "this.selectedObject.Name", but there does not seem to be a definitiona and implementation for "selectedObject" for SDesignSmartCommand - not sure how to access the entity in the command_click event code behind. 
 
New Post
5/19/2011 2:32 PM
 
scheini,
Add the following code to your command class.
[This code will be generated automatically in the next build]
private IEntity selectedObject;

public override bool OnShow(FrameworkElement visualElement, IDomainObject domainObject)
{
    this.selectedObject = domainObject as IEntity;
    return base.OnShow(visualElement, domainObject);
}
Best Regards,

Ahmed Negm - CTO - Sculpture Project
 
New Post
6/19/2011 1:23 PM
 
Fixed at build 3.0.5.2911.

Best Regards,

Tamer Aboraya - Product Manager - Sculpture project
 
Previous
 
Next
HomeHomeDiscussionsDiscussionsS-Expert 3.0S-Expert 3.0Extending Smart Command missing private variable to access entity Extending Smart Command missing private variable to access entity


DOWNLOAD   |   PRODUCTS   |   STORE   |   SUPPORT   |   BLOG   |   ABOUT
Copyright 2011 by Modelingsoft Corporation