Is this something like what you want or does use of "13!:18"
need debug to be turned on?

  whoCalledMe=: 3 : '{.2}.13!:18 '''''
  caller=: 3 : 'smoutput whoCalledMe '''''
  topCaller=: 3 : 'caller '''''
  topCaller ''
| topCaller''



On 1/21/07, Chris Burke <[EMAIL PROTECTED]> wrote:

Henry Rich wrote:
> Doing user interfaces I often find myself with several buttons that
> point to the same underlying function with different arguments, like:
>
> scoreboard_timer0_button =: timer_start@({&timer_buttontimes)@0:
> scoreboard_timer1_button =: timer_start@({&timer_buttontimes)@1:
> scoreboard_timer2_button =: timer_start@({&timer_buttontimes)@2:
> scoreboard_timer3_button =: timer_start@({&timer_buttontimes)@3:
> scoreboard_timer4_button =: timer_start@({&timer_buttontimes)@4:
> etc...
>
>
> I could save quite a bit of bulk if I could come up with an expression,
> call it
>
> whoami
>
> which would return, as a character string, the name of the explicit
definition
> it is running in.
>
> I emphatically DO NOT want for whoami to require that debug be turned
on.
>
> I have been defeated.  Any winners?

I don't know the answer to the whoami, but you could save bulk with a
scoreboard_default handler, see
http://www.jsoftware.com/help/user/event_handlers.htm . In this case,
the "whoami" comes from the event information.

----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm




--
Devon McCormick
^me^ at acm.
org is my
preferred e-mail
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to