Issue 3996 in pharo: alt+k opens a StringHolder and not a workspace

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Issue 3996 in pharo: alt+k opens a StringHolder and not a workspace

pharo
Status: Started
Owner: [hidden email]
Labels: Type-ReportDefect Milestone-1.2.2-DevImage Difficulty-Easy

New issue 3996 by [hidden email]: alt+k opens a StringHolder and not  
a workspace
http://code.google.com/p/pharo/issues/detail?id=3996

alt+k shortcut is defined in PasteUpMorph>>defaultDesktopCommandKeyTriplets

{ $k. StringHolder. #open. 'Open a new, blank Workspace'}.

Then, alt+k opens a StringHolder and not a plain Workspace. This prevents  
the user from accessing all features of workspaces (syntax highlighting,  
old content management, line ending handling...).

It would be better to open a workspace. The correct way to do that is  
probably to ask the default ToolSet: ToolSet default openWorkspace

However, the syntax of the table in #defaultDesktopCommandKeyTriplets  
prevents sending 2 messages to ToolSet. Doing

{ $k. ToolSet default. #openWorkspace. 'Open a new, blank Workspace'}.

is fragile because it fixes the toolset upon initialization of the World. I  
propose to add #openWorkspace to the ToolSet class (along with a lot of  
other useful utilities) which would look like:

ToolSet class>>openWorkspace
   ^ self default openWorkspace

and then update #defaultDesktopCommandKeyTriplets:


{ $k. ToolSet. #openWorkspace. 'Open a new, blank Workspace'}.


Reply | Threaded
Open this post in threaded view
|

Re: Issue 3996 in pharo: alt+k opens a StringHolder and not a workspace

pharo
Updates:
        Status: FixProposed

Comment #1 on issue 3996 by [hidden email]: alt+k opens a  
StringHolder and not a workspace
http://code.google.com/p/pharo/issues/detail?id=3996

Name:  
SLICE-Issue-3996-altk-opens-a-StringHolder-and-not-a-workspace-DamienCassou.1
Author: DamienCassou
Time: 12 April 2011, 11:03:15 am
UUID: 7f3fb192-6dab-405b-8a5f-00a8701fe323
Ancestors:

- Updates PasteUpMorph>>defaultDesktopCommandKeyTriplets
so that it uses the ToolSet to open a workspace
- Adds ToolSet class>>openWorkspace


Reply | Threaded
Open this post in threaded view
|

Re: Issue 3996 in pharo: alt+k opens a StringHolder and not a workspace

pharo

Comment #2 on issue 3996 by [hidden email]: alt+k opens a  
StringHolder and not a workspace
http://code.google.com/p/pharo/issues/detail?id=3996

Use version 2 instead, as version 1 was an empty slice.

Also requires to execute

World initializeDesktopCommandKeySelectors

to update the key strokes.