Reputation: 2236
Amber Smalltalk version 0.13
In this project I'd like to open the class browser with a specific class.
<button onClick="amber.globals.Browser._openOn_(amber.globals.ProcessingClock)">ProcessingClock class
I get the error message amber not defined
(see screen shot below).
Question How do I open the browser properly?
Upvotes: 0
Views: 118
Reputation:
Of course it is not defined, amber
is just a local variable (that is, a parameter) of the loader callback function. Either remember it to some global and reuse in button onclick code (ugly), install onclick handler on the button directly inside loader callback, where you have access to amber
variable (probably clumsy, but the most clean), or use require('amber/helpers')
instead of amber
in direct onclick handlers (in your example you want need to use it twice).
Upvotes: 0