in reply to Win32::GUI COM Port app

Is the problem because you cannot produce the list, or because you're failing to populate the RichEdit control?


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.
"Too many [] have been sedated by an oppressive environment of political correctness and risk aversion."

Replies are listed 'Best First'.
Re^2: Win32::GUI COM Port app
by deadpickle (Pilgrim) on Aug 06, 2008 at 01:29 UTC
    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.

      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.