pharo Questions
1
Solved
I have a scenario where a class holds two instance variables that are mutually exclusive. That is only one can be instantiated at a time. To be precise, I have a Promise class (trying to add promis...
Bobble asked 27/4, 2018 at 22:37
1
Solved
I am implementing futures in Pharo. I came across this website http://onsmalltalk.com/smalltalk-concurrency-playing-with-futures. I am following this example and trying to replicate it on Pharo. Ho...
Rah asked 21/4, 2018 at 22:37
4
Solved
Like in Java, C# etc. How would I define something like enum Direction { input, output } in Smalltalk?
3
I've got an embarrassingly simple question here. I'm a smalltalk newbie (I attempt to dabble with it every 5 years or so), and I've got Pharo 6.1 running. How do I go about finding the official sta...
1
Solved
I have been following the example of making a class in Pharo from the following link:
https://ci.inria.fr/pharo-contribution/job/UpdatedPharoByExample/lastSuccessfulBuild/artifact/book-result/Pharo...
1
I created a class in Pharo known as BinarySearchTreean i implemented a method called BinarySearchTree>>PreOrder and BinarySearchTree>>index
Preorder: myArray index: position
(myArray at: positio...
Krawczyk asked 7/10, 2017 at 11:31
2
Solved
I want to match [ in a regular expression in Pharo 6.
This works fine:
| matcher |
matcher := RxMatcher forString: '\['.
matcher matches: '['. "produces true"
However, I can't see how to do thi...
4
I installed Pharo 1.4 and tried to read "Pharo by example".
Unfortunately, the book and the Pharo image were totally out of synch with each other: menus were different; classes used as exam...
1
Solved
I'm trying to make an array with random numbers (just 0 or 1), but when I run it, it just prints this: End of statement list encountered ->
This is my code:
GenList
| lista |
lista := Array new...
1
Solved
Is there an equivalent in Pharo for ThreadLocals of Java, or a way to achieve similar behavior? For example, in Hibernate ThreadLocals are used to provide a thread (current request/context) "scoped...
Contrabass asked 27/2, 2017 at 15:17
4
Solved
I like programming in the Python language to solve daily problems in system administration contexts, and I am happy with that.
I am learning Pharo Smalltalk and am fascinated by the differen...
Erroneous asked 20/4, 2011 at 14:29
2
Solved
Writing a bit of documentation for beginners and I've come against a problem. Knowing what binary messages do, doesn't mean you know what they're called!
Some obvious ones, and their respect...
3
What is the difference between = and == in Pharo Smalltalk? What are they named, one isEqual and the other?
= ~= equality / inequality (deep)
== ~~ equality / inequality (shallow)
3
Solved
After search in the nautilus shortcut description:
I searched in the forums to find something about this, but doesn't work in Pharo v3.
I still looking for a shortcut that I can use to easily ...
2
Solved
How do I copy a stacktrace out of the debugger in Pharo?
I know there's the Debug.log file somewhere near the image, but I'm far too lazy to navigate out of Pharo, to the file system, find the fol...
1
I just installed Pharo5.0 and attempting to go through
"Pharo by Example".
When I get to the BouncingAtomsMorph I apply the "Gofer it"
fetch provided by MartinW at Error Unknown variable:BouncingA...
2
Solved
I have about 1800 lines of GNU Smalltalk code I'd like to pull into Pharo. I've started doing it class by class, selector by selector, but it is very time consuming and tedious.
Is there a way to ...
Chaos asked 7/6, 2016 at 23:21
2
Solved
From what I can gather from the Pharo documentation on regex, I can define a regular expression object such as:
re := '(foo|re)bar' asRegex
And I can replace the matched regex with a string via ...
2
Solved
I want to implement a small class in Pharo so I have done this:
Object subclass: #Person
instanceVariableNames: 'name age'
classVariableNames: ''
category: 'Test'
and I want to simulate a con...
2
Solved
How can I elegantly get a specific number (>1) of distinct, random elements from a collection?
Chicky asked 26/2, 2016 at 10:49
1
Solved
C++ has System.exit(0), VB has End, C# has Application.Exit
How would you exit a program in Smalltalk? I'm using Pharo. Note: I'm not looking to exit Pharo itself, but to just terminate my program...
2
Solved
I want to uninstall the Glamorous Toolkit (to me seems to be overloaded versions of classic Smalltalk tools) in Pharo 4 or 5.
Here is my code:
| config configName |
configName := #ConfigurationOf...
1
Solved
I'm new using Pharo and I'm trying to iterate over an OrderedCollection, but starting from the end.
For example:
| c |
c := OrderedCollection new.
c add: (1).
c add: (2).
c add: (3).
c do: [ :eac...
7
I really like live smalltalk environment (though I only experimented a bit with Pharo), but there is one thing why I can't really use it for everyday development. It seems that it is not possible t...
2
Solved
In Smalltalk, there are two terms often found within a method body: self and yourself.
What is the difference between them?
Frazil asked 22/11, 2015 at 0:9
© 2022 - 2024 — McMap. All rights reserved.