in reply to Re: Win32::GUI COM Port app
in thread Win32::GUI COM Port app

The ports are returned correctly but when the tray is right clicked the widget is suppose to be populated by a list of the COM ports, but there is nothing.

Replies are listed 'Best First'.
Re^3: Win32::GUI COM Port app
by BrowserUk (Patriarch) on Aug 06, 2008 at 02:01 UTC

    The array you populate in serial_finder() is private to that sub:

    sub serial_finder { my @list;

    The array you attempt to populate the edit field from is declared at the top of the program:

    my $comport = 1; my @list; ... sub com_list_create { print "running\n"; foreach my $comlist (@list) { ...

    Two different lists! The first is thrown away when you exit the sub because you never return it anywhere. You could just drop the my on the first one and they would then both use the same list and things would probably work.


    Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
    "Science is about questioning the status quo. Questioning authority".
    In the absence of evidence, opinion is indistinguishable from prejudice.