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?
Clisthenes asked 23/3, 2018 at 13:37

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...
Monmouthshire asked 2/3, 2018 at 0:21

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...
Kinkajou asked 30/12, 2017 at 14:48

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...
Sulfonate asked 22/8, 2017 at 17:49

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...
Libel asked 19/1, 2013 at 7:50

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...
Criminate asked 4/7, 2017 at 18:5

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...

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...
Haematocryal asked 19/1, 2017 at 18:45

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)
Esther asked 16/1, 2017 at 21:5

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 ...
Catadromous asked 26/7, 2013 at 16:5

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...
Pyroxene asked 26/10, 2010 at 10:15

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...
Bloated asked 11/12, 2016 at 0:31

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 ...
Stig asked 24/5, 2016 at 1:40

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...
Gesticulative asked 27/4, 2016 at 1:36

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...
Gorey asked 26/2, 2016 at 6:13

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...
Maegan asked 14/1, 2016 at 4:18

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...
Repeat asked 7/1, 2016 at 21:12

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...
Glairy asked 3/8, 2015 at 18:29

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.