Results 1 to 3 of 3

Thread: From 1 to 9

  1. #1
    Join Date
    Aug 2004
    Posts
    5

    Unanswered: From 1 to 9

    Hello out there,
    I need some help. I have made an application for my company using Paradox for Windows v1. It works more or less good on Windows Xp, however, I want to use Paradox 9 due to WYSIWYG problems. The major part of the application is executable in Paradox 9, except one thing (at leats at this time being). In some of the forms I use pop-up menus that get data from tables, using arrays. When I try to open a form that use such pop-up menu I get an error message reading "The number of menu items has exceeded the limit set". That is the var I use:
    Var
    ClientPU PopUpMenu
    fldVal anyType
    tc TCursor
    ClientArray Array[] String
    endVar
    and the method itself:
    method addClientPopUp()
    ClientPU.empty()
    ClientArray.empty()
    tc.open(":accounts:clients.db")
    scan tc:
    tc.fieldValue("clientname", fldVal)
    ClientArray.addLast(fldVal)
    endScan
    ClientPU.addStaticText("Frequent Clients")
    ClientPU.addSeparator()
    ClientPU.addArray(ClientArray)
    tc.close()
    endmethod
    This works in Pdox1, but I can't figure out how should I solve this in Pdox9. Can you help me please? and sorry if it was too long.
    Thanks,
    guesswho@axelero.hu

  2. #2
    Join Date
    Aug 2003
    Location
    Bologna - Italy
    Posts
    209
    The error is just what it tells: there's a limit on the number of items you can put in a popup menu, and you're trespassing it: try putting a counter in the scan loop and stop the scan after 10 records, and i'm sure it will function well.

    Since the function PopUpMenu.count() which returns the number of lihes in a menu returns its result as a smallint, you're surely limited to 32767 elements on a menu, counting also separators and static texts.

    If that's not the problem, have you tried verifying that client names do not contain strange chars which aren't permitted on menus?

    Tell us more!
    The only failure is not trying to do it.

  3. #3
    Join Date
    Aug 2004
    Posts
    5

    Solved! (or not?)

    Hi,
    Thanks for your hint. As a matter of fact after posting my message I tried to workaround my problem in a simple way. I emptied the source table and started adding records to it. It came to light that no more than 30 records can be added to my pop-menu. I was a little bit disappointed to learn that because pop-up menu items are sensitive for their first letter, but it's OK.
    I will use lookup form with formReturn() for those entry fields that get data from >30rec source table. I will miss a little the pop-up menu's "first-letter-sensitiveness" but I will survive this.
    I'm going to continue transforming from 1 to 9 at the weekend, hopefully won't get any other issues. Once more thanks.
    guesswho@axelero.hu

Posting Permissions

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