From: "Schwab,Wilhelm K" <bschwab@anest.ufl.edu>Subject: FW: Meeting Aliens (callbacks) in the debugger - was this risky?Date: March 21, 2012 1:57:16 AM GMT+01:00Stef,
I am currently unable to post to the list (Outlook is being a pain) - could you forward this for me? I'm curious if I'm living dangerously or simply basking in Smalltalk's wonderful features.
BillFrom: Schwab,Wilhelm K
Sent: Tuesday, March 20, 2012 8:55 PM
To: pharo-project@lists.gforge.inria.fr
Subject: Meeting Aliens (callbacks) in the debugger - was this risky?To see whether one can expect to set breakpoints in callback blocks, I gave it shot in #exampleCqsort:
cb := Callback
signature: 'int (*)(const void *, const void *)'
block: [ :arg1 :arg2 |
self halt.
((arg1 doubleAt: 1) - (arg2 doubleAt: 1)) sign
].I then ran the example. To my pleasant surprise/amazement, a walkback appeared and the debugger was functional; I was able to evaluate the accessors and get numbers. Is this dangerous in some way, or does it "just work?" It would be hugely helpful if it is safe.
Bill