假设我有一个类和一个实例方法:
ClassExample#methodExample
^"???"
Run Code Online (Sandbox Code Playgroud)
有没有办法在Smalltalk中获取方法的名称:
var := ClassExample new.
nameOfMyMethod := var methodExample.
"nameOfMyMethod should be 'methodExample' (a string or symbol)"
Run Code Online (Sandbox Code Playgroud)
?
我正在开发VisualAge.感谢帮助!
如何显示显示所有当前海边会话及其预期到期时间的报告?
self session application sessionsDo: [:each |
html text: 'Session For ',((each properties values at: 1) username),' Expires At: '.
html render: (Time now addSeconds: (each application cache expiryPolicy timeout)).
html break].
Run Code Online (Sandbox Code Playgroud)
但是,这显示了错误的结果,因为它显示所有会话同时到期,距现在时间600秒.我找不到另一种方法来"剩余时间".
WWLD?(卢卡斯会做什么)?
KR Dusty