Indigo Rose Software

Professional Software Development Tools

 
Results 1 to 8 of 8
  1. #1
    Join Date
    Apr 2004
    Location
    Taiwan
    Posts
    83

    Oops About Popup Menu issue?

    Hi all:
    I have some codes as below:
    -- Show a popup menu at the coordinates of a lable object called "Label1"
    tblPos = Label.GetPos("Label1");
    tblSize =Label.GetSize("Label1");

    x = tblPos.X;
    y = tblPos.Y + tblSize.Height;

    tblMenu =
    {
    {text="Apple",type=0,checked=false,enabled=true},
    {text="Orange",type=0,checked=false,enabled=true},
    {text="Pear",type=0,checked=false,enabled=true},
    {text="Banana",type=0,checked=false,enabled=true},
    {text="SEP",type=1,checked=false,enabled=true},
    {text="Mango",type=0,checked=true,enabled=true},
    {text="Pineapple (Not Available)",type=0,
    checked=false,enabled=false}
    };

    strSelected = PopupMenu.Show(tblMenu,x,y,
    PopupMenu.HALIGN_LEFT,PopupMenu.VALIGN_TOP);

    if (strSelected ~= "CANCELLED") then
    Dialog.Message("Selected Fruit",strSelected);
    end

    I had installed the Popup Menu plugin.

    When I review these codes, it will show "attempt to index global 'tbPos' (a nil value).

    How can I modify upon codes that it reaches my purpose? Who can help me solve the issue ASAP? Thank you for advance.
    Pierre

  2. #2
    Join Date
    Jan 2000
    Posts
    2,002
    Do you have a label object on your page called Label1? If not, that is why the table is empty...

  3. #3
    Join Date
    Aug 2003
    Location
    Maine, USA
    Posts
    1,695
    Hi Pierre,

    Do you have a Label Object named "Label1" on your page? If not, establish this object, then try your code again. Be sure to put this Label Object where you want the popup menu to appear.

    Brett, you beat me to the punch again.

  4. #4
    Join Date
    Jul 2002
    Location
    USA
    Posts
    3,959
    Quote Originally Posted by pierre
    "attempt to index global 'tbPos' (a nil value).
    Is this typo part of your post or is it in your code? Your reference tbPos above, but in the code you posted you use tblPos

  5. #5
    Join Date
    Aug 2003
    Location
    Maine, USA
    Posts
    1,695
    I'm guessing typo, cause that code is verbatim in the popup menu sample.

  6. #6
    Join Date
    Jul 2002
    Location
    USA
    Posts
    3,959
    Quote Originally Posted by rhosk
    I'm guessing typo, cause that code is verbatim in the popup menu sample.
    I've got to get me that there plugin so's I kin keep up!

  7. #7
    Join Date
    Aug 2003
    Location
    Maine, USA
    Posts
    1,695
    Oh, I like that plugin lots, but it could stand more customization features (hint, hint). Depending on what you want to apply it to though, it works perfectly.

    Still waiting for that right-click option though. Can't wait for the "Free" upgrade

  8. #8
    Join Date
    Apr 2004
    Location
    Taiwan
    Posts
    83
    Thank everyone. In fact, I lost a label, after adding a label object,its function is normal. Thank you again.
    Pierre

Similar Threads

  1. How to disable popup menu for FLASH OBJECT ?
    By dmla in forum AutoPlay Media Studio 5.0
    Replies: 2
    Last Post: 04-07-2004, 02:17 AM
  2. popup menu
    By rhosk in forum AutoPlay Media Studio 5.0
    Replies: 7
    Last Post: 03-23-2004, 03:23 PM
  3. is it possible to add/ramove things to a popup menu dynamiclly
    By cgirolet in forum AutoPlay Media Studio 5.0
    Replies: 2
    Last Post: 01-09-2004, 01:33 PM
  4. i can't add things to a popup menu HELP
    By cgirolet in forum AutoPlay Media Studio 5.0
    Replies: 0
    Last Post: 01-09-2004, 06:03 AM
  5. TUTORIAL: Showing and Hiding Objects in AutoPlay Menu Studio 3.0
    By Support in forum AutoPlay Menu Studio 3.0
    Replies: 0
    Last Post: 10-10-2002, 02:39 PM

Posting Permissions

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