Alpha DevCon 2018
Results 1 to 9 of 9

Thread: Display argument help when using a UDF

  1. #1
    "Certified" Alphaholic
    Real Name
    Ronald Anusiewicz
    Join Date
    Oct 2000
    Location
    Southampton, MA
    Posts
    1,515

    Default Display argument help when using a UDF

    When one creates their own function, how do you display the help below each argument like the built in functions.
    I know it can be done as I did it a long time ago but I can't remember the code needed.

    Thanks
    Alpha Anywhere v3.5
    Version 12.3, Build 2999
    MySql56 & DBF's

    Alpha 4, 5, Anywhere

    Ron Anusiewicz

  2. #2
    "Certified" Alphaholic Stan Mathews's Avatar
    Real Name
    Stan Mathews
    Join Date
    Apr 2000
    Location
    Bowling Green, KY
    Posts
    25,108

    Default Re: Display argument help when using a UDF

    You have to use the same parameter name Alpha would use in a similar function. If you want the argument to have help/allow select for a file name you should use filename as the parameter.

    in design.pngin action.png
    There can be only one.

  3. #3
    Member
    Real Name
    Allen Klimeck
    Join Date
    Apr 2000
    Location
    Colorado
    Posts
    529

    Default Re: Display argument help when using a UDF


  4. #4
    "Certified" Alphaholic Stan Mathews's Avatar
    Real Name
    Stan Mathews
    Join Date
    Apr 2000
    Location
    Bowling Green, KY
    Posts
    25,108

    Default Re: Display argument help when using a UDF

    Also here.

    https://www.alphasoftware.com/alphaf...ameters+lookup

    Another avenue is to edit the AllFunctions.txt in the FunctionHelp directory under the Alpha program directory and add an entry for the udf. The parameters will appear as you create in the entry. Alpha doesn't read that file until you close and reopen. The entries thus created are available to auto-complete for every instance of Alpha whether or not the udf exists or not.
    Last edited by Stan Mathews; 03-13-2018 at 01:47 PM.
    There can be only one.

  5. #5
    "Certified" Alphaholic
    Real Name
    Ronald Anusiewicz
    Join Date
    Oct 2000
    Location
    Southampton, MA
    Posts
    1,515

    Default Re: Display argument help when using a UDF

    Thanks for the responses.
    I'm having a little trouble wrapping my head around what I have read.
    Specifically, I want to add a simple help statement as to what to enter for each argument.

    I think what Allen has done is what I'm looking for.
    Allen, I can't seem to get your functions through drop box. Would it be possible for you to attach the text file to a post?
    Alpha Anywhere v3.5
    Version 12.3, Build 2999
    MySql56 & DBF's

    Alpha 4, 5, Anywhere

    Ron Anusiewicz

  6. #6
    Member
    Real Name
    Allen Klimeck
    Join Date
    Apr 2000
    Location
    Colorado
    Posts
    529

    Default Re: Display argument help when using a UDF

    Well drop box worked fer me I wasn't logged in but here is the file.
    Attached Files Attached Files

  7. #7
    "Certified" Alphaholic
    Real Name
    Ronald Anusiewicz
    Join Date
    Oct 2000
    Location
    Southampton, MA
    Posts
    1,515

    Default Re: Display argument help when using a UDF

    Thank you Allen.

    Mozilla wouldn't let me get the file from dropbox. Kept getting a message "Your Connection is not secure"

    Anyways, After 2 minutes looking at your functions, I found what I was really looking for.

    Code:
    FUNCTION alt_param_test AS C (bxdesign as n=0,fsize as c="8",color as c="red",font as c="arial,9")
    	'DESCRIPTION:A UDF to show bubble / popup help
    I was looking for the line 'DESCRIPTION: then my instructions

    Thanks again
    Alpha Anywhere v3.5
    Version 12.3, Build 2999
    MySql56 & DBF's

    Alpha 4, 5, Anywhere

    Ron Anusiewicz

  8. #8
    "Certified" Alphaholic MoGrace's Avatar
    Real Name
    Robin
    Join Date
    Mar 2006
    Location
    Los Angeles
    Posts
    3,455

    Default Re: Display argument help when using a UDF

    My understanding when you add the 'DESCRIPTION: section is that it should be all caps and left aligned not indented. But if that works for Allen it must be ok.
    Robin

    Discernment is not needed in things that differ, but in those things that appear to be the same. - Miles Sanford

  9. #9
    "Certified" Alphaholic
    Real Name
    Mike Christensen
    Join Date
    Nov 2005
    Location
    Michigan U.P.
    Posts
    5,918

    Default Re: Display argument help when using a UDF

    Just some additional info.
    'description: will work as well...completely case insensitive. Just has to be the very first "word" on the line after the Function....single quote prior and colon immediately after. Text after does not have to be right after the colon...can have spaces. And does not have to be left aligned...only has to be one "word" ;ie. 'description:
    Mike
    __________________________________________
    It is only when we forget all our learning that we begin to know.
    It's not what you look at that matters, it's what you see.
    Henry David Thoreau
    __________________________________________




Similar Threads

  1. How to display the argument used in report
    By PaulAmmoun in forum Mobile & Browser Applications
    Replies: 1
    Last Post: 06-15-2015, 06:38 AM
  2. UX List Control Argument Reverts to 1st Argument in the Argument List
    By forskare in forum Mobile & Browser Applications
    Replies: 1
    Last Post: 05-24-2015, 04:39 PM
  3. Display Argument Value in UX
    By mikeallenbrown in forum Mobile & Browser Applications
    Replies: 2
    Last Post: 04-09-2015, 12:21 PM
  4. How To Test For Valid SQL::Argument argument
    By gkpurcey in forum Application Server Version 11 - Web/Browser Applications
    Replies: 2
    Last Post: 06-08-2012, 04:22 PM
  5. Dialog with Argument: how can i check no argument passed?
    By WindForce in forum Application Server Version 11 - Web/Browser Applications
    Replies: 2
    Last Post: 03-06-2012, 04:24 AM

Bookmarks

Posting Permissions

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