Error creating textual references to dropped morphs

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

Error creating textual references to dropped morphs

yakovdk
I am a Smalltalk newb, so please forgive me if this isn't the right place to go with this.  I was following a guide that had me open a workspace, set "Create textual references to dropped morphs", and then drag in a morph from the Workspace.  It worked great for me on one machine, which had an older version of Squeak.

But on my Mac, I just installed Squeak 5.1 and when I tried this, I got an error about 'nil' not responding to the "isOctetString" message.  As I said, I'm a baby smalltalker, but I looked at the older versions of the "acceptDroppingMorph" method on the Workspace class.  I found that if I changed the section that reads as follows:

        (dropee isKindOf: TransferMorph)
                ifTrue: [reference := dropee passenger.
                        externalName := dropee passenger className]
                ifFalse: [reference := dropee.
                        dropee externalName].

It looked to me like the "ifFalse" branch fails to set the externalName variable, which makes it nil later on.  I changed it to read as follows, and it seems to work fine for me now:

        (dropee isKindOf: TransferMorph)
                ifTrue: [reference := dropee passenger.
                        externalName := dropee passenger className]
                ifFalse: [reference := dropee.
                        externalName := dropee externalName].

As I said, I'm new to the Squeak world, so I'm not sure where or how to send this in to the right place, so please correct me if I should be sending this somewhere else.

Thanks!

Yakov
Reply | Threaded
Open this post in threaded view
|

Re: Error creating textual references to dropped morphs

Herbert König
Hi Yakov,

welcome to Squeak!

This is the right place for a start. Seems you found a bug and a fix.
If noone with commit rights reacts within the next few days post again,
prepending the subject with [bug][fix].

The formal Squeak development process is described here:
https://squeakboard.wordpress.com/2009/07/02/a-new-community-development-model/

Cheers,

Herbert

 Am Mon, 5 Sep 2016 21:22:18 -0700 (PDT)
schrieb yakovdk <[hidden email]>:

> I am a Smalltalk newb, so please forgive me if this isn't the right
> place to go with this.  I was following a guide that had me open a
> workspace, set "Create textual references to dropped morphs", and
> then drag in a morph from the Workspace.  It worked great for me on
> one machine, which had an older version of Squeak.
>
> But on my Mac, I just installed Squeak 5.1 and when I tried this, I
> got an error about 'nil' not responding to the "isOctetString"
> message.  As I said, I'm a baby smalltalker, but I looked at the
> older versions of the "acceptDroppingMorph" method on the Workspace
> class.  I found that if I changed the section that reads as follows:
>
>         (dropee isKindOf: TransferMorph)
>                 ifTrue: [reference := dropee passenger.
>                         externalName := dropee passenger className]
>                 ifFalse: [reference := dropee.
>                         dropee externalName].
>
> It looked to me like the "ifFalse" branch fails to set the
> externalName variable, which makes it nil later on.  I changed it to
> read as follows, and it seems to work fine for me now:
>
>         (dropee isKindOf: TransferMorph)
>                 ifTrue: [reference := dropee passenger.
>                         externalName := dropee passenger className]
>                 ifFalse: [reference := dropee.
>                         externalName := dropee externalName].
>
> As I said, I'm new to the Squeak world, so I'm not sure where or how
> to send this in to the right place, so please correct me if I should
> be sending this somewhere else.
>
> Thanks!
>
> Yakov
>
>
>
> --
> View this message in context:
> http://forum.world.st/Error-creating-textual-references-to-dropped-morphs-tp4914257.html
> Sent from the Squeak - Dev mailing list archive at Nabble.com.
>


Reply | Threaded
Open this post in threaded view
|

Re: Error creating textual references to dropped morphs

Bert Freudenberg
In reply to this post by yakovdk
On Tue, Sep 6, 2016 at 6:22 AM, yakovdk <[hidden email]> wrote:
I am a Smalltalk newb

Welcome!
 
It looked to me like the "ifFalse" branch fails to set the externalName
variable, which makes it nil later on.  I changed it to read as follows, and
it seems to work fine for me now:

        (dropee isKindOf: TransferMorph)
                ifTrue: [reference := dropee passenger.
                        externalName := dropee passenger className]
                ifFalse: [reference := dropee.
                        externalName := dropee externalName].

That's exactly the right fix. I published it in "Tools-bf.725". If you are using a trunk image you can load updates, otherwise it will be in the next release.

Thank you!

- Bert -


Reply | Threaded
Open this post in threaded view
|

Re: Error creating textual references to dropped morphs

yakovdk
Awesome, thanks Bert!

I've tried to dip my feet into Squeak a few times over the years, but I think it has finally "clicked" for me.  Thanks for all your efforts!