[Pharo-users] Re: change process variable while process is running

2021-03-02 Thread Richard O'Keefe
Why do the parameters for the sequencer have to be *process* variables? Why can't they be instance variables of an object? SequenceControl (mutex v1 v2 ...) initialize mutex := Mutex new. v1 := default for v1. v2 := default for v2. ... v1 ^v1 v1: x validate x all by i

[Pharo-users] Re: change process variable while process is running

2021-03-02 Thread mspgate
thanks Sven and thanks Richard. I already thought it was not a good idea to change a variable inside the process as for OOP principles. but I dint find any solution to do what I want to do, that is a tool for live coding in which the process variables are values for a sequencer sendin OSC mes

[Pharo-users] Re: change process variable while process is running

2021-03-02 Thread Richard O'Keefe
How do you modify a variable in another process? DON'T. Yes, it is possible. No, it's an amazingly bad idea in any programming language. First, let us see a simple, obvious, and portable way to do what you want. (It has one minor problem which I'll get to.) shared := Array new: 1. shared at: 1 p

[Pharo-users] Re: change process variable while process is running

2021-03-02 Thread Sven Van Caekenberghe
Hi, You might learn something from the class/hierarchy ProcessSpecificVariable, esp. the methods in the category 'process specific' in the Process class, e.g. #psValueAt:[put:] Sven > On 2 Mar 2021, at 10:42, mspg...@gmail.com wrote: > > Hello everybody, I am kind of new to Pharo so I apologi

[Pharo-users] change process variable while process is running

2021-03-02 Thread mspgate
Hello everybody, I am kind of new to Pharo so I apologise if my\ question is silly :)\ how can a change a variable in a process while the process is running?\ for example in:\ \[\[ | msg| msg := 'help me'. 100 timesRepeat: \[(Delay forSeconds: 0.5)\ wait. Transcript show: msg; cr\]\] fork.\ \ how d