On Sat, Jan 29, 2005 at 06:45:00PM +0100, Martin Stjernholm, Roxen IS @ Pike developers forum wrote:
can i get the name of this_program() as a string?)
function_name(this_program), but it's not always it gives the name you want to show.
right, i get 0
master()->describe_program(this_program) should do a better job.
here i get the whole filepath which is usable i guess.
another question in that light: since _sprintf() returns the mapping for %O i get:
Cannot cast /local/home/mbaehr/cvs/cvs.sourceforge.net/pleac/pleac/pleac/include/pike/ch05/Mapping to string. Mapping.pike:24: ([ /* 1 element */ 1: 1 ])->cast("string") mapping:8: ...
which is not really readable if the mapping gets larger. it seems to come out of backtrace()[-1]->fun, where i can't seem to assign another value. maybe i need to create a whole new BacktraceFrame
greetings, martin.