Questions tagged [squeak]

Squeak is a modern, open-source implementation of the Smalltalk language, with a history of being very easy to port across platforms. See https://squeak.org/.

Squeak started in 1996 as a project of Alan Kay and friends at Apple. They wanted an open source Smalltalk with a view to building Smalltalk's replacement.

Among its features:

  • The Virtual Machine is written in (a subset of) Smalltalk.
  • Runs bit-identically across all its platforms.
  • Very easy to port: it runs on Linux, Macs (both old and new), Windows, iPhones, iPads, and even bare metal.
412 questions
1
vote
3 answers

Cannot Install Squeak and Pharo Smalltalk on Mac OS X 10.9

I cannot manage to install Squeak and Pharo Smalltalk on Mac OS X 10.9. as general a smalltalk system is composed of three elements; a VM, an image(if any changes to image then a changes file), and a sources file. on squeak page I have downloaded…
sçuçu
  • 2,960
  • 2
  • 33
  • 60
1
vote
1 answer

Get sender of a message in Smalltalk

Is there a practical way to get the sender of a message in Smalltalk without manually passing self as a Parameter? To be more concrete: I want to add a class specific prefix to an ID that gets passed to my class, so if ClassA sends (on class…
Leo
  • 37,640
  • 8
  • 75
  • 100
1
vote
2 answers

Constructors in cases of inheritance (Squeak)

I have a class A which B inherits from. The inheritance includes a bunch of parameters, and they should all be initialized to some default values in both cases (whether we create an A object or a B object). I decided to put the initialization into…
EpsilonVector
  • 3,973
  • 7
  • 38
  • 62
1
vote
2 answers

Constructor not found

I'm trying to implement a new class in Squeak, and for some reason when I run a test I get a MessageNotUnderstood error, even though the message is defined. Class code: Object subclass: #ClassAnalyzer instanceVariableNames:…
EpsilonVector
  • 3,973
  • 7
  • 38
  • 62
1
vote
1 answer

subclassResponsibility sender selector stuck

subclassResponsibility sender selector stuck even when subclasses have the method implemented. I think the argument may cause this happen but is it? and could anyone tell us why? in abstract class we have this fromString: aString "init with a…
marsrover
  • 424
  • 5
  • 16
1
vote
1 answer

Smalltalk dictionary as calculator

I'm working on a homework assignment that asks us to create a type of Units class that can keep track of units and perform basic arithmetic on them. The problem description has this bit, which I don't completely understand: Probably the easiest way…
MrDuk
  • 16,578
  • 18
  • 74
  • 133
1
vote
1 answer

Compiling a class method in squeak in run-time

I would like to add a class method during run time in squeak. I know that there is a method compile, which is defined in Behaviour class, but this one adds the new method I want to the class Instance methods. Is there a way to compile it to the…
1
vote
2 answers

Skipping every other array element

So Im trying to skip past every other element and enter them into a collection. I am then converting the collection back to an array and trying to return it. Im not sure whats wrong though. altElement | newColl x y | newColl:=…
TheNodeCommode
  • 93
  • 1
  • 2
  • 8
1
vote
1 answer

Make a Matrix class that can be initialized without declaring matrix size first

I am new to Smalltalk and am taking a class init currently. One of the problems we were assigned requires creating a new Class "HeavyMatrix", which is called like this — aMatrix := HeavyMatrix new. Notice that there is no initial size assignment.…
Wes Field
  • 3,291
  • 6
  • 23
  • 26
1
vote
0 answers

TextMorph default font size

I'm trying to have an empty TextMorph with a default font size of 12 points, where the original default is 9pts. If I bring up the halo and change the font size to 12pts, the empty TextMorph will still default to 9pts when text is entered into it. I…
Jony Thrive
  • 931
  • 1
  • 7
  • 15
1
vote
1 answer

How do I display the new Squeak background in my trunk image?

I have a Squeak 4.3 image that I have updated through 4.4 by using the trunk update stream, which pulls down source code updates from the Monticello repository here How do I get the new 4.4 desktop? In particular, how do I replace the brown antique…
dcorking
  • 1,146
  • 1
  • 14
  • 24
1
vote
2 answers

Accessing instance variables in an eventhandler with smalltalk

I'm pretty new to smalltalk and an apparently easy problem drives me crazy. My own class inheritates from the Morphic class and overwrites keyStroke keyStroke: anEvent Transcript show: myDigitClass. (((anEvent keyValue) > 47) and: ((anEvent…
norty
  • 227
  • 2
  • 6
1
vote
3 answers

Local variables in compile text stream (smalltalk)

I'm trying to overwrite the #new message in MyObject. The problem is that when the text gets compiled, the local variables, disp and oldNew are changed to t1 and t2 respectively (I'm using Squeak 4.3) and then it can't send oldNew to self. I could…
Itamar Bitton
  • 777
  • 2
  • 7
  • 25
1
vote
2 answers

How to connect a Morph to an Object that it is supposed to visualize in Morphic?

Let's say i have Bird class and BirdMorph class. Birds have a position, and i want BirdMorphs to change their position on the screen, whenever the corresponding bird changes it's position. What is the intended way to connect a Morph to the Object it…
Helene Bilbo
  • 1,142
  • 7
  • 20
1
vote
1 answer

Generating printable output within Squeak

I'd like to create a printable output file from within Squeak, for instance to create a report. I've done a little Googling and I'm surprised by how little material in the way of examples relating to creating printable files exist. However, I've…
KHWP
  • 1,211
  • 2
  • 11
  • 17