Code Formatting

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

Code Formatting

Mike Hales
I'm cross posting this because my question is both about Squeak Trunk and Pharo. Feel free to respond only in your respective lists if you want. I'm running on Snow Leopard.  I'm getting a package ready that I want to publish, and I wanted to test it on both on Pharo and Squeak Trunk, and both are bothering me a little.

Squeak - I'm using the latest pre-built trunk image, updated with the update button. The command-r (pretty print) shortcut only seems to work if the selectors list has the mouse focus, not the code pane. Then after pretty printing, to save the source, I have to move the mouse focus back to the code pane, where command-s will save the change. If I have to move the mouse around what good is the shortcut?

Pharo - I using the latest Pharo 1.0 release candidate (dev not core) It seems like the coloring, and automatic completion work right out of the box, but when I choose "format" from the code pane context menu, nothing happens. Do I need to load something else? Also, if it were to work, what would I have to do to get a keyboard shortcut for it.

Since so many of you write so much more code than me, I imagine that there are simple solutions. And while we're here, I wouldn't mind some suggestions regarding how to "pimp my image" so to speak, to make the development flow better.

Thanks,

Mike

Mike Hales
Engineering Manager
KnowledgeScape
www.kscape.com


Reply | Threaded
Open this post in threaded view
|

Re: Code Formatting

Stan Shepherd
Mike Hales wrote
Pharo - I using the latest Pharo 1.0 release candidate (dev not core) It
seems like the coloring, and automatic completion work right out of the box,
but when I choose "format" from the code pane context menu, nothing happens.
Do I need to load something else?
Mike,
In Pharo,  it looks like format works some of the time in Omnibrowser (the default). I haven't got to the bottom of when/how; it should probably be a bug report.

The pretty print in Omnbrowser2 is reliable. Do you use this (O2)? The instructions to load are in the external projects workspace, for which there are instructions in the welcome workspace


DEVImageWorkspaces openExternalProjectWorkspace

Then

        Gofer new
                squeaksource: 'MetacelloRepository';
                package:'ConfigurationOfO2';
        load.
       
        (Smalltalk at: #ConfigurationOfO2) perform: #loadDefault.

Use the menu of any browser to change to a new default browser O2PackageBrowserAdaptor.
Also, if it were to work, what would I
have to do to get a keyboard shortcut for it.
I think there's a problem with the shortcut at the moment, related to this issue:
http://code.google.com/p/pharo/issues/detail?id=1312&q=shortcut&colspec=ID%20Type%20Status%20Summary%20Milestone
I'll open/reopen an issue ticket for that.
Since so many of you write so much more code than me, I imagine that there
are simple solutions. And while we're here, I wouldn't mind some suggestions
regarding how to "pimp my image" so to speak, to make the development flow
better.
If you don't use the package browser of O2, you might find it saves some clicks saving, updating to/from Monticello, also you can run tests directly from there.

Do you use Lint (code critics). I think of it as my pair programming partner. There are videos at:
http://www.lukas-renggli.ch/blog/ob-rb-3


Hope some of this is of help,   ...Stan



Reply | Threaded
Open this post in threaded view
|

Re: Code Formatting

Stan Shepherd
My apologies for replying on the Squeak list; need to take care now both show up together in Nabble.
...Stan
Reply | Threaded
Open this post in threaded view
|

Re: Code Formatting

Michael Haupt-3
Hi Stan,

On Thu, Jan 28, 2010 at 10:09 AM, Stan Shepherd
<[hidden email]> wrote:
> My apologies for replying on the Squeak list; need to take care now both show
> up together in Nabble.

it doesn't hurt. :-) It's not entirely uninteresting, you see? :-)

Best,

Michael