Trait sap_scripting::traits::GuiComponentMethods
source · pub trait GuiComponentMethods<T: HasDispatch = Self>: HasDispatch<T> {
// Provided methods
fn container_type(&self) -> Result<bool> { ... }
fn id(&self) -> Result<String> { ... }
fn name(&self) -> Result<String> { ... }
fn kind(&self) -> Result<String> { ... }
fn kind_as_number(&self) -> Result<i64> { ... }
}
Expand description
GuiComponent is the base class for most classes in the Scripting API. It was designed to allow generic programming, meaning you can work with objects without knowing their exact type.
Note: Type is named kind
due to Rust restrictions.
Note: Parent is not currently implemented.
Provided Methods§
sourcefn container_type(&self) -> Result<bool>
fn container_type(&self) -> Result<bool>
This property is TRUE, if the object is a container and therefore has the Children property.
sourcefn id(&self) -> Result<String>
fn id(&self) -> Result<String>
An object id is a unique textual identifier for the object. It is built in a URLlike formatting, starting at the GuiApplication object and drilling down to the respective object.
sourcefn name(&self) -> Result<String>
fn name(&self) -> Result<String>
The name property is especially useful when working with simple scripts that only access dynpro fields. In that case a field can be found using its name and type information, which is easier to read than a possibly very long id. However, there is no guarantee that there are no two objects with the same name and type in a given dynpro.
sourcefn kind(&self) -> Result<String>
fn kind(&self) -> Result<String>
The type information of GuiComponent can be used to determine which properties and methods an object supports. The value of the type string is the name of the type taken from this documentation.
sourcefn kind_as_number(&self) -> Result<i64>
fn kind_as_number(&self) -> Result<i64>
While the Type property is a string value, the TypeAsNumber property is a long value that can alternatively be used to identify an object’s type . It was added for better performance in methods such as FindByIdEx. Possible values for this property are taken from the GuiComponentTypeenumeration.