[squeak-dev] Re: Squeak-dev Digest, Vol 75, Issue 23

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

[squeak-dev] Re: Squeak-dev Digest, Vol 75, Issue 23

Ralph Boland
...  
> > How difficult is it to modify Squeak 3.9 or later so that the display
> > of the '_'
> > character shows an arrow?

> You need to 'draw' the proper glyph inside the kind of AbstractFont
> you're using. If you're using StrikeFonts, it is not hard. Each font has
> a Form with all the glyphs in it.

Can I not simply copy some code that exists in Squeak 3.8.1?
If not I am not sure how to draw the proper glyph. Can you elaborate?
I have never modified which font is being used by Squeak to display code.
I am running Linux Ubuntu 8.10.  Where can I find this information?
The StrikeFont class seems to be used in a lot of places so I assume this
is the font I am using.


> > I promise that I will switch to the := operator for assignment before
> > releasing, really!
> >
> > Ralph Boland


> There's not a real consensus in this area. Many people (me included)
> really prefer the left arrow for assignment and will not accept others
>to prevent us from doing so. Please don't promise that. Switch to :=
> only if you want.

> Cheers,
> Juan Vuletich

I assume that the _ character has been deprecated so that at some time
in the future it will be possible to write a variable name as  var_name.
Otherwise I see no point in taking the deprecation step.
While I am not fond of this change I do accept it and will conform when
the point arrives that I need to.  For me that point is when I release
my code.


Ralph Boland



--
When a woman becomes sexually aroused the necessary blood flows from her heart.
When a man becomes sexually aroused, the necessary blood is removed from his brain.


Reply | Threaded
Open this post in threaded view
|

Re: [squeak-dev] Re: Squeak-dev Digest, Vol 75, Issue 23

Julian Fitzell-2
On Wed, Mar 11, 2009 at 4:29 PM, Ralph Boland <[hidden email]> wrote:
> I assume that the _ character has been deprecated so that at some time
> in the future it will be possible to write a variable name as  var_name.
> Otherwise I see no point in taking the deprecation step.
> While I am not fond of this change I do accept it and will conform when
> the point arrives that I need to.  For me that point is when I release
> my code.

Not really... the arrow glyph was removed primarily (as I recall)
because it made it really confusing when looking at any other text in
the image that included an underscore (and also confusing when you
pasted code somewhere other than a Squeak image since the arrow would
become an underscore). The use of an underscore for assignment is
discouraged primarily because it is not compatible with other
Smalltalk dialects.

For what's it's worth I hated the idea of typing := myself for a while
but we had no choice but to start using it in Seaside for portability
reasons and it very quickly became second nature.

Julian

Reply | Threaded
Open this post in threaded view
|

Re: [squeak-dev] Re: Squeak-dev Digest, Vol 75, Issue 23

Bert Freudenberg
In reply to this post by Ralph Boland
On 11.03.2009, at 16:29, Ralph Boland wrote:

> If not I am not sure how to draw the proper glyph.

If you are using a StrikeFont (i.e., Accu*), the proper glyph should  
still be there:

        Character value: 16r8F

If you are using a Balloon-rendered TrueType font, there never was a  
left-arrow character.

If you use a FreeType-rendered font, there should be a left-arrow at

        Character value: 16r2190

> I assume that the _ character has been deprecated so that at some time
> in the future it will be possible to write a variable name as  
> var_name.
> Otherwise I see no point in taking the deprecation step.
> While I am not fond of this change I do accept it and will conform  
> when
> the point arrives that I need to.  For me that point is when I release
> my code.


I'm not entirely sure but I think you can have your cake and eat it  
too, using Shout. IIRC it allows to display := as ← even though in  
the saved method it still uses :=.

- Bert -



Reply | Threaded
Open this post in threaded view
|

Re: [squeak-dev] Re: Squeak-dev Digest, Vol 75, Issue 23

Simon Kirk-4
On 11 Mar 2009, at 16:08, Bert Freudenberg wrote:

> On 11.03.2009, at 16:29, Ralph Boland wrote:
>
>> If not I am not sure how to draw the proper glyph.
>
> If you are using a StrikeFont (i.e., Accu*), the proper glyph should  
> still be there:
>
> Character value: 16r8F
>
> If you are using a Balloon-rendered TrueType font, there never was a  
> left-arrow character.
>
> If you use a FreeType-rendered font, there should be a left-arrow at
>
> Character value: 16r2190
>
>> I assume that the _ character has been deprecated so that at some  
>> time
>> in the future it will be possible to write a variable name as  
>> var_name.
>> Otherwise I see no point in taking the deprecation step.
>> While I am not fond of this change I do accept it and will conform  
>> when
>> the point arrives that I need to.  For me that point is when I  
>> release
>> my code.
>
>
> I'm not entirely sure but I think you can have your cake and eat it  
> too, using Shout. IIRC it allows to display := as ← even though in  
> the saved method it still uses :=.

Ah! This would be very cool indeed. However, I haven't seen it on any  
browsers when I've been using Shout. Can anybody confirm what versions  
etc are needed to make this happen?

Cheers,
Simon




Consider your responsibility to the environment - think before you print!

******************************************************************************************************************************************
This email is from Pinesoft Limited. Its contents are confidential to the intended recipient(s) at the email address(es) to which it has been addressed. It may not be disclosed to or used by anyone other than the addressee(s), nor may it be copied in anyway. If received in error, please contact the sender, then delete it from your system. Although this email and attachments are believed to be free of virus, or any other defect which might affect any computer or IT system into which they are received and opened, it is the responsibility of the recipient to ensure that they are virus free and no responsibility is accepted by Pinesoft for any loss or damage arising in any way from receipt or use thereof. *******************************************************************************************************************************************


Pinesoft Limited are registered in England, Registered number: 2914825. Registered office: 266-268 High Street, Waltham Cross, Herts, EN8 7EA