Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #10060
    LTT
    Participant

    [VBScript]

    popupmenu.Add strText, id, flags

    id can be a negative integer.

    But in:

    strText = popupmenu.GetText( id )

    “Unspecified error” occured if id = -1.

    Is this normal?

    #10061
    Stefan
    Participant

    Hi LTT,

    why can you get negative numbers?

    I think you self add this numbers to your menu
    and take care to use positive nbr only?

    Here is my PopUp menu example (click)

    And in your code you can check for negative nbr and just “break;”

    OTOH:
    MyMenu.Add(“Execute Function &one”,-1);
    gives me no error on EmEditor 11.0.3, portable, XP SP3
    It just do nothing, or, if the case-label exists, it works with “-1” too.

    EDIT:
    Ah, now i see…

    alert( MyMenu.GetText( -1 ) );
    did not work for me too. Unknown error.

    alert( MyMenu.GetText( 2 ) );
    works.

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.