smalltalk Questions
3
Solved
Usually with my output I am writing it to the Transcript with...
Transcript show:
How does one write the output to a file instead?
2
Given the core model of objects that are independent computing engines (storage being instance vars, CPU being the class methods) responding to messages passed from one to the other, it would seem ...
Pappas asked 11/3, 2016 at 12:41
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...
6
Solved
In Smalltalk there is the method ifNotNilDo:
It is used like this:
database getUser ifNotNilDo: [:user | Mail sendTo: user ]
On objects that are not nil the block is executed, passing the object...
Metzgar asked 26/10, 2014 at 20: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...
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...
1
Solved
I'm quite new to Smalltalk and I've been searching a whole day how I could write a GUI. I've found loads of information on how to work with Morphs and what Halos are, but I don't seem to be able to...
Rickart asked 22/12, 2015 at 19:58
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...
20
Solved
My questions is simple!
Would you start learning Smalltalk if you had the time? Why? Why not?
Do you already know Smalltalk? Why would you recommend Smalltalk? Why not?
Personally I'm a R...
5
Solved
I'm studying Smalltalk right now. It looks very similar to python (actually, the opposite, python is very similar to Smalltalk), so I was wondering, as a python enthusiast, if it's really worth for...
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
9
I want to know in which applications/programming domain are most suitable for Smalltalk. Could anyone please provide me some useful links that could answer my query?
Through googling I learned tha...
Ionization asked 29/11, 2010 at 9:45
2
Solved
I'm new to Smalltalk and I'm impressed with the fact that there are only just 6 keywords in the language (self, super, true, false, nil & thisContext), and how pure it is in having almost every...
Electrostatics asked 12/4, 2011 at 15:50
3
Solved
What does block in Ruby mean? It looks similar with Smalltalk, but you can't send messages to it.
For example, in smalltalk:
[:x | x + 3] value: 3
returns 6. But in ruby:
{|x| x + 3}.call 3
...
3
Solved
If the Single Responsibility Principle applies to OOP and smalltalk (&ruby as well) is considered as one of the most OO languages why can Object class respond to so many messages?
Just a few f...
4
Solved
I new to OOP, but with a "procedural" background.
I'm currently trying to get my head around OOP via GNU Smalltalk and Lovejoy's "Smalltalk: Getting The Message".
I'm confused as to the the heck ...
Obstinate asked 25/1, 2010 at 4:14
4
Solved
I recently watched Nothing is Something by Sandi Metz, and in her talk she uses the idea of sending messages to objects and goes over how that's done in Ruby. The 4:10-7:30 section would be a good ...
2
Solved
| dict |
dict := #{'foo'->'brown'. 'bar'->'yellow'.
'qix'->'white'. 'baz'->'red'. 'flub'->'green'} asDictionary.
dict at: 'qix'
If I PrintIt, I get 'white'. If I remove 'asDiction...
Ardeliaardelis asked 5/6, 2015 at 13:46
2
Solved
Some style-guides and idioms suggest that you should not mutate literal arrays, like in this case:
MyClass>>incrementedNumbers
| numbers |
numbers := #( 1 2 3 4 5 6 7 8 ).
1 to: numbers ...
2
Solved
I'm looking at this form an Objective-C background so be gentle. The experiment looks like this:
Object1 has an instance variable named delegate.
Object1 receives a message and the proceeds to ch...
3
Solved
I have downloaded the pharobyexample.org ebook, but it seems out of sync with the latest release of pharo, also I would like to know about resources which can help me learn smalltalk.
2
Solved
Searching for the call of a FileDialog
I would like to ask the user for a file name in Pharo 4.0
Through the spotter I found class
FileDialogWindow
with a method
answerFileName
Looking for the ...
1
Solved
This question is related to How do I ask the user for a file name?
The issue of 'Standard dialogs'.
How do I call a Yes / No / Cancel dialog and how to I call an alert in Pharo 4.0?
1
Solved
TabularResources testExcelSheet
from this project gives me a binary representation in a literal array of an Excel file.
````
testExcelSheet
^ #[80 75 3 4 20 0 6 0 8 0 0 0 33 0 199 122 151 144...
© 2022 - 2024 — McMap. All rights reserved.