Specifically I need this for the block library. Is there a way to give a block a piece of smalltalk like
|t1| t1_ self readLine: '1' FromURL: 'online smalltalk code.txt'.
and then run the contents of t1 as if the code was actually in the block?
This would allow us to update this one file to automatically update the coding of this block for every single person without them having to edit their existing block in any way.
Offline
Yes there is. I will get the code.
Here is what I use in Claw.
runSmallt: t1
Compiler
evaluate: t1
for: self
logged: false
Offline
Download claw and try it for yourself.
Offline
It does:
Name: run smalltalk $String$
Code:
Compiler
evaluate: t1
for: self
logged: false
Note: Using ' (quotes) does NOT work.
Offline
johnnydean1 wrote:
It does:
Name: run smalltalk $String$
Code:Compiler
evaluate: t1
for: self
logged: falseNote: Using ' (quotes) does NOT work.
so the smalltalk is not allowed any quotes in it? Does that not basically rule out any block that sets variables to strings?
Offline
set the input to: 'self nextCostume'
Offline
You coded the block wrong.
as I said above:
Compiler
evaluate: t1
for: self
logged: false
YOU MISSED OUT COMPILER!
Offline
sparks wrote:
oops.
Sadly this isn't going to work for the Panther download block because it contains speech marks![]()
I don't think there is anyway around that. Ask LS97 he may know. (I believe the block is also in Bingo)
Offline
I gave you a code on the block library post.
Offline
Lemme try.
Offline