referencing Function Name

Got a LiveCode personal license? Are you a beginner, hobbyist or educator that's new to LiveCode? This forum is the place to go for help getting started. Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller

Post Reply
townsend
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 430
Joined: Sun Feb 13, 2011 8:43 pm

referencing Function Name

Post by townsend » Wed Nov 02, 2011 6:51 pm

I'm writing a error routine, and each time I call this handler, I have to pass a hard coded literal string with the name of the function, where the error occurred. For instance:

Code: Select all

error.msg("my.handler.name", result.msg)
Is there some way to reference the name of a function from within the function itself?
I couldn't find anything in the Dictionary.

mwieder
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 3581
Joined: Mon Jan 22, 2007 7:36 am
Contact:

Re: referencing Function Name

Post by mwieder » Wed Nov 02, 2011 7:22 pm

put param(0)

townsend
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 430
Joined: Sun Feb 13, 2011 8:43 pm

Re: referencing Function Name

Post by townsend » Wed Nov 02, 2011 7:28 pm

Thanks again, Mark!

mwieder
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 3581
Joined: Mon Jan 22, 2007 7:36 am
Contact:

Re: referencing Function Name

Post by mwieder » Wed Nov 02, 2011 7:38 pm

np - it's actually in the documentation, but you have to know to look under param in order to find that out. So if you already know where it is you can find it, otherwise you're out of luck.

Post Reply