Indigo Rose Software

Professional Software Development Tools

 
Results 1 to 7 of 7
  1. #1
    Join Date
    Jul 2002
    Posts
    32

    Possible ListBox bug?

    I have tried to get this data in many ways, but it never shows

    Input.SetText("Input1", ListBox.GetItemData("ListBox1", ListBox.GetSelected("ListBox1")));

    It's always blank. Even tried dialog box.

    Am I doing something wrong?

  2. #2
    Corey is offline Indigo Rose Staff Alumni
    Join Date
    Aug 2002
    Posts
    9,746
    Hi. It's not a bug, please do me a favor and refrain from using the word "bug" in your posts until you've had a chance to familiarize yourself with AMS, thanks, it helps us keep the posts straight, etc...

    OK so as to your question. Yes, you are attempting to add functions in a non-parsable manner. I have created a sample project for you which extracts the item text from a listbox and displays it in a dialog. Very easy, one action. The action is on the page's OnShow event, you can download the file here I've attached it to this post. It's self explanatory.

    Please feel free to post any follow up questions you may have once you have had a chance to download and view the attached source file and I'll be happy to assist further. Also, please consider taking an hour and reading through the included getting started guide, believe me, it'll shave hours off your design time and you'll have more fun with the product. Normally I don't believe in the docs which come with software but our docs are the best around, Lorne did a great job on them, and I stand by them 100%. I guarantee you will not regret it if you read through them.

    Corey Milner
    Creative Director, Indigo Rose Software

  3. #3
    Corey is offline Indigo Rose Staff Alumni
    Join Date
    Aug 2002
    Posts
    9,746

    ATTACHED PROJECT FILE

    ATTACHED PROJECT FILE

    Corey Milner
    Creative Director, Indigo Rose Software
    Attached Files

  4. #4
    Corey is offline Indigo Rose Staff Alumni
    Join Date
    Aug 2002
    Posts
    9,746
    BTW here's a second sample project which concatenates (joins) together the item text and item data and displays that. This is what it seems like you were trying to do. As you can see it's simply a matter of concatenating the functions with the .. operator rather than nesting them. Easier on the eyes this way too.

    Corey Milner
    Creative Director, Indigo Rose Software
    Attached Files

  5. #5
    Join Date
    Jul 2002
    Posts
    32
    THanks, but that's not what I am really trying to do.
    I need to get the itemdata of the selected item. Since you don't know the selected item index, u need to get it dynamically.

    I even tried this

    s=ListBox.GetSelected("ListBox1");
    ss=ListBox.GetItemData("ListBox1", s);
    Dialog.Message("Info",ss);

  6. #6
    Join Date
    Nov 2003
    Location
    Salzburg / Austria
    Posts
    312
    Hi,

    the action ListBox.GetSelected returns a table.
    You have to select the first item for single selection.

    PHP Code:
    s=ListBox.GetSelected("ListBox1"); 
    ss=ListBox.GetItemData("ListBox1"s[1]); 
    Dialog.Message("Info",ss); 


    Stefan

  7. #7
    Join Date
    Jul 2002
    Posts
    32
    ahhhh...yes!

    THank you very much!

Posting Permissions

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