OBTextMorphEditor>>implementorsOfIt can redirect to sendersOfIt in some circumstances

0 views
Skip to first unread message

Simon Denier

unread,
Nov 25, 2009, 11:10:01 PM11/25/09
to omnibro...@googlegroups.com, Simon Denier

Can someone explain me the rationale for this implementation?

OBTextMorphEditor>>implementorsOfIt
	"Open a senders browser on the selected selector"
	| selector |
	self lineSelectAndEmptyCheck: [ ^ self ].
	(selector := self selectedSelector) isNil ifTrue: [ ^ self flash ].
	self 
		send: #implementorsOfIt:
		toModelWith: {  selector  }
		orDo: [ super sendersOfIt ]

OBTextMorphEditor>>send: aSelector toModelWith: args orDo: aBlock
	self terminateAndInitializeAround:
		[(model respondsTo: aSelector)
			ifTrue: [(model perform: aSelector withArguments: args)
						ifFalse: [self flash]]
			ifFalse: aBlock]
What happens is that if model cant answer to #implementorsOfIt, then aBlock gets executed which results in calling ParagraphEditor>>sendersOfIt (This is issue 134 in Mondrian). This is really surprising for the user.
--
 Simon

Lukas Renggli

unread,
Nov 26, 2009, 2:31:33 AM11/26/09
to omnibro...@googlegroups.com
That looks like a copy-paste error from #sendersOfIt. I guess nobody
ever noticed it because the OB model always implements
#implementorsOfIt.

Lukas

2009/11/26 Simon Denier <simon....@gmail.com>:
> --
>
> You received this message because you are subscribed to the Google Groups
> "OmniBrowser Development" group.
> To post to this group, send email to omnibro...@googlegroups.com.
> To unsubscribe from this group, send email to
> omnibrowser-d...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/omnibrowser-dev?hl=en.
>



--
Lukas Renggli
http://www.lukas-renggli.ch

Colin Putney

unread,
Nov 25, 2009, 11:21:41 PM11/25/09
to omnibro...@googlegroups.com

On 25-Nov-09, at 8:10 PM, Simon Denier wrote:
> What happens is that if model cant answer to #implementorsOfIt, then
> aBlock gets executed which results in calling
> ParagraphEditor>>sendersOfIt (This is issue 134 in Mondrian). This
> is really surprising for the user.

Yeah, that's definitely not right. Looks like a bug. What version of
OB is this?

Colin

Lukas Renggli

unread,
Nov 26, 2009, 3:49:08 AM11/26/09
to omnibro...@googlegroups.com
>> What happens is that if model cant answer to #implementorsOfIt, then
>> aBlock gets executed which results in calling
>> ParagraphEditor>>sendersOfIt (This is issue 134 in Mondrian). This
>> is really surprising for the user.
>
> Yeah, that's definitely not right. Looks like a bug. What version of
> OB is this?

It is in the latest OB-Morphic.

I already fixed it in <http://source.lukas-renggli.ch/omnibrowser>,
maybe you want to merge back the changes? Btw, I also fixed all the
broken tests and converted some remaining underscore-assignements as
Pharo 1.1 will not compile such code anymore.

Lukas

Simon Denier

unread,
Nov 26, 2009, 7:55:42 AM11/26/09
to omnibro...@googlegroups.com, Simon Denier

Funnily, I never thought it was some kind of typo mistake which got
unspotted until now. Thanks for the quick answer.

Colin Putney

unread,
Nov 26, 2009, 10:45:07 PM11/26/09
to omnibro...@googlegroups.com
Thanks! I'll definitely merge. It's about time for a new release...
we've had several bug fixes and cleanups, plus there's the new RB
engine.

Colin
Reply all
Reply to author
Forward
0 new messages