Omnibrowser - browsing a class outside OB
David Mitchell
david.mitchell at gmail.com
Wed Jun 27 17:52:06 UTC 2007
Well you were faster and more thorough than me. I was just returning
to the thread to try to find out how to publish my fix:
'From Squeak3.10alpha of 30 March 2007 [latest update: #7119] on 27
June 2007 at 12:46:36 pm'! !OBSystemBrowserAdaptor class methodsFor:
'registry protocol' stamp: 'dmm 6/27/2007 12:35'!
fullOnClass: aClass selector: aSelector
^ aSelector isNil
ifTrue: [OBSystemBrowser openOnClass: aClass]
ifFalse: [OBSystemBrowser openOnClass: aClass selector: aSelector]
! !
I'm still learning how to publish.
On 6/27/07, Cédrick Béler <cbeler at enit.fr> wrote:
> Damien Cassou a écrit :
> > 2007/6/27, Cédrick Béler <cbeler at enit.fr>:
> >> Oh and last request, when OB is enabled by default, hitting the
> >> browse shortcut on a class name (in a worspace for instace) doens't work
> >> for me. The browser is opening with nothing selected.
> >> This is calling the following code wich reproduces for me the same
> >> problem (opens a browser with no class selected):
> >> OTToolset browse: WAComponent selector: nil.
> >>
> >> Is it normal (maybe I don't have the last version) because browsing a
> >> class (alt+b) inside OB works... ?
> >
> >
> > I have the same problem. If you have a fix, please commit it to
> > http://source.wiresong.ca/ob/
> >
> I don't really know where to publish, so I made a fileout of the fixes.
> Of course, I'm not sure it's very good. Try it and tell me please
> (OBSystemBrowserAdaptor is the default browser).
>
> The problem comes from 2 places.
>
> First, when selecting a class in say a workspace, then press cmd+b, in
> debugging, we see that it calls
> OTToolset browse: Object selector: nil. Because of nil, which is not a
> selector, it opens an empty browser. And this is because in:
> OBColumnPanel>>selectAncestorsOf: aNode, ... current childAncestorOf:
> aNode becomes nil as the method node is nil... and therefore the path
> becomes nil... It's propably better to correct this method but to be
> quick, I changed:
> OBSystemBrowser>>openOnClass: aClass selector: aSelector
> to test if aSelector is nil... (see OBSystemBrowser class.st)
>
> Second, in an object explorer, right click then browse on a node also
> gives an "empty" browser. Here it comes from:
> StringHolder>>browseMethodFull (*Tools). I changed:
> Browser fullOnClass: myClass selector: self selectedMessageName
> with:
> ToolSet browse: myClass selector: self selectedMessageName. (see
> StringHolder-browser.st)
>
> Can you tell me if it's correct and where to publish the last fix?
>
> Cédrick
>
>
>
> 'From Squeak3.9 of 7 November 2006 [latest update: #7067] on 27 June 2007 at 6:18:14 pm'!
>
> !StringHolder methodsFor: '*Tools' stamp: 'cb 6/27/2007 18:18'!
> browseMethodFull
> "Create and schedule a full Browser and then select the current class and message."
>
> | myClass |
> (myClass := self selectedClassOrMetaClass) ifNotNil:
> [ToolSet browse: myClass selector: self selectedMessageName.]! !
>
> 'From Squeak3.9 of 7 November 2006 [latest update: #7067] on 27 June 2007 at 6:41:42 pm'!
>
> !OBSystemBrowser class methodsFor: 'opening' stamp: 'cb 6/27/2007 18:41'!
> openOnClass: aClass selector: aSelector
> aSelector ifNil: [^ (self onClass: aClass) open].
> ^ (self onClass: aClass selector: aSelector) open! !
>
>
>
>
More information about the Squeak-dev
mailing list
|