In a Workspace, try:
'abc' trimRight
There's also trimLeft and a trimBoth. You can browse the String class
to see them. You can also see the code in there which gives a hint as
to how easy it is to modify for different character.
===Blake===
On Fri, Apr 27, 2012 at 8:27 AM, H. Hirzel
On Sat, 27 Sep 2008 20:47:39 -0700, Ralph Johnson [EMAIL PROTECTED]
wrote:
On Sat, Sep 27, 2008 at 1:40 PM, Andy Burnett
[EMAIL PROTECTED] wrote:
I read somewhere - can't remember where - that setters are considered
evil.
This is not a good argument. Many Smalltalk objects are not
On Sun, 28 Sep 2008 13:27:52 -0700, Blake [EMAIL PROTECTED] wrote:
If you're going to assign an action verb to a setter, it should be
reflective of the process.
donut := Donut makePlain.
donut ice: #chocolate.
donut addSprinkles: jimmies atRandom.
Looking at this again, it doesn't seem
Thanks Jeffrey and Herbert.
___
Beginners mailing list
Beginners@lists.squeakfoundation.org
http://lists.squeakfoundation.org/mailman/listinfo/beginners
, and he can't get rid of them. They're sketchmorphs. If I
add them to the world, they'll show up, and I can then delete them with
the X but they simply vanish from the world, while persisting.
How do I find out what is referring to these objects and thus keeping
them alive?
===Blake
I've been following this debate with some interest, but I think it's gone
beyond a noob discussion.
Is there a noob answer to this question? There ought to be. I'm sort of
leaning toward:
Q. How do you empty a collection.
A. You don't, you replace it with a new instance.
Q. What if you
On Tue, 19 Feb 2008 14:20:51 -0800, Mathieu Suen [EMAIL PROTECTED]
wrote:
On Feb 19, 2008, at 10:36 PM, Klaus D. Witzel wrote:
On Tue, 19 Feb 2008 22:14:49 +0100, Blake wrote:
I've been following this debate with some interest, but I think it's
gone beyond a noob discussion
On Tue, 19 Feb 2008 15:08:56 -0800, nicolas cellier [EMAIL PROTECTED]
wrote:
Blake a écrit :
Well, from what I was reading, slow and smells is putting it too
mildly. It sounds like it can corrupt your image, i.e., leave you with
non-working objects in unexpected places. I wouldn't even
On Tue, 19 Feb 2008 15:19:40 -0800, nicolas cellier [EMAIL PROTECTED]
wrote:
But become: is still essential for operations like growing the
MethodDictionary when you add new methods to a class, or migrate
allInstances when you a or remove an instance variable to a class, to
name few.
On Tue, 19 Feb 2008 15:59:57 -0800, nicolas cellier [EMAIL PROTECTED]
wrote:
However, there are plenty of ordinary things that would have the same
result:
| key1 key2 dic |
key1 := 'abc' copy.
key2 := 'abd' copy.
dic := Dictionary new.
dic at: key1 put: 1.
dic at: key2 put: 2.
key1 at: 1
the system?)
Am I doing this wrong/non-optimally? (Maybe I should be overriding #new
instead of #basicNew, but I get the same dire warning for #new).
===Blake===
P.S. Seeing if this goes through; last message I sent warned me that I
wasn't on the mailing list
On Sun, 20 Jan 2008 04:37:17 -0800, [EMAIL PROTECTED] wrote:
Hi Blake!
I've yet to find a situation where I can't put the code that would be in
a constructor in C++ into #initialize. I suppose there are situations
where that would be a bad idea, but I just haven't met them, or else I'm
I'm trying to load an external (windows) bitmap and set a sketchmorph (or
imagemorph) to display. There's a lot of stuff to cycle through images in
sketchmorph but I don't see how to load something. I've been trying:
i := ImageMorph new.
f := FileStream readOnlyFileNamed:
On Sun, 20 Jan 2008 07:54:47 -0800, Ron Teitelbaum [EMAIL PROTECTED]
wrote:
Hi Blake,
There are a number of ways to initialize an object. Overridding #new is
an acceptable practice but normally this is done because you do not want
a new object created. For example if you wanted to have
On Tue, 02 Oct 2007 20:22:01 -0700, Mark Smithfield
[EMAIL PROTECTED] wrote:
In the floor method from Number,
truncation _ self truncated.
What does the underscore mean?
:=
In some images it shows up as a left-pointing arrow.
I'm not sure if that's coming back in later iterations or
On Fri, 21 Sep 2007 13:43:32 -0700, Giovanni Corriga
[EMAIL PROTECTED] wrote:
Hi all,
#squeak is getting crowded:
Perhaps, but there doesn't seem to be much discussion, at least when I've
checked in. (Not complaining, just observing.)
___
On Fri, 21 Sep 2007 13:56:44 -0700, Janko Mivšek [EMAIL PROTECTED]
wrote:
Blake wrote:
[EMAIL PROTECTED] wrote:
#squeak is getting crowded:
Perhaps, but there doesn't seem to be much discussion, at least when
I've checked in. (Not complaining, just observing.)
Maybe we need more
On Tue, 11 Sep 2007 05:38:45 -0700, John Almberg [EMAIL PROTECTED]
wrote:
Hi Blake,
I tried this every which way. I was able to create a new Transcript with
the 'make a sibling' halo, but couldn't figure out how to give it it's
own name (so it was a separate stream). How do you do
On Mon, 10 Sep 2007 21:20:31 -0700, Scott Wallace [EMAIL PROTECTED]
wrote:
Hi, John,
Via the Squeak UI: each time you choose open transcript from the
open... branch of the World menu, a new Transcript window is opened.
Via code: evaluate Transcript open.
But that doesn't solve
On Sat, 01 Sep 2007 20:46:29 -0700, Michael van der Gulik
[EMAIL PROTECTED] wrote:
Install REPLServer, which should be available from SqueakMap or the
PackageUniverse. Start it and make sure it works. When Morphic breaks,
telnet to localhost on port 4445 and type in:
: utils rebootMorphic.
On Fri, 31 Aug 2007 19:19:22 -0700, [EMAIL PROTECTED] wrote:
This may be of some help:
http://wiki.squeak.org/squeak/2168
scroll to:
How can I recover my work if a crash has occurred?
That's helpful. Thanks, Brad!
___
Beginners mailing list
On Fri, 31 Aug 2007 22:10:13 -0700, Enno Schwass [EMAIL PROTECTED] wrote:
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Hi
Maybe this thread can help you. It does for me
http://www.nabble.com/Whats-the-best-way-to-stop-numerous-mnu-
Messages--tf4307386.html#a12261833
Thanks, Enno, I'll
just closed the Squeak window, but it's really tiresome
having to redo all the work since the last save. (It only matters a little
how much work. It's tiresome on principle.)
Can anything be done to stop this?
===Blake===
___
Beginners
On Wed, 29 Aug 2007 08:43:08 -0700, Benjamin Schroeder
[EMAIL PROTECTED] wrote:
On Aug 29, 2007, at 5:42 PM, Benjamin Schroeder wrote:
My experience on Windows is that if you launch Squeak.exe by double-
clicking, it can take a while to bring up the dialog where you can
choose an image.
So...where is Omnibrowser?
I have vanilla Squeak 3.9 and a bunch of Squeak-devs that say it's
installed. How do I open one? It's not the default, is it?
And how do I make traits visible?
Thanks!
___
Beginners mailing list
Hey, all,
I've just set my son up with an Ubuntu system and every now and again,
when he minimizes his class browser, they are, em, featureless(?) on
restore. All the panes are gone.
Anyone else seen such a thing?
===Blake
with the platform.
On 8/24/07, David Mitchell [EMAIL PROTECTED] wrote:
Are you using OmniBrowser? I had a method list show up with a red X
where the methods should go the other day.
On 8/24/07, Blake [EMAIL PROTECTED] wrote:
Hey, all,
I've just set my son up with an Ubuntu system
On Tue, 14 Aug 2007 22:52:12 -0700, John Warner [EMAIL PROTECTED]
wrote:
When I loaded squeak again I got the option of 3.9 and 3.8xxx.
It is easier than you might have thought.
Much appreciated, John. I could use some easy about now.
___
Do I take from this that the Synapse Package Installer Squeak options
don't work?
(I'm just about to do a Squeak install on Ubuntu.)
On Mon, 13 Aug 2007 10:31:49 -0700, Richard Eng [EMAIL PROTECTED]
wrote:
Finally, a reasonable answer! This works.
No one thought to document this
On Thu, 09 Aug 2007 16:57:19 -0700, Benjamin Schroeder
[EMAIL PROTECTED] wrote:
To clarify, = and == are different variants of comparison. Usually
= is used for value comparison - for example, two different lists that
had the same contents would be = equal. == means is the same
object.
.
That's all.
===Blake===
___
Beginners mailing list
Beginners@lists.squeakfoundation.org
http://lists.squeakfoundation.org/mailman/listinfo/beginners
On Thu, 26 Jul 2007 14:43:41 -0700, Bert Freudenberg
[EMAIL PROTECTED] wrote:
This would work:
| x |
x := 4/3.
'(', x integerPart printString, '+', x fractionPart printString, ')'
and also would have the property of being self-evaluating just like
fractions did before.
Though I agree
On Thu, 26 Jul 2007 18:01:37 -0700, Blake [EMAIL PROTECTED] wrote:
Blake, if you actually want to make this work in your image, you could
do this:
FractionprintOn: aStream base: base
| int |
(int := self integerPart) = 0
ifTrue: [aStream nextPut
Hello,
I think I've mentioned this before but Array2D is deprecated.
Is there a two-dimentsional array structure that's NOT deprecated?
(Array2D just says scary stuff without suggesting what one SHOULD use.)
===Blake
Bert,
Thanks a lot, by the way. Your help is much appreciated.
===Blake===
___
Beginners mailing list
Beginners@lists.squeakfoundation.org
http://lists.squeakfoundation.org/mailman/listinfo/beginners
the catalog. These objects all have names but they only work
with eToys. Then there's the mysterious number that appears So, I
give: If things are supposed to be done in worlds and playfields, how do
alter the behavior of those worlds and playfields to meet my needs?
===Blake
, messages stop going to keyDown for my morph.
===Blake===
___
Beginners mailing list
Beginners@lists.squeakfoundation.org
http://lists.squeakfoundation.org/mailman/listinfo/beginners
On Mon, 02 Jul 2007 16:56:07 -0700, Bert Freudenberg
[EMAIL PROTECTED] wrote:
Works for me (though you actually do not need the #keyboardFocus: send).
Without the #keyboardFocus: self, the focus never goes to the newly
created Morph.
So, you're saying that your Morph class gets all keyboard
can handle the Windows side, if someone else can take Unix and Mac,
etc.
If it's still necessary, that is.
===Blake===
___
Beginners mailing list
Beginners@lists.squeakfoundation.org
http://lists.squeakfoundation.org/mailman/listinfo
On Tue, 12 Jun 2007 10:33:41 -0700, Todd Blanchard [EMAIL PROTECTED]
wrote:
Your real choices are Java[3] and Flash.
Nonsense. You can do whatever you like in JS.
http://janis.or.jp/users/segabito/JavaScriptMaryo.html
I can only assume that you're not a gamer.
products will do and more phase,
soon to be replaced by the you'll use it and like it OR ELSE phase).
It's actually a pretty dismal situation.
===Blake===
[1] http://www.atariarchives.org/basicgames/
[2] http://www.treblig.org/si/spaceiv.html
This is the best one I've seen, and it's
I move those? (I mean, I can, if I do it manually but...)
===Blake===
___
Beginners mailing list
Beginners@lists.squeakfoundation.org
http://lists.squeakfoundation.org/mailman/listinfo/beginners
On Sat, 21 Apr 2007 17:03:07 -0700, Brad Fuller [EMAIL PROTECTED]
wrote:
Hi Blake,
Monticello is a great way, at least for me.
http://www.wiresong.ca/Monticello
http://wiki.squeak.org/squeak/43
http://wiki.squeak.org/squeak/43
The docs pointed to in the first link suggest you can use
On Fri, 30 Mar 2007 10:12:15 -0800, Edgar J. De Cleene
[EMAIL PROTECTED] wrote:
El 3/30/07 2:58 PM, Ralph Johnson [EMAIL PROTECTED] escribió:
Setting accessor methods are a time-honored exception.
Could expand ?
Are you saying what if we have foo should have setfoo: and getfoo: ?
Is that
Edgar,
Thanks for your advice. I'll ditch the toys.s
===Blake===
On Thu, 22 Mar 2007 02:01:39 -0800, Edgar J. De Cleene
[EMAIL PROTECTED] wrote:
What I do if must cook your spec:
Subclass ImageMorph
ImageMorph subclass: #BlakeMorph
instanceVariableNames: 'label number
Hello, all:
I'm working on a number of Squeak projects but another project has come
up that I think Squeak would be perfect for and I think I'm best off using
a mix of the different approaches of Squeak.
The simplicty of the program is a source list of items that can be
dragged and
On Sun, 11 Mar 2007 04:30:29 -0800, Bert Freudenberg
[EMAIL PROTECTED] wrote:
^(1 to: aQuantity) collect: [:i | stuff]
Very nice, Bert, thanks!
___
Beginners mailing list
Beginners@lists.squeakfoundation.org
Here's another one:
I've created a method that returns an array of its own class:
anArray: aQuantity
| a |
a := Array new: aQuantity.
a size
do: [:i | a at: i put: self class new].
^ a
but, for a while, I was trying to make this a single line:
^
I've been using accessors for every instance variable, and even using them
internally.
I have to admit, because of the need to preface every method call with
self, it makes the code look less clean.
I've also ended up with what seems to be an odd construct:
clear
self myCollection
the
iterator ends up missing items because it's changing as it goes. Hard for
me to believe this is a bug, but that's what it looks like to me.
===Blake===
___
Beginners mailing list
Beginners@lists.squeakfoundation.org
http
On Tue, 06 Mar 2007 22:46:52 -0800, Jens Pall [EMAIL PROTECTED] wrote:
Blake wrote:
On Tue, 06 Mar 2007 12:10:00 -0800, Jens Pall [EMAIL PROTECTED]
wrote:
As a side note I might mention that our current system is implemented
in C++ and, if it turns out to be possible with respect
Takes about 3 seconds here, with image in different directory from VM.
On Tue, 06 Mar 2007 07:39:08 -0800, Hilaire Fernandes
[EMAIL PROTECTED] wrote:
I am pretty sure I read it somewhere in the Squeak mailing list why
Squeak can be slow to start in Windows... but I cannot find the
On Tue, 06 Mar 2007 12:10:00 -0800, Jens Pall [EMAIL PROTECTED] wrote:
As a side note I might mention that our current system is implemented in
C++ and, if it turns out to be possible with respect to the topic of
this thread, we are seriously considering porting it to Squeak. Croquet
will
Just some quick thoughts. In the real world a deck of cards is just
that. There is no meaning in the cards themselves. Instead the meanings
are in
the rule book that comes with the game that you are playing. Also there
is no value in a card, but in the hand, or best hand out of possible
quite right with me,
like I have the responsibility/scope wrong. Any thoughts?
===Blake===
___
Beginners mailing list
Beginners@lists.squeakfoundation.org
http://lists.squeakfoundation.org/mailman/listinfo/beginners
On Thu, 01 Mar 2007 18:50:13 -0800, Ron Teitelbaum [EMAIL PROTECTED]
wrote:
Here's the trick! It is 1 asCharacter. If you separate your attributes
by a value that guaranteed to sort to the top you can make one big
string and use it to sort.
Done it for years--not in Smalltalk--usually
I'm using this to sort a string case-insensitively:
'abcCBA' sortBy: [:a :b | a asUppercase b asUppercase]
It works fine.
My question is, am I missing some built-in feature that does this, or is
this idiomatic?
===Blake===
___
Beginners
On Thu, 01 Mar 2007 17:21:44 -0800, Bert Freudenberg
[EMAIL PROTECTED] wrote:
There is also a private prefix that is even enforced by the compiler:
pvt. It will only allow to send this to self. This should only be
used in highly sensitive places, if at all.
Thanks, Bert.
So, that's a
needed so
much in other langauges that I'm not a big fan of the concept, but that
aside...)
Anyway, it suggests using a my- prefix for privates and an fr- for
friends (or protected, I guess).
Thoughts?
===Blake===
___
Beginners
On Thu, 22 Feb 2007 04:15:46 -0800, David T. Lewis [EMAIL PROTECTED]
wrote:
I usually save my image right before loading a new package. If something
goes wrong, I quit without saving, so no harm is done. If I am loading
several packages, I may use save as new version after loading a few
of
On Thu, 22 Feb 2007 14:04:56 -0800, Mathieu Suen [EMAIL PROTECTED]
wrote:
Anyway you can do wonderful things with the ChangeSet :)
I need to school myself better in it, for sure. Thanks.
___
Beginners mailing list
of the package is that okay?
===Blake===
___
Beginners mailing list
Beginners@lists.squeakfoundation.org
http://lists.squeakfoundation.org/mailman/listinfo/beginners
these properties.
Yeah, I hesitated to use the term linked list but it's (non-technically)
a list of linked items. I suppose, technically, it's an n-tree.
Thanks again!
===Blake===
___
Beginners mailing list
Beginners@lists.squeakfoundation.org
http
everything. Commoditize computing power completely.
I hope my children are able to benefit from and contribute to it.
===Blake===
___
Beginners mailing list
Beginners@lists.squeakfoundation.org
http://lists.squeakfoundation.org/mailman/listinfo
, and while we've used
Stephane's Bots book to great effect, he's actually much more comfortable
coding in the full Squeak. Strange.
===Blake===
___
Beginners mailing list
Beginners@lists.squeakfoundation.org
http://lists.squeakfoundation.org/mailman
On Thu, 08 Feb 2007 22:58:32 -0800, Klaus D. Witzel
[EMAIL PROTECTED] wrote:
Sure. Evaluate Object halt; new with doIt and then in the debugger, in
the DoIt method line push the buttons Through then Into.
Aha.
Huh.
Why doesn't this:
^ self basicNew initialize
cause a DNU? Object
actually useful?
===Blake===
___
Beginners mailing list
Beginners@lists.squeakfoundation.org
http://lists.squeakfoundation.org/mailman/listinfo/beginners
On Mon, 05 Feb 2007 06:43:42 -0800, David Röthlisberger [EMAIL PROTECTED]
wrote:
Any hint is greatly appreciated, thanks.
SystemWindow new
openInWorld;
position: 0 @ 0;
extent: World extent
That's cool lookin'. What Squeak projects use it?
On Sat, 03 Feb 2007 20:44:50 -0800, Todd Blanchard [EMAIL PROTECTED]
wrote:
If you just want the index, you would do something like:
1 to: collection size do: [:i | stuff goes here ].
You know, I didn't consider that because it's...extrinsic.
If you want to fill an entire collection with
On Sat, 03 Feb 2007 20:44:50 -0800, Todd Blanchard [EMAIL PROTECTED]
wrote:
initializeWithPoint: aPoint
rows := (interval 1 to: aPoint x) collect: [:r | Array new: aPoint y].
Also, stylistically, is it preferred to have an instance-based initializer
rather than a class-based
?
===Blake===
___
Beginners mailing list
Beginners@lists.squeakfoundation.org
http://lists.squeakfoundation.org/mailman/listinfo/beginners
The reason for the fork is simple (though the implementation is not):
Morphic is single threaded, while Stef wanted to allow multiple
independent programs written in straight Smalltalk for the purpose of
his book.
And he wanted to present things like loops and make it relatively
On Mon, 22 Jan 2007 19:19:55 -0800, David Mitchell
[EMAIL PROTECTED] wrote:
That's true enough, but the stack you are debugging shouldn't continue.
Unfortunately, I can't think what might be wrong. I've gone through Bots
Inc without hitting this one.
I haven't had a chance to try this
On Tue, 23 Jan 2007 20:19:47 -0800, David Mitchell
[EMAIL PROTECTED] wrote:
I downloaded the ReadyPC image from the SCGSmallWiki site and I am able
to repeat the problem.
I think it is something wrong with the Bot Workspace. I am able to
repeat your bug if I click the Do It or Do It All
, i.e, there's no
indication that they're doing anything, they don't seem to produce any
results (although the D seems to occasionally erase everything selected).
Anyone else experiencing anything like this?
===Blake===
___
Beginners mailing
On Fri, 11 Aug 2006 02:20:08 -0700, Klaus D. Witzel
[EMAIL PROTECTED] wrote:
Hi Blake,
on Fri, 11 Aug 2006 09:48:58 +0200, you wrote:
On Thu, 10 Aug 2006 05:58:54 -0700, Klaus D. Witzel
[EMAIL PROTECTED] wrote:
On Thu, 10 Aug 2006 14:43:46 +0200, Michael Kohout wrote:
When I get home
On Thu, 10 Aug 2006 05:58:54 -0700, Klaus D. Witzel
[EMAIL PROTECTED] wrote:
On Thu, 10 Aug 2006 14:43:46 +0200, Michael Kohout wrote:
When I get home(and if the weather isn't too nice) I play with Squeak.
But when I go to work, I write Java(like a lot of people on this
list, I'd imagine).
On Sat, 01 Jul 2006 21:33:04 -0700, itsme213 [EMAIL PROTECTED] wrote:
I miss my Ruby macros (1st day in Squeak and I love it ... dislike the
camelCase tho'). Would this be the correct way to go about it?
Not to hijack, but this is the second time I've run across the term
camelCase in the
78 matches
Mail list logo