Alpha Video Training
Results 1 to 8 of 8

Thread: ui_get_text()

  1. #1
    Member Citadel's Avatar
    Real Name
    Alan Storey
    Join Date
    Nov 2006
    Location
    Reading, Berkshire
    Posts
    124

    Default ui_get_text()

    Hi all

    Coding in Xbasic, I get two versions of 'syntax' offered by A5 as I start to type 'ui_get_text'?

    Any ideas why?

    (I think they both amount to the same syntax anyway)
    Kind Regards
    Alan

  2. #2
    "Certified" Alphaholic
    Real Name
    Cal Locklin
    Join Date
    Mar 2000
    Location
    S.E. Michigan
    Posts
    5,763

    Default Re: ui_get_text()

    My guess is that they may have changed this to use xdialog back in v6 (it's been showing two versions of the syntax ever since v6) and started to make some improvements before deciding to just leave it completely like the old one. I think the 'improved' version is still "hanging around somewhere" incomplete and the additional auto-complete/syntax text is still being picked up.

    However, I don't really care because I never use ui_get_text() anymore.

    See video to find out why. (Don't forget to turn up your audio.)

    I've replaced many of the "ui_" functions with improved versions of my own using xdialog. I chose to add only a couple new features to this one so, since the result was pretty simple, I'll attach it in a text file here.

    If you want to use it to simply replace existing calls to ui_get_text(), save it originally with its default name of AIMS_get_text() then rename it to ui_get_text().

    EDIT: I forgot - I left off the "format string" option because it's something I never use. (These are the kinds of things I would normally fix as part of getting something ready for general distribution. Which is why it's not offered on my website as part of any of my addons.)

    I should also add that many of my improvements are the result of using, editing, using, editing, using, editing, etc. This is probably something Alpha doesn't have the time and resources to do - besides the fact that they may not use them the same way we do and one person certainly can't be expected to think of all possibilities. For example, they may have never come across a need for such long prompt text as I have.
    Last edited by CALocklin; 11-12-2009 at 02:21 PM.

  3. #3
    "Certified" Alphaholic Keith Hubert's Avatar
    Real Name
    Keith Hubert
    Join Date
    Jul 2000
    Location
    London, UK
    Posts
    6,930

    Default Re: ui_get_text()

    Hi Alan,

    There is only one function. You will only get the dialog with a the prompt.

    "Why". Is one of the mystries of life!!
    Regards
    Keith Hubert
    Alpha Guild Member
    London.
    KHDB Management Systems
    Skype = keith.hubert


    For your day-to-day Needs, you Need an Alpha Database!

  4. #4
    Member Citadel's Avatar
    Real Name
    Alan Storey
    Join Date
    Nov 2006
    Location
    Reading, Berkshire
    Posts
    124

    Default Re: ui_get_text()

    Thank you both for your replies.

    Quote Originally Posted by CALocklin View Post
    If you want to use it to simply replace existing calls to ui_get_text(), save it originally with its default name of AIMS_get_text() then rename it to ui_get_text().
    Cal, thank you for your 'deluxe' version of ui_get_text(). I assume I'm to save this effectively as a UDF. If that is correct, and I use the default name, why would A5 use the UDF rather than it's own 'internal' (default) function?
    Kind Regards
    Alan

  5. #5
    "Certified" Alphaholic
    Real Name
    Cal Locklin
    Join Date
    Mar 2000
    Location
    S.E. Michigan
    Posts
    5,763

    Default Re: ui_get_text()

    Quote Originally Posted by Citadel View Post
    Cal, thank you for your 'deluxe' version of ui_get_text(). I assume I'm to save this effectively as a UDF. If that is correct, and I use the default name, why would A5 use the UDF rather than it's own 'internal' (default) function?
    If I'm reading your question correctly, it won't.

    If you save it as AIMS_Get_text() you will have to call it as AIMS_Get_text(). However, if you want to use it instead of ui_get_text() without having to change existing calls to ui_get_text(), just rename the UDF after saving it initially. Alpha's "rules of precedence" (my own term) means that any function in the Code tab will take precedence over any system function by the same name.

    (You could also modify the code first to change all occurrences of "AIMS_Get_text" to "ui_get_text" but why go through the effort when renaming the function will take care of that for you.)

    FWIW: I find that users tend to pay more attention to things when a different color is used. Of course, some won't read anything but it helps.

  6. #6
    Member Citadel's Avatar
    Real Name
    Alan Storey
    Join Date
    Nov 2006
    Location
    Reading, Berkshire
    Posts
    124

    Default Re: ui_get_text()

    Quote Originally Posted by CALocklin View Post
    Alpha's "rules of precedence" (my own term) means that any function in the Code tab will take precedence over any system function by the same name.
    Thanks Cal

    However badly I worded my question :), this is what I wanted to know, and you put it so succinctly.

    Excellent stuff!! Thank you again.
    Kind Regards
    Alan

  7. #7
    "Certified" Alphaholic
    Real Name
    Jeff Kletrovets
    Join Date
    Oct 2005
    Location
    Columbus, OH
    Posts
    1,135

    Default Re: ui_get_text()

    Hey Cal,

    Thanks for your generosity in providing this...very nice/handy indeed.


    Jeff

  8. #8
    Member
    Real Name
    John Kukuda
    Join Date
    Dec 2004
    Location
    Tampa, FL
    Posts
    487

    Default Re: ui_get_text()

    Excellant Tips, Thank You

Similar Threads

  1. ui_get_text vs xdialog
    By Cheryl Lemire in forum Alpha Five Version 7
    Replies: 6
    Last Post: 05-21-2006, 09:16 PM
  2. ui_get_text Not Working?
    By ChrisHawkes in forum Alpha Five Version 7
    Replies: 14
    Last Post: 11-01-2005, 05:21 AM
  3. toolbox and ui_get_text()
    By CALocklin in forum Alpha Five Version 6
    Replies: 6
    Last Post: 10-05-2004, 03:50 PM
  4. sys_open used with ui_get_text
    By Jean-P. B├ędard in forum Alpha Five Version 4
    Replies: 10
    Last Post: 01-30-2002, 09:58 AM
  5. ui_get_text in a report?
    By Sandy Garrett in forum Alpha Five Version 4
    Replies: 8
    Last Post: 05-12-2000, 09:05 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
  •