[ANN] New keymapping on SqueakMap
stéphane ducasse
ducasse at iam.unibe.ch
Mon Dec 20 16:46:56 UTC 2004
this is indeed cool. I really think that we need that kind of
functionality.
Stef
> Just thinking about how you could do it w/o modifying the Workspace
> class. This code would add the category #Workspace to the PTM in the
> Workspace. I'm sure you could do similar things with the Transcript
> etc:
>
> win := Workspace new embeddedInMorphicWindowLabeled: 'Special KM'.
> win applyModelExtent.
> (win submorphOfClass: PluggableTextMorph) addKeymapCategory:
> #Workspace.
> win openInWorld
>
> This creates one Workspace with the keymap category #Workspace. If
> you wanted to commit to this arrangement for all workspaces you would
> override:
>
> Workspace>>embeddedInMorphicWindowLabeled: labelString
> | window plm |
> window := (SystemWindow labelled: labelString) model: self.
> plm := PluggableTextMorph on: self text: #contents accept:
> #acceptContents:
> readSelection: nil menu: #codePaneMenu:shifted:.
> plm addKeymapCategory: #Workspace.
> window addMorph: plm frame: (0 at 0 corner: 1 at 1).
> ^ window
>
> I think subclasses of MorphicModel deserve some special keymapping
> behavior. I am considering automatically using their model class name
> as one of their default categories. In fact, MorphicModel's already
> get some special treatment from some of the action classes (the model
> is the target of the action instead of the morph itself).
>
> David
>
>
More information about the Squeak-dev
mailing list
|