Mantis - Squeak Packages
Viewing Issue Advanced Details
6657 OmniBrowser minor always 09-03-07 12:44 01-29-08 19:07
Damien Cassou  
cwp  
normal  
resolved  
no change required  
none    
none  
0006657: There is no way of retrieving what is selected from the OBDefinition of OBDefinitionPanel
Even if you can ask the OBPluggableTextMorph instance his #selectionNode, there is no way of getting this value from an OBDefinition or OBDefinitionPanel. Methods like #selection or #textSelection always returns (1 to: 0).

Notes
(0011650)
dr   
01-09-08 13:32   
I agree that it makes sense to ask the OBDefinitionPanel for the selected node in some situations. I implemented this possibility for the OB-Enhancement package in a subclass of OBDefinitionPanel. I could backport this to the general OBDefinitionPanel class.
However, I think OBDefinition should not know the selected node by default. When a specific definition, eg. the method definition or the class definition has to know the method or class, then it should get passed to it. But I'm not sure if it's a good idea to make any definition aware of the selected node, because this knowledge is not needed by most definitions. And for those that do need the information, it make sense to pass it to them by using dedicated subclasses of OBDefinition.
(0011652)
Damien Cassou   
01-09-08 13:36   
I agree with you. I've sent a mail to ob-dev about this. We will see if I can close the report.
(0011718)
Damien Cassou   
01-26-08 14:45   
What about this bug?
(0011726)
cwp   
01-29-08 19:06   
I think David is right. Another option for the cases where you do want to know about the current node, and be notified when it changes is to create a custom subclass of OBPanel, and use that instead of OBDefinitionPanel.