SPONSORS:






User Tag List

Results 1 to 6 of 6
  1. #1
    Senior Member
    Join Date
    Apr 2001
    Location
    San Diego,CA,USA
    Posts
    108
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Returning the name of Caller

    Is there any way of knowing who called the function?

    for example if there is a function fNC() and function aCaller() calls it then is there any way to trap the name 'aCaller' in function fNC?

    ------------------


    [This message has been edited by AUTOMATION_GURU (edited 02-25-2003).]

  2. #2
    Junior Member
    Join Date
    Nov 2002
    Location
    Redwood City, CA, USA
    Posts
    5
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Returning the name of Caller

    Looks like ExceptCalls() may be you want. If you look in the help browser for that function is shows how you can raise an exception, call that function, and get a call stack that you can process.

    Hope that helps!

    ------------------
    -Ben
    -Ben

  3. #3
    Senior Member
    Join Date
    Apr 2001
    Location
    San Diego,CA,USA
    Posts
    108
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Returning the name of Caller

    why would you want to raise an exception just to find out the name of the caller?

    ------------------

  4. #4
    Junior Member
    Join Date
    Nov 2002
    Location
    Redwood City, CA, USA
    Posts
    5
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Returning the name of Caller

    Because that's the interface I remembered off the top of my head? I interpreted your question as one of possibility, not one of desireability.

    If you know of a more efficient way to do it, please let me know.

    ------------------
    -Ben
    -Ben

  5. #5
    Senior Member
    Join Date
    Jun 2000
    Location
    Hartford, CT, USA
    Posts
    163
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Returning the name of Caller

    Hmm... this one is a sharp scenario... if I can trap a call to my function, I can do http calls testing over the web too...


    ------------------
    Jaimini Bhatt
    jaiminita@hotmail.com
    jaiminita@yahoo.com
    Jaimini Bhatt

  6. #6
    Senior Member
    Join Date
    Apr 2001
    Location
    San Diego,CA,USA
    Posts
    108
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Returning the name of Caller

    hbscharp you are probably right there is no other way of getting the caller.

    here is a dirty hack then:
    ------------------

 

 

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

vBulletin Optimisation provided by vB Optimise v2.6.0 Beta 4 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
User Alert System provided by Advanced User Tagging v3.0.9 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Questions / Answers Form provided by vBAnswers (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
vBNominatevBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Feedback Buttons provided by Advanced Post Thanks / Like (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Username Changing provided by Username Change (Free) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
BetaSoft Inc.
Digital Point modules: Sphinx-based search
All times are GMT -8. The time now is 03:50 PM.

Copyright BetaSoft Inc.