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
2 answers

Decorator pattern in smalltalk

I have unavailingly been searching for a proper implementation of the decorator pattern in smalltalk. Could someone please provide me with a reference? Edit: I am building a game with a player and a simple collision object. Instead of subclassing, I…
Thyrel
  • 195
  • 4
  • 13
1
vote
2 answers

How to install Connectors in Squeak 4.5

I would like to install the latest Connectors from the ss3 repository here http://ss3.gemstone.com/ss/Connectors.html I'm having difficulty installing in Squeak 4.5. Using the Installer script results in MessageNotUnderstood:…
user1000565
  • 927
  • 4
  • 12
1
vote
2 answers

Enforcing and contract methods in Squeak

So I created a class that enforces every method (message) that is sent to it's class instance. i.e that code: |a| a := Animal new. a makeSound: 'bark' should lead to a call to "doesNotUnderstand" (even though it exists in the class) and it should…
wannabe programmer
  • 653
  • 1
  • 9
  • 23
1
vote
1 answer

catching the assertion failure message before handling it

I know how to raise an exception and how to handle it , but suppose I have this method: method1:arg AssertionFailure signal:'rescue error comment'. I want to catch this exception and create new Assertion failure exception with another…
Ohad
  • 1,563
  • 2
  • 20
  • 44
1
vote
1 answer

How do I invoke a Squeak method when given the method name as a string?

How do I invoke a Squeak method when given the method name as a string? is it possible ?
Ohad
  • 1,563
  • 2
  • 20
  • 44
1
vote
2 answers

How do we call a class method from another class method?

what is the correct way calling a class method from another class method? is it className methodName or self methodName or className class methodName can we use self when we don't create an instance of the class?
Ohad
  • 1,563
  • 2
  • 20
  • 44
1
vote
2 answers

overriding compile method in squeak

How can i override the method (of behavior): compile: code notifying: requestor trailer: bytes ifFail: failBlock in the new function (that overrides compile of Behavior) I need to compile the method in the object "code". Do I need to declare it…
Ohad
  • 1,563
  • 2
  • 20
  • 44
1
vote
1 answer

equality by value and equality by refernce with linked list

it seems very difficult to get a proper source of information about Squeak. I have a few basic questions about it: does '=' check for equality by refrence? does '==' check for equality of values? collection - linked list - if I do something…
Ohad
  • 1,563
  • 2
  • 20
  • 44
1
vote
2 answers

How to check out code for SqueakSource?

I created new asserts in the package KernelTests-Numbers of squeak. I cannot find a way to check out these to Squeaksource (a repo) or with monticello. How to check out new tests into the repository http://source.squeak.org/trunk to spread it to the…
bartak
  • 91
  • 7
1
vote
1 answer

How to detect the removal of a submorph when the owner is deleted

If I have a morph that contains submorphs, and I delete it, what messages get sent to the submorphs? delete is not being sent. Here is the situation. I have a container Morph (not subclassed) which holds some submorphs of class MyMorph. After I open…
Paul Richter
  • 6,154
  • 2
  • 20
  • 22
1
vote
1 answer

Squeak - SUnit Testing for Errors

I have been suggested to use should:rise in my test case to test for errors that a method might raise. For some reason it does not work as expected, so I want to verify that I'm doing it right. Here is the code in the test case: self should:…
Artium
  • 5,147
  • 8
  • 39
  • 60
1
vote
4 answers

Where can I download the Slang sources to SqueakVM?

Is there an archive somewhere that hosts the Slang sources for SqueakVM as a zip of .st sources? I want to just download them rather than attempting to coerce VMMaker to load into a running ST image and filing them out myself? I'm not trying to…
Sophistifunk
  • 4,742
  • 4
  • 28
  • 37
1
vote
2 answers

Couldn't load FFI package in pharo 3.0 MacOS

I am using monticello's location as "http://source.squeak.org/FFI" and then trying to load FFI package for MacOS. I could load FFI-Pools,FFI-Kernel. But was unable to load FFI-MacOS, It throws error on "getenv" method. Synatx error:'>'expected. I…
Biparite
  • 203
  • 1
  • 2
  • 13
1
vote
1 answer

How to replace flatCollect in Squeak 4.5?

I wanted to port a program from Squeak 4.4 to Squeak 4.5 but get the error message: OrderedCollection(Object)>>doesNotUnderstand:#flatCollect:. flatCollect does not seem to be available anymore in Squeak 4.5. Does anybody know a good replacement for…
adius
  • 13,685
  • 7
  • 45
  • 46
1
vote
3 answers

Squeak (or pharo) change windows default white background color

How can I change the default white window background color in Squeak or Pharo ? I am new to smalltalk and Morphic, i looked at the morphic classes but did not found the correct instance variables. Thanks.