Results 1 to 3 of 3

Thread: How do you Know if the user want's a return value?

  1. #1

    Thread Starter
    Frenzied Member
    Join Date
    Mar 2000
    Posts
    1,089
    Does anyone know if there's a way for findong out from inside a public function in a usercontrol wheather the user wants a return value or not, ie wheather the user has gone

    lngMyVariable=MyFunction(MyParam1,MyParam2)

    or just

    MyFunction MyParam1,MyParam2.

    This would be seriously helpful.

  2. #2
    Former Admin/Moderator MartinLiss's Avatar
    Join Date
    Sep 1999
    Location
    San Jose, CA
    Posts
    33,431
    You should always return some meaningful value from all functions. That way the user can decide how he calls your function and it won't matter to you. The return value could be something as simple as a True/False boolean indication sucessful completion.

  3. #3

    Thread Starter
    Frenzied Member
    Join Date
    Mar 2000
    Posts
    1,089

    Yeah, I know.

    Sorry I didn't make myself clear, It's for a control to make subclassing a bit safer. I need to lnow if the user has got a return value when they call the default window function, if they don't I need to return this value from my substitute window process by default, If they don't they may well have other plans for my return value so I don't want to change it.

Posting Permissions

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



Click Here to Expand Forum to Full Width