z--
z--

Reputation: 2236

How do I open the class browser with a specific class?

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?

enter image description here

Upvotes: 0

Views: 118

Answers (1)

user1046334
user1046334

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

Related Questions