Oddly enough, I was ready to shoot back with a dry, semi-sarcastic reply on how i'd already tried such, when I went and decided to try it and it worked. Bah on you! Maybe it really was too early in the morning for my mind to function. I thought it a myth.
Honestly, I still don't understand why that would have been causing it to return a 0 from that one function yet work fine everywhere else. Thanks, though, for the (if even slap-you-in-the-face, because-it's-so-simple) help. I appreciate it greatly.
Kaylus
/ kaylus
Previous text:
2003-08-29 08:37: Subject: Problems with Backtrace
add_constant("this_user", function_object(backtrace()[-2]->fun));
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
That will be relative to where you do add_constant, is that really what you want?
You probably want to do something like,
| User calculate_current_user() | { | // really calculate the user from for instance the backtrace | return ...; | } | | ... | add_constant("this_user",calculate_current_user);
/ Mirar