简体   繁体   English

如何打开具有特定班级的班级浏览器?

[英]How do I open the class browser with a specific class?

Amber Smalltalk version 0.13 琥珀色Smalltalk版本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). 我收到amber not defined的错误消息amber not defined (请参见下面的屏幕截图)。

Question How do I open the browser properly? 问题如何正确打开浏览器?

在此处输入图片说明

Of course it is not defined, amber is just a local variable (that is, a parameter) of the loader callback function. 当然没有定义, amber只是加载程序回调函数的局部变量(即参数)。 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). 请记住它的一些全局信息,然后在按钮onclick代码中重用(很丑陋),或者在加载器回调内部直接在按钮上安装onclick处理程序,您可以在其中访问amber变量(可能笨拙,但最干净),或者使用require('amber/helpers')而不是直接在onclick处理程序中显示为amber (在您的示例中,您需要使用两次)。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何在Clamato中使用类变量? - How do I use class variables in Clamato? 如何查找哪个类在Pharo中实现方法? - How do I lookup which class implements a method in Pharo? 如何将字典映射到特定类的对象? - How to map dictionary to object of specific class? Pharo / Squeak - 如何快速浏览给定类中给定方法的实现? - Pharo/Squeak - How do I quickly browse the implementation of a given method in a given class? 我们如何从另一个类方法中调用一个类方法? - How do we call a class method from another class method? 如何在Pharo中的CompiledMethods集合上打开浏览器 - How can I open a browser on a Collection of CompiledMethods in Pharo 如何在Dolphin类浏览器中修复不正确的单选按钮大小? - How to fix incorrect radio button size in Dolphin class browser? 如何在Dolphin中从系统中删除类时执行特定操作 - How to perform a specific action when a class is removed from system in Dolphin 当我加载包含此类的Monticello包时,是否有一个特定的方法可以在类中执行? - Is there a specific method that would get executed in a class when i load a Monticello package containing this class? 在Smalltalk中,如何在类B的实例上从类A内调用类B中的访问器方法? - In Smalltalk, how do you invoke accessor methods in Class B from within Class A on an instance of class B?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM