[squeak-dev] Right-click on workspace stops functioning
Frank Shearar
frank.shearar at angband.za.org
Mon Apr 26 19:28:33 UTC 2010
On 2010/04/26 20:54, Chris Muller wrote:
>> In focused workspace window, press alt-o.
>> I'm not sure what it does, but sometimes, i pressing wrong keys
>> (instead of alt-p, or alt-i) and got my workspace duplicated.
>
> Yes, this happens to me too. I never was quite sure what the purpose
> of Command+o is supposed to be.. Does anyone know?
I don't, but I know why at least. I'm still trying to figure out how
best to fix it though.
So: if you open a Workspace from the docking bar, you run, ultimately,
"Workspace open", which uses ToolBuilder to build you a Workspace. This
is the guy with the working menu.
If you spawn that, you're invoking TextEditor>>spawn which runs
"UIManager default edit: contentsString label: 'Workspace'". Typically
that'll invoke UIManager>>edit:label:accept:.
That method creates a Workspace, and builds something that looks just
like a Workspace should (PluggableTextMorphPlus etc.), but that
_doesn't_ have a menu.
It seems to me that the latter should just invoke an appropriate
modification of the former.
This is where I run into newbieness. It's easy to adjust the contents of
the model - "yourWorkspace contents: '123 asString'" - but that doesn't
set the contents of the PTMPlus. I've mucked around briefly trying to
mimic how MessageNames sets its search string (by finding a morph in
itself that has a certain name), but I've not quite got the Morphic-fu
to nail the issue.
So to be a bit more concrete, I have a half-solution of
MorphicUIManager>>edit:label:accept: that looks like this:
edit: aText label: labelString accept: anAction
"Open an editor on the given string/text"
| space |
space := StandardToolSet openWorkspace.
space model textContents: aText.
Two issues: how to get aText rendered in the right morph? What to do
with anAction?
frank
More information about the Squeak-dev
mailing list
|