Possibly silly (newbie) question about "plap: X" = "plap(X)"

Maarten Maartensz maartens at xs4all.nl
Sat Feb 16 12:06:21 UTC 2002


Hello Scott, Ned and Bian,

Thanks for your clear replies that are reproduced below: It was my mistake
and Scott diagnosed it first (probably he remembered I am on the
digest-only). 

My reason to appeal for help, though, is what also puzzled Ned: 

Intuitively one - if one thinks like me - would expect that the setting of
an alternative syntax DISPLAY should have NO effect on how the code it
displays is or is not RUN.

Yet what happens is that otherwise perfectly good code does NOT run when
the printAlternateSyntax is in effect, and that code does run again if it
is rewritten as printAlternateSyntax prints it. LIkewise, as Ned found,
when printAlternateSyntax is NOT in effect, code written according to the
Alternate style does NOT run.

There probably is a more or less good reason, and as the answers I received
indicate the cure is quite simple, but it should  be somewhat interesting
to know that "printAlternateSyntax" if set true appears to enforce "AND
your code in order to be run by Squeak must be WRITTEN in Alternate Syntax"
(at least when addressed to the Transcript).

So this seems at least "an unintended side effect" of using
"printAlternateSyntax" that flummoxed me.

O, and as to Bijan's reply to my:

>> Is there a reason for this change, e.g. of a semantical kind, 

>But it's not at all semantic, it's purely, and trivially, syntactic.

Yes indeed, I agree - but see above and below: That one's programs suddenly
stop running altogether if a supposedly purely syntactical feature is
turned on would seem to my mind "semantical"- but then, having a logician's
or linguist's understanding of the term "semantical" I am nearly always
puzzled when Smalltalkers use it (and probably should have used ironical
quote-marks).

Anyway: the original problem I had is completely solved: Thanks. (I quote
mails from the digest, because since I have no good original code to
contribute I find the digest a more pleasant form of Squeak-mail than a
steady daily trickle.)

Regards,

Maarten. 

---- begin messages replied to

--__--__--

Message: 6
From: Ned Konz <ned at bike-nomad.com>
To: squeak-dev at lists.squeakfoundation.org
Subject: Re: Possibly silly (newbie) question about "plap: X" = "plap(X)"
Date: Fri, 15 Feb 2002 10:37:21 -0800
Reply-To: squeak-dev at lists.squeakfoundation.org

On Friday 15 February 2002 10:15 am, Maarten Maartensz wrote:

> Having updated recently from 3.0 to 3.3alpha #4664 I notice that earlier
> stuff sent to Transcript with "show: 'Text' " doesn't work anymore, while
> "Transcript show ('Text') does. Also, if one finds "Transcripter" one also
> finds it lists "show:" in the rightmost upper pane that list the methods,
> but displays "show (anObject)" in the code pane.

Are you opening a new Transcript from the World menu or are you dragging one 
out from the Tools flap.

In a 4744 image, I have no problem with Transcript show: 'Text'
but I recall there were some problems with the Transcript gotten from the 
Tools flap.

How does

Transcript show

even work? Transcript doesn't understand #show.
And 

Transcript show ('text')

doesn't even compile, as its syntax is not proper.

-- 
Ned Konz
currently: Stanwood, WA
email:     ned at bike-nomad.com
homepage:  http://bike-nomad.com

--__--__--

Message: 7
Date: Fri, 15 Feb 2002 13:38:37 -0500 (EST)
From: Bijan Parsia <bparsia at email.unc.edu>
To: squeak-dev at lists.squeakfoundation.org
Subject: Re: Possibly silly (newbie) question about "plap: X" = "plap(X)"
Reply-To: squeak-dev at lists.squeakfoundation.org

On Fri, 15 Feb 2002, Maarten Maartensz wrote:

> Hello,
> 
> Having updated recently from 3.0 to 3.3alpha #4664 I notice that earlier
> stuff sent to Transcript with "show: 'Text' " doesn't work anymore, while
> "Transcript show ('Text') does. Also, if one finds "Transcripter" one also
> finds it lists "show:" in the rightmost upper pane that list the methods,
> but displays "show (anObject)" in the code pane.

You have the "alternative syntax" enabled. Go to the preferences and
change it back :)

(Unless there's a deeper booboo where it's turned on all the time, I don't
know, but that's where I'd try first.)

[snip]
> Is there a reason for this change, e.g. of a semantical kind, 

But it's not at all semantic, it's purely, and trivially, syntactic.

> that I have
> missed? And is this now systematic 

The alternative syntax can be enabled system wide (via the preferences) or
on a browser by browser basis (via the "provenence" menu). Think of the
alt syntax as a kind of pretty printing -- the options are the same.

Cheers,
Bijan Parsia.


--__--__--

--__--__--

Message: 14
Date: Fri, 15 Feb 2002 13:09:11 -0800
From: Scott Wallace <scott.wallace at squeakland.org>
Subject: Re: Possibly silly (newbie) question about "plap: X" = "plap(X)"
To: Maarten Maartensz <maartens at xs4all.nl>
Cc: squeak-dev at lists.squeakfoundation.org
Reply-To: squeak-dev at lists.squeakfoundation.org

Hi, Maarten,

At 7:15 PM +0100 2/15/02, Maarten Maartensz wrote:
>Having updated recently from 3.0 to 3.3alpha #4664 I notice that earlier
>stuff sent to Transcript with "show: 'Text' " doesn't work anymore, while
>"Transcript show ('Text') does. Also, if one finds "Transcripter" one also
>finds it lists "show:" in the rightmost upper pane that list the methods,
>but displays "show (anObject)" in the code pane.
>
>Indeed, I find everywhere that the arguments of methods are now all in
>brackets in the code, which is more in line with other languages I know,
>but not according what I learned about Smalltalk.
>
>Is there a reason for this change, e.g. of a semantical kind, that I have
>missed? And is this now systematic i.e. any method listed as say "plap: "
>in the code will have to get written as "plap (anObject)", and will require
>these brackets also to work?

You somehow got the "printAlternateSyntax" preference set to true. 
Set it back to false, and new tool windows will once again feature 
the beloved colons.

If you have tools around that were launched when 
"printAlternateSyntax" was set to true, you can return them to 
standard duty by using the "what to show..." menu item of the window 
menu, or else the corresponding control in the optional button pane, 
to reset them to show "source" rather than "altSyntax".

HTH.

Cheers,

    -- Scott

--__--__--
 

---- end messages replied to


------------------------------------------
Maarten Maartensz. Homepage:
http://www.xs4all.nl/~maartens/ 
------------------------------------------




More information about the Squeak-dev mailing list