Thanks MetaProg

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

Thanks MetaProg

Steve Alan Waring
Hi Joseph,

Thanks for your Abbreviations package in Dolphin 5.1.

It is a very handy tool. My fingers, which usually bumble over
"OrderedCollection", are very pleased to just type "oc" :)

Thanks!
Steve

--
Steve Waring
Email: [hidden email]
Journal: http://www.stevewaring.net/blog/home/index.html


Reply | Threaded
Open this post in threaded view
|

Re: Thanks MetaProg

Stefan Schmiedl
On Sun, 4 May 2003 19:06:35 +1000,
Steve Waring <[hidden email]> wrote:
> Hi Joseph,
>
> Thanks for your Abbreviations package in Dolphin 5.1.

Abbreviations package? What Abbreviations package?

< ... sound of me searching the image ...>

wow!

Are there more new goodies like that one, which I don't know about?

Maybe I'll really have to start reading release notes...

s.


Reply | Threaded
Open this post in threaded view
|

Re: Thanks MetaProg

Jeffrey Odell-3
In reply to this post by Steve Alan Waring
Ditto - out of habit I typed an abbreviation I use in VA Smalltalk, and
poof! there is was.  I had to stop and think where the hell I was ;>

Thanks Joseph -

jlo

"Steve Waring" <[hidden email]> wrote in message
news:b92leu$eqtmr$[hidden email]...

> Hi Joseph,
>
> Thanks for your Abbreviations package in Dolphin 5.1.
>
> It is a very handy tool. My fingers, which usually bumble over
> "OrderedCollection", are very pleased to just type "oc" :)
>
> Thanks!
> Steve
>
> --
> Steve Waring
> Email: [hidden email]
> Journal: http://www.stevewaring.net/blog/home/index.html
>
>


Reply | Threaded
Open this post in threaded view
|

Re: Thanks MetaProg

Mark Wilden
In reply to this post by Steve Alan Waring
"Steve Waring" <[hidden email]> wrote in message
news:b92leu$eqtmr$[hidden email]...
>
> Thanks for your Abbreviations package in Dolphin 5.1.

I've been using them, too. I was interested in seeing whether Dolphin vets
would change their spots, forgo the baby duck syndrome, and use this
capability.


Reply | Threaded
Open this post in threaded view
|

Re: Thanks MetaProg

Joseph Pelrine-6
In reply to this post by Steve Alan Waring
Steve Waring wrote:

>Hi Joseph,
>
>Thanks for your Abbreviations package in Dolphin 5.1.
>
>It is a very handy tool. My fingers, which usually bumble over
>"OrderedCollection", are very pleased to just type "oc" :)
>
>Thanks!
>Steve
>
>--
>Steve Waring
>Email: [hidden email]
>Journal: http://www.stevewaring.net/blog/home/index.html
>
Aw, shucks <grin>. With my lame fingers, the abbreviations package is
about the only way I can get any coding done quickly. BTW - the
abbreviations thingy works both ways. You can highlight any text and
save it as an abbreviation. Great when you're doing boilerplate.

I'm quite pleased that OA is so open to third-party contributions, and
that the Dolphin community is so cool. I have a whole bunch of similar
stuff around. Just have to get around to digging it out and porting it
(using Rosetta, of course).

It's just a pity there's no ENVY for Dolphin, or you'd have more add-ons
than you could imagine...

--
--
Joseph Pelrine [ | ]
MetaProg GmbH
Email: [hidden email]
Web:   http://www.metaprog.com

"If you don't live on the edge, you're taking up too much space" -
Doug Robinson


--
--
Joseph Pelrine [ | ]
MetaProg GmbH
Email: [hidden email]
Web:   http://www.metaprog.com

"If you don't live on the edge, you're taking up too much space" -
Doug Robinson


Reply | Threaded
Open this post in threaded view
|

Re: Thanks MetaProg

Joseph Pelrine-6
In reply to this post by Mark Wilden


Mark Wilden wrote:
"Steve Waring" [hidden email] wrote in message
<a class="moz-txt-link-freetext" href="news:b92leu$eqtmr$1@ID-65212.news.dfncis.de">news:b92leu$eqtmr$1@......
Thanks for your Abbreviations package in Dolphin 5.1.

I've been using them, too. I was interested in seeing whether Dolphin vets
would change their spots, forgo the baby duck syndrome, and use this
capability.
Sorry, but what's the "baby duck syndrome"?

Cheers
-- 
--
Joseph Pelrine [ | ]
MetaProg GmbH
Email: [hidden email]
Web:   http://www.metaprog.com

"If you don't live on the edge, you're taking up too much space" -
Doug Robinson

-- 
--
Joseph Pelrine [ | ]
MetaProg GmbH
Email: [hidden email]
Web:   http://www.metaprog.com

"If you don't live on the edge, you're taking up too much space" -
Doug Robinson

Reply | Threaded
Open this post in threaded view
|

Re: Thanks MetaProg

tgkuo
In reply to this post by Joseph Pelrine-6
Thanks !!.
Count me, too, in the appreciation list.
   As I knew, I installed it to my D4 and D5.01 images, from the
"Abreviations" package available in
http://www.smalltalking.net/Goodies/Dolphin/.  I've used it for sometime. It
suited my need in shorthand many routine typing of HTML tags such as:
<div></div>, <table></table> etc.
    However, I've not migrated my working image to D5.1 so far, because I
found it costed me a lot of work . First of all, it is not the same as easy
as patching PL1-3 etc. There will be two systems after the installation. I
found that after installing D5.1 in my environment, I cann't run my  old
D5.03 image as usual, it seemed that D5.03 and D5.1 cann't coexit, walkbacks
shown when running the old image, indicating the problems possibly due to
SSW workings. Therefore,  I must uninstall D5.03 completely from my WinXP in
order not to confuse the OS registration?, guessed. I don't know why?

"Joseph Pelrine" <[hidden email]>

> Aw, shucks <grin>. With my lame fingers, the abbreviations package is
> about the only way I can get any coding done quickly. BTW - the
> abbreviations thingy works both ways. You can highlight any text and
> save it as an abbreviation. Great when you're doing boilerplate.
>
> I'm quite pleased that OA is so open to third-party contributions, and
> that the Dolphin community is so cool. I have a whole bunch of similar
> stuff around. Just have to get around to digging it out and porting it
> (using Rosetta, of course).
>
> It's just a pity there's no ENVY for Dolphin, or you'd have more add-ons
> than you could imagine...
>
> --
> --
> Joseph Pelrine [ | ]
> MetaProg GmbH
> Email: [hidden email]
> Web:   http://www.metaprog.com
>
> "If you don't live on the edge, you're taking up too much space" -
> Doug Robinson
>
>
> --
> --
> Joseph Pelrine [ | ]
> MetaProg GmbH
> Email: [hidden email]
> Web:   http://www.metaprog.com
>
> "If you don't live on the edge, you're taking up too much space" -
> Doug Robinson
>
>


Reply | Threaded
Open this post in threaded view
|

Re: Thanks MetaProg

Joseph Pelrine-6
kuo wrote:

>Thanks !!.
>Count me, too, in the appreciation list.
>   As I knew, I installed it to my D4 and D5.01 images, from the
>"Abreviations" package available in
>http://www.smalltalking.net/Goodies/Dolphin/.  I've used it for sometime. It
>suited my need in shorthand many routine typing of HTML tags such as:
><div></div>, <table></table> etc.
>
I wasn't aware of this page. It looks like someone "borrowed" the VA
Assist version without our knowing ;-)

In any case, the version shipping with Dolphin 5.1 *is* the same as the
VA version. I should know, since I was the one who wrote the VA Assist
version for Smalltalk Systems ...

Cheers
Joseph

--
--
Joseph Pelrine [ | ]
MetaProg GmbH
Email: [hidden email]
Web:   http://www.metaprog.com

"If you don't live on the edge, you're taking up too much space" -
Doug Robinson


--
--
Joseph Pelrine [ | ]
MetaProg GmbH
Email: [hidden email]
Web:   http://www.metaprog.com

"If you don't live on the edge, you're taking up too much space" -
Doug Robinson


Reply | Threaded
Open this post in threaded view
|

Re: Thanks MetaProg

Pieter Emmelot-2
In reply to this post by Joseph Pelrine-6
Joseph,
I hacked your expandAbbreviation method a bit to show a ChoicePrompter when
no shortcut is found.
Made it easier for me to learn those shortcuts, just type shift-space and
select the abreviation you need...

- Pieter

SmalltalkWorkspace>>expandAbbreviation

    | startAssoc start abbrev |

    startAssoc := self findSeparatorLeftAndKey: self selectionRange stop.

    start := startAssoc value + 1.

    abbrev := startAssoc key.

    abbrev isEmpty

        ifTrue:

            [| choices |

            choices := OrderedCollection new.

            self class abbreviations

            keysAndValuesDo: [:key :value | choices add: key , ' - ' ,
value].

                (ChoicePrompter choices: choices asSortedCollection caption:
'Select shortcut')

                    ifNotNil: [:string | self replaceSelection: (string
subStrings: $-) last].

                self view setFocus]

        ifFalse:

            [| replace end |

            replace := self class abbreviations at: abbrev

                ifAbsent:

                    ["TextEdit normally inserts a space on Shift+Space, so
continue to do that if not an abbreviation..."

                    self replaceSelection: ' '.

                    ^self].

            self selectionRange: (start to: start + abbrev size - 1).

            self replaceSelection: replace.

            end := start + replace size.

            (replace last == $] or: [replace last == $)]) ifTrue: [end :=
end - 1].

            self selectionRange: (end to: end - 1)]


Reply | Threaded
Open this post in threaded view
|

Re: Thanks MetaProg

Chris Uppal-3
Pieter Emmelot wrote:

> Joseph,
> I hacked your expandAbbreviation method a bit to show a
> ChoicePrompter when no shortcut is found.

I also made a small change, the prompt for creating a new abbreviation now
says, e.g:
    Desired abbreviation for <OrderedCollection new>?
rather than just:
    Desired abbreviation for this text?

Also added a test that the text was non-empty (otherwise it'll give walkbacks
when using the abbreviation).

Actually, I also made a change to the accelerators:  switched "expand" to
CTRL+Space (since that's something of an industry standard these days), and
moved "capture" to CTRL+Shift+Space.  I find that binding anything to
Shift+Space causes me endless annoyance.  It seems that I very rarely
release the shift key fast enough after typing, say, a colon, so the following
space triggers the accelerator every time.

    -- chris


Reply | Threaded
Open this post in threaded view
|

Re: Thanks MetaProg

jWarrior
In reply to this post by Joseph Pelrine-6
joseph,
 
a baby duck believes that the first thing it sees is its mother, and never changes its mind.
also known as imprinting. the spots and baby duck reference is a mixed metaphor to be sure.
 
i didn't know you wrote va assist pro! i use it everyday in va, and it makes my (relatively)
simple life in smalltalk even simpler. good job.
 
donald
"Joseph Pelrine" <[hidden email]> wrote in message <A href="news:3EB52B4B.2030506@metaprogTHIS.com">news:3EB52B4B.2030506@......


Mark Wilden wrote:
"Steve Waring" [hidden email] wrote in message
<A class=moz-txt-link-freetext href="news:b92leu$eqtmr$1@ID-65212.news.dfncis.de">news:b92leu$eqtmr$1@......
Thanks for your Abbreviations package in Dolphin 5.1.

I've been using them, too. I was interested in seeing whether Dolphin vets
would change their spots, forgo the baby duck syndrome, and use this
capability.
Sorry, but what's the "baby duck syndrome"?

Cheers
-- 
--
Joseph Pelrine [ | ]
MetaProg GmbH
Email: [hidden email]
Web:   http://www.metaprog.com

"If you don't live on the edge, you're taking up too much space" -
Doug Robinson

-- 
--
Joseph Pelrine [ | ]
MetaProg GmbH
Email: [hidden email]
Web:   http://www.metaprog.com

"If you don't live on the edge, you're taking up too much space" -
Doug Robinson

Reply | Threaded
Open this post in threaded view
|

Re: Thanks MetaProg

Joseph Pelrine-6


Donald MacQueen wrote:
joseph,
 
a baby duck believes that the first thing it sees is its mother, and never changes its mind.
also known as imprinting. the spots and baby duck reference is a mixed metaphor to be sure.
 
i didn't know you wrote va assist pro! i use it everyday in va, and it makes my (relatively)
simple life in smalltalk even simpler. good job.
Give credit where credit is due - VAA is Eric Clayberg's baby. I only wrote *parts* of it, as did Alan Knight and a few others. In my case, I had a bunch of tools laying around that I wasn't going to package and sell by myself, so about the time VAA grew from being a composition editor on steroids to being a real toolbox, I reached a nice agreement with Eric about rolling my stuff in. I'm happy, he's happy, you're happy...

Thinking of which, it might be nice to pull over the "maximize code pane" code (Alt-Z in VAA) into Dolphin...
-- 
--
Joseph Pelrine [ | ]
MetaProg GmbH
Email: [hidden email]
Web:   http://www.metaprog.com

"If you don't live on the edge, you're taking up too much space" -
Doug Robinson

-- 
--
Joseph Pelrine [ | ]
MetaProg GmbH
Email: [hidden email]
Web:   http://www.metaprog.com

"If you don't live on the edge, you're taking up too much space" -
Doug Robinson

Reply | Threaded
Open this post in threaded view
|

Re: Thanks MetaProg

Joseph Pelrine-6
In reply to this post by Chris Uppal-3


Chris Uppal wrote:
Pieter Emmelot wrote:

Joseph,
I hacked your expandAbbreviation method a bit to show a
ChoicePrompter when no shortcut is found.

I also made a small change, the prompt for creating a new abbreviation now
says, e.g:
Desired abbreviation for <OrderedCollection new>?
rather than just:
Desired abbreviation for this text?
Good idea. I never did that because I tend to use abbreviations to move around BIG, multi-line chunks of text (widget definition code etc.), and that looks pretty darned ugly.
Also added a test that the text was non-empty (otherwise it'll give walkbacks
when using the abbreviation).

Actually, I also made a change to the accelerators: switched "expand" to
CTRL+Space (since that's something of an industry standard these days), and
moved "capture" to CTRL+Shift+Space. I find that binding anything to
Shift+Space causes me endless annoyance. It seems that I very rarely
release the shift key fast enough after typing, say, a colon, so the following
space triggers the accelerator every time.
To each his own. The shift-space hot key has been around for a long time, and changing it would screw things up for all those folks who know the tool from other dialects. At least Smalltalk allows us to customize our environments.

BTW - I used to have the same problem with my fingers. Piano lessons help ;-)

-- 
--
Joseph Pelrine [ | ]
MetaProg GmbH
Email: [hidden email]
Web:   http://www.metaprog.com

"If you don't live on the edge, you're taking up too much space" -
Doug Robinson

-- 
--
Joseph Pelrine [ | ]
MetaProg GmbH
Email: [hidden email]
Web:   http://www.metaprog.com

"If you don't live on the edge, you're taking up too much space" -
Doug Robinson

Reply | Threaded
Open this post in threaded view
|

Re: Thanks MetaProg

Chris Uppal-3
Joseph

> Good idea. I never did that because I tend to use abbreviations to move
> around BIG, multi-line chunks of text (widget definition code etc.), and
> that looks pretty darned ugly.

snatchAbbreviation
    | key text show |
    (text := self selection) isNil ifTrue: [^self].
    text isEmpty ifTrue: [^ self].
    show := text size > 80
        ifTrue: [(text first: 50) , ' ... ' , (text last: 30)]
        ifFalse: [text].
    ((key := Prompter prompt: 'Desired abbreviation for <', show , '>?') notNil
    ... etc ...

[changing accelerator keys]
> To each his own. The shift-space hot key has been around for a
> long time, and changing it would screw things up for all those
> folks who know the tool from other dialects. At least Smalltalk
> allows us to customize our environments.

Oh sure, I wasn't suggesting that you change the defaults, only mentioning that
I had thought it worthwhile to do so myself.

> BTW - I used to have the same problem with my fingers. Piano lessons help ;-)

Damn! And the only piano shop in town closed a few months back...

    -- chris


Reply | Threaded
Open this post in threaded view
|

Re: Thanks MetaProg

Joseph Pelrine-6


Chris Uppal wrote:
Joseph

Good idea. I never did that because I tend to use abbreviations to move
around BIG, multi-line chunks of text (widget definition code etc.), and
that looks pretty darned ugly.

snatchAbbreviation
| key text show |
(text := self selection) isNil ifTrue: [^self].
text isEmpty ifTrue: [^ self].
show := text size > 80
ifTrue: [(text first: 50) , ' ... ' , (text last: 30)]
ifFalse: [text].
((key := Prompter prompt: 'Desired abbreviation for <', show , '>?') notNil
... etc ...
Yeah, that would work. It is nice knowing what you are setting an abbreviation for. I'll roll your change into the next version.


[changing accelerator keys]
To each his own. The shift-space hot key has been around for a
long time, and changing it would screw things up for all those
folks who know the tool from other dialects. At least Smalltalk
allows us to customize our environments.

Oh sure, I wasn't suggesting that you change the defaults, only mentioning that
I had thought it worthwhile to do so myself.
As I said, it's nice that Smalltalk allows us to do things like that so easily.
BTW - I used to have the same problem with my fingers. Piano lessons help ;-)

Damn! And the only piano shop in town closed a few months back...
I *was* serious about that ;-) I used to drive my piano teacher crazy. Of course, having classical guitar fingernails didn't help either...

Cheers


-- chris



-- 
--
Joseph Pelrine [ | ]
MetaProg GmbH
Email: [hidden email]
Web:   http://www.metaprog.com

"If you don't live on the edge, you're taking up too much space" -
Doug Robinson

-- 
--
Joseph Pelrine [ | ]
MetaProg GmbH
Email: [hidden email]
Web:   http://www.metaprog.com

"If you don't live on the edge, you're taking up too much space" -
Doug Robinson