Questions tagged [smalltalk]
Smalltalk is one of the oldest object-oriented programming languages. It pioneered many aspects modern developers take for granted: Virtual Machines (Smalltalk is an interpreted language) IDEs Pure object approach (no primitives or keywords at all) Closures (called Blocks) An image (i.e. non-file-based language) Advanced debugging techniques (halting programs on-the-fly, inspection, writing or modifying code on-the-fly)
smalltalk
1,711
questions
1
vote
1
answer
27
views
How to replace a for example #test symbol in one method?
I would like to use Pharo GUI to replace a symbol #test within one method. How do you do that? I could not find a tool to use that for.
For example:
overview
send: #test
sendSecond: #test
I would ...
1
vote
1
answer
55
views
How to correctly handle parsing errors with PetitParser or PetitParser2 in Pharo
I know there has been an old question How can a PetitParser parse rule signal an error?. Lukas Renggli has written it is:
in general this is not good style (mixes syntactic and semantic
analysis)
...
1
vote
1
answer
47
views
How can I remove an item on the main Pharo menu left over by a Roassal installation?
After an attempt to install Roassal a persistent menu item has been to the top level of the image's menu.
The menu label is Load full version and after searching the image it is coming from a ...
2
votes
2
answers
67
views
How can I set custom StartupPreferences for a particular Pharo image?
I want a particular image to be run with specific settings at start tiime as noted here
StartupPreferencesLoader default executeAtomicItems: { (StartupAction
name: 'Start Literate Server'
...
2
votes
1
answer
41
views
Does Pharo have a messages or warnings log during a session?
When I started a Pharo image I got a warning about a .sources file being missing because I had renamed the .image, .sources and .changes file to one of my preferences.
It showed up for a while then ...
0
votes
0
answers
29
views
PetitParser2 Smalltalk grammar testing dataset
I would like to use PetitParser2 in Pharo.
I would like to use the Smalltalk grammar, but the testing dataset is not available anymore. Does anyone know where to get it?
Edit:
The filename missing is ...
2
votes
3
answers
61
views
Why does this code result in a "Cannot store into ->" error message?
Executing this code in Pharo results in a Cannot store into -> error message?
[ :x |
x := x + 33.
x + 2] value: 5
Is this a logical consequence of Smalltalk's syntax, or is it a consequence of ...
1
vote
2
answers
42
views
Add file as attachment and send email with outlook and visualworks smalltalk
I can't figure out how to add an file as attachment when sending a mail.
I have tried with: t2 setProperty: #Attachments value: 'C:\temp\file.txt'.
And the property seems correct as it wont throw an ...
1
vote
1
answer
44
views
How to use cascade option in ProfStef lesson 17?
In lesson 17 of ProfStef I am stuck on the command which says.
"Try to go to the next lesson with a cascade of two 'next' messages:"
What is the correct answer for these?
0
votes
1
answer
87
views
Problem Working with Arrays in Pharo 11.0
I am working on a class named Boggle which contains two class-side methods below:
search: board for: words
| result visited trie |
result := Dictionary new.
trie := CTTrie new.
words do: [:...
1
vote
0
answers
35
views
On Pharo 11, is it possible to programatically change the traits of a defined class?
On an already created class MyClass that subclasses Object, it is possible to execute MyClass subclass: SomeNewClass to change it's superclass.
It is possible to make something similar to traits so ...
2
votes
1
answer
51
views
Smalltalk self issue
I'm running into this error:
"[basicNew] Super and Self Messages sent but not implemented"
new: dice ^self basicNew setRoll: dice
I can't seem to figure out what I need to do? This is first ...
1
vote
1
answer
71
views
How to define a variable in Strongtalk (Smalltalk) and print it
Does anyone know how to define a variable in Strongtalk-2.0 (Smalltalk) and print it on screen? In "normal" Smalltalk it's like
x := 2.
Transcript show: x.
but in Strongtalk ( x < Integer ...
1
vote
3
answers
85
views
Understanding Smalltalk Method Invocation with Multiple Colons
I'm currently learning Smalltalk, and I've encountered a behavior that I find puzzling regarding method invocation with multiple colons. I understand that colons play a crucial role in specifying ...
1
vote
1
answer
64
views
Convert DateTime to formated String on Pharo 11
DateAndTime now asString returns a string in a format like YYYY-MM-DDThh:mm:ss.s+ZZ:zz:z
Is it possible to create a String based on a DateTime but with a different format?