amber-smalltalk

How to add a non-Amber library with bower? (for example processing js)

浪子不回头ぞ 提交于 2019-12-25 01:52:25
问题 I have started a project with amber init and then bower install processing --save to get processing.js added. I do the initialisation with firstProcessingInstance <return Processing.instances[0]> This method is called by the instance method initialize and it worked a pre-Amber v0.13 version. How do I initialize Processing.js in Amber 0.13 and 0.14? The code of the example is here Addition after answer by Herby In version 0.13 and 0.14 a configuration file processing.amd.json has to be added

Keyword messages in smalltalk (Beginner)(Pharo)

五迷三道 提交于 2019-12-11 13:38:36
问题 I am trying to create a keyword message style method, but I can't figure out how to access the Receiver from inside the method. I am sure this is simple, however I can't find the answer anywhere. What I am trying to implement is redundant, but I would still like to know how it works. subst: i1 by: i2 ^ self copyReplaceAll: i1 with: i2. It would be called in the workspace as follows: string1 := 'Lemon'. string2 := 'm'. string3 := 'ss'. string1 subst: string2 by: string3. Error msg:

GNU Smalltalk 80 Debugger. How to debug smallcode code ? Start Debugger?

删除回忆录丶 提交于 2019-12-10 14:32:31
问题 In GNU Smalltalk 80 it is possible to write smalltalk code in your own plain text editor of personal choice. Therefore, it is very important to debug the code. First you save the file as txt File. Then you open the file from the programmers text editor with the "Tools". Here the tool - link C/programme/GNU/gnu smalltalk/gst.exe. The code is running. The debug option is not included. Under these circumstances programming is not possible. There must be a "debug" option to activate. My question

What is the difference between self and yourself in Smalltalk?

爷,独闯天下 提交于 2019-12-04 10:07:48
问题 In Smalltalk, there are two terms often found within a method body: self and yourself . What is the difference between them? 回答1: The reserved word self is a pseudo variable (you cannot assign to it) that refers to the current receiver of the method where it is used. On the other side yourself is a message you can send to any object to get that very same object. The implementation of yourself is yourself ^self meaning that the message yourself will behave as I just explained. The reason why