cancel
Showing results for 
Search instead for 
Did you mean: 

Select root with 'Selection Manager'

Creator
Creator

Hey guys,

 

i need help with the selectionManager. Currently the code does only support selecting children but not the root / assembly.

E.g we have a simple structure like this:

root
  |- child
  |- child 1

The user can only click on child and child 1, if he clicks on root nothing happens.


Maybe someone can help me ? Smiley Happy

 


Here the code - written in Java:

final Selection selectionManager = ui.selectionManager();
    final SelectTaggedObjectData selectObject = selectionManager.selectTaggedObject("",
                                                                                    title,
                                                                                    SelectionScope.WORK_PART_AND_OCCURRENCE,
                                                                                    true, false);

    final Response response = selectObject.response;
    if ((response.equals(Response.OBJECT_SELECTED)) || (response.equals(Response.OBJECT_SELECTED_BY_NAME)))
      return (NXObject) selectObject.object;

    return null;