Bert Freudenberg | 1 Feb 20:06
Picon
Gravatar

Re: Re: Problem with cmd-c


On 31.01.2012, at 13:10, Ylem wrote:

> Hello everyone, I have a problem with Squeak, my iBook G4, does not allow me
> to copy and paste, just run cmd-c, Squeak crashes immediately. I apologize
> but I do not speak English well, thank you all for your work.

Which Squeak VM are you using?

One idea would be to delete the ClipboardExtendedPlugin.bundle from your VM app.

- Bert -
Johann Hibschman | 8 Feb 14:51
Picon

Centering text in morphic

How can I center text in morphic? I have a RectangleMorph subclass
representing a "tile." I'd like to display a centered string label
within the morph.

My current approach is to just override #drawOn: with:

    TileMorph>>drawOn: aCanvas
        super drawOn: aCanvas.
        aCanvas drawString: 'hi' on: self innerBounds

However, that just always puts the text in the upper-left corner.
(Code is from memory, so I may have got something wrong.)

By "center", I want the baseline-to-max-ascent for the font to be
centered vertically (not the actual height of whatever characters I
have), while the actual width is centered vertically.

Would it be better to use a StringMorph for placing text like this?
I'm afraid I don't yet understand what layout options I'd need to use
to make it work.

Thanks,
- Johann
Lawson English | 8 Feb 19:44
Picon

Re: Centering text in morphic

Hi Johann, just after you left IRC, I figured out an easy (though 
perhaps not the best) way to do what you want:

a := SimpleButtonMorph new openInWorld.
a actWhen: #buttonDown.   "turns off visible button behavior"
a label: 'new label'.              "lets you change the label to a 
different string of text"
a clipSubmorphs: true.        "true means that your text doesn't extend 
beyond the border of the button"

Hope this helps.

Lawson (saijanai_ on irc)

On 2/8/12 6:51 AM, Johann Hibschman wrote:
> How can I center text in morphic? I have a RectangleMorph subclass
> representing a "tile." I'd like to display a centered string label
> within the morph.
>
> My current approach is to just override #drawOn: with:
>
>      TileMorph>>drawOn: aCanvas
>          super drawOn: aCanvas.
>          aCanvas drawString: 'hi' on: self innerBounds
>
> However, that just always puts the text in the upper-left corner.
> (Code is from memory, so I may have got something wrong.)
>
> By "center", I want the baseline-to-max-ascent for the font to be
> centered vertically (not the actual height of whatever characters I
(Continue reading)

Johann Hibschman | 9 Feb 14:40
Picon

Re: Centering text in morphic

On Wed, Feb 8, 2012 at 12:44 PM, Lawson English <lenglish5 <at> cox.net> wrote:
> Hi Johann, just after you left IRC, I figured out an easy (though perhaps
> not the best) way to do what you want:
>
> a := SimpleButtonMorph new openInWorld.
> a actWhen: #buttonDown.   "turns off visible button behavior"
> a label: 'new label'.              "lets you change the label to a different
> string of text"
> a clipSubmorphs: true.        "true means that your text doesn't extend
> beyond the border of the button"

Thanks, that's helpful. I don't think I'm going to use
SimpleButtonMorph, since it builds in a fixed margin, but reading its
implementation was useful. It makes a StringMorph and uses its #extent
to do the centering, and I can just do the same thing. (And I can just
look at StringMorph's #extent if I need to.)

If SimpleButtonMorph works by embedding a StringMorph, I think that's
a sign that I should do that rather than override #drawOn.

Johann
Lawson English | 9 Feb 17:29
Picon

Re: Centering text in morphic

Sure. My first pass at writing code using Morphic is to see if an 
existing class does what I want and then deciding if it is worth the 
time to "roll my own" using whatever insight I got from seeing how the 
existing code works.

#drawOn should only be used if you need to do things which don't use 
exisint morphs and/or need a great deal of speed. The built-in 
composition capabilities of Morphic are usually powerful enough to 
accomplish any kind of  behavior using compositions of simpler morphs. 
Obviously, you don't create high-level paint programs using morphs as 
the pixels, but anything higher level than that is probably a good 
candidate for composition.

OTOH, if I was to write an educational program showing how line-drawing 
algorithms work, I probably WOULD use morphs as pixels. YMMV.

L

On 2/9/12 6:40 AM, Johann Hibschman wrote:
> Thanks, that's helpful. I don't think I'm going to use 
> SimpleButtonMorph, since it builds in a fixed margin, but reading its 
> implementation was useful. It makes a StringMorph and uses its #extent 
> to do the centering, and I can just do the same thing. (And I can just 
> look at StringMorph's #extent if I need to.) If SimpleButtonMorph 
> works by embedding a StringMorph, I think that's a sign that I should 
> do that rather than override #drawOn. Johann 
> _______________________________________________ Beginners mailing list 
> Beginners <at> lists.squeakfoundation.org 
> http://lists.squeakfoundation.org/mailman/listinfo/beginners 
(Continue reading)

Kristen Eisenberg | 12 Feb 15:20
Picon
Favicon

Universe Video .sar to FileIn

I tried Squeak Universe, Uncategorized Video and Image Processing but it
failed to load.
I attempted to contact Maintainer Lex Spoon asking for an update but no
response so far.


Kristen Eisenberg
Billige Flüge
Marketing GmbH
Emanuelstr. 3,
10317 Berlin
Deutschland
Telefon: +49 (33)
5310967
Email:
utebachmeier at
gmail.com
Site:
http://flug.airego.de - Billige Flüge vergleichen
_______________________________________________
Beginners mailing list
Beginners <at> lists.squeakfoundation.org
http://lists.squeakfoundation.org/mailman/listinfo/beginners
Gary Dunn | 16 Feb 20:43
Picon

Rice paper wallpaper on projects

Squeak 4.3 comes with a nice rice paper wallpaper. When I create a new
project it has the old, brushed metal wallpaper. I found ways to
change the color and turn on grid, but how do I use the rice paper
with a new project? And, related: after turning on the grid, how do I
turn it off? One more: is there a general way to select wallpaper?

--

-- 
Gary Dunn
Honolulu
Gary Dunn | 16 Feb 21:35
Picon

MPEGMoviePlayerMorph

Is there a working version of MPEGMoviePlayerMorph for 4.3? If so, how
do I add it to my image?

--

-- 
Gary Dunn
Honolulu
Joey C | 19 Feb 01:54
Picon

Squeak hangs when using System Browser

Hi everyone,

Today's my first day playing around with Squeak. I've been following Squeak By 
Example's eBook and image (http://www.squeakbyexample.org/). 

Everything was going great until I fired up the System Browser and started 
browsing. I can select a category but as soon as I try to select a class, 
everything becomes unresponsive. 

Just wondering if anyone else has run into this issue? 

Thanks,
Joey
Joey C | 19 Feb 02:21
Picon

Re: Squeak hangs when using System Browser

Joey C <joey <at> chakraborty.ca> writes:

> 
> Hi everyone,
> 
> Today's my first day playing around with Squeak. I've been following Squeak By 
> Example's eBook and image (http://www.squeakbyexample.org/). 
> 
> Everything was going great until I fired up the System Browser and started 
> browsing. I can select a category but as soon as I try to select a class, 
> everything becomes unresponsive. 
> 
> Just wondering if anyone else has run into this issue? 
> 
> Thanks,
> Joey
> 

Problem solved! 
Something seemed to be wrong with the VM I originally downloaded. Upon getting a 
newer version, I can't reproduce the bug anymore.

Gmane