On 2 August 2010 15:13, Tim Mackinnon <tamackinnon@gmail.com> wrote:
I was having a look at some of the ecompletion code - and noticed that I couldn't do an extract to temporary refactoring because the refactor source method is grayed out?
This looks like a bug - and I'm happy to report it - but just wanted to check with people here.
The code fragment in question is:
(opposite = aCharacter and: [ (editor text at: editor startIndex ifAbsent: [ nil ]) = aCharacter ]) ifTrue: [ Â Â Â Â Â Â Â Â editor selectFrom: editor startIndex + 1 to: editor startIndex. Â Â Â Â Â Â Â Â self invalidateEditorMorph. Â Â Â Â Â Â Â Â ^ true ].
If I hilite the expresion (editor.... nil]) inside the and: block its grayed out? Â I should be able to extract a temp for that code shouldn't I?
No, that's not a bug. For obvious reasons you cannot extract expressions with a return inside. Lukas -- Lukas Renggli www.lukas-renggli.ch