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

How do I make really large text in Smalltalk?

I'm trying to make a large text banner in Squeak Smalltalk, with the following code: t := TextMorph new. t string: 'You win!' fontName: 'BitstreamVeraSans' size: 400. t extent: 600@100. t center: Display center. t openInWorld. But the text size…
Eric Clack
  • 1,886
  • 1
  • 15
  • 28
5
votes
1 answer

State of ifEmpty:ifNotEmpty:, ifNil:ifNotNil: and related messages across Smalltalks?

What is the current state of messages like ifEmpty:ifNotEmpty:, ifEmpty:, ifNotEmpty: ifNil:ifNotNil:, ifNil: and ifNotNil:? Are they available across Smalltalks, and do they behave consistently? You still see things like "object isEmpty ifTrue:…
andrew
  • 53
  • 2
5
votes
2 answers

Smalltalk delegation / storing message selectors

I am learning Squeak and I was wondering if there is a way to 'store' a message to be sent to an object. For example I would like to be able to do the following : Delegator>>performWith: arg |target method| target := MyObject new. method…
ahjmorton
  • 965
  • 1
  • 5
  • 18
5
votes
2 answers

Interception messages in Squeak

I am trying to understand better reflection in Smalltalk. I am using the latest version of Squeak (v4.3). I want to intercept every message sent to instances of one of my classes. I assumed that I could override the method…
5
votes
1 answer

how to change submorph position

I have two morphs that one is in the other. a:= Morph new. b:= Morph new. a addMorph: b. a openInWorld. but when I want to change b's position by doing b position: 100@100, it never shows the change, so what am I missing here? or is it somehow…
yi cheng
  • 193
  • 10
5
votes
1 answer

Meaning of icons in class browsers

Does anyone know where one can find a description of the meaning of various "icons" and / or symbols one finds next to classes and methods in various browsers?
Sharphawk
  • 499
  • 4
  • 8
5
votes
2 answers

Morphic: Automatically resize contained group box in a scroll pane?

Testing with Pharo 1.4 summer. I think is better to explain it using screenshots, code is below. This is my initial state (what I'm getting now with my code): I want the group box morph to be filled horizontally on opening, like this: And after…
user183928
  • 783
  • 3
  • 9
5
votes
2 answers

How can the main window title in Squeak and Pharo be set?

How can the main window title in Squeak and Pharo be set? In Pharo I thought it could be set in the System -> Settings Menu but couldn't find anything there. Can it be set only in code?
vfclists
  • 19,193
  • 21
  • 73
  • 92
5
votes
2 answers

Are there tools for branch-level test coverage tracking for Pharo/Squeak?

I am looking for something that could visualize code coverage on the branch/statement level. My understanding is that the test coverage tool provide by the test runner in Pharo and Squeak only tell me which methods haven't been called. I also had a…
smarr
  • 763
  • 1
  • 6
  • 17
4
votes
3 answers

Squeak System Browser Questions

I am using (a school modified version of) the "Squeak By Example" (SBE) image for a OOP/OOD class. However, my System Browser is missing a few features that appear in SBE. I assume there are some configuration options that can get them back for me,…
RAL
  • 917
  • 8
  • 19
4
votes
3 answers

How to create a global variable in Squeak?

I don't mean a class variable. I want a variable that can be used everywhere. Where should I define it? [in squeak]
Renne
4
votes
5 answers

Message forwarding in Smalltalk

So I'm writing an application where one object has a bunch of delegate objects that it forwards messages to. The idea is that I can say someObject sendMessage:aMessage and aMessage will be sent to all of someObject's delegates (for any value of…
Alex
  • 4,316
  • 2
  • 24
  • 28
4
votes
2 answers

How to figure out if a regex implementation uses DFA or NFA?

I'm facing the question, whether a certain regex implementation is based on a DFA or NFA. What are the starting points for me to figure this out. One could also ask: What am I looking for? What are the basic patterns and / or characteristics? A good…
Jan
  • 1,594
  • 1
  • 20
  • 30
4
votes
2 answers

How can I run VisualWorks under OpenBSD?

Has anyone gotten VisualWorks running under OpenBSD? It's not an officially supported platform, but one of the Cincom guys was telling me that it should be able to run under a linux compatibility mode. How did you set it up? I already have Squeak…
brian d foy
  • 129,424
  • 31
  • 207
  • 592
4
votes
1 answer

Which methods must I override to enable drag&drop in Squeak?

I have a big morph with dozens of submorphs. The submorphs are of two kinds: pieces and squares. I have googled a lot and read quite a bit of Morphic documentation, but somehow I can’t get it to work. I have not yet found a document that clearly…
Sander de Jong
  • 351
  • 6
  • 18