From: Asim J. <asi...@ac...> - 2002-10-10 20:04:59
|
Has anyone tried using WxPerl with perl2exe? How well does it work? Asim |
From: Marcus <li...@wo...> - 2002-10-11 01:07:03
|
> Has anyone tried using WxPerl with perl2exe? How well does it > work? It works fine on MSW. Marcus |
From: Jay S. <me...@he...> - 2002-10-11 05:44:26
|
Which version of perl2exe do you need to buy to work with WxPerl? Jay ----- Original Message ----- From: "Marcus" <li...@wo...> To: <wxp...@li...> Sent: Thursday, October 10, 2002 8:06 PM Subject: Re: [wxperl-users] perl2exe > > Has anyone tried using WxPerl with perl2exe? How well does it > > work? > > It works fine on MSW. > > Marcus > > > > > > ------------------------------------------------------- > This sf.net email is sponsored by:ThinkGeek > Welcome to geek heaven. > http://thinkgeek.com/sf > _______________________________________________ > wxperl-users mailing list > wxp...@li... > https://lists.sourceforge.net/lists/listinfo/wxperl-users > > > |
From: Marcus <li...@wo...> - 2002-10-12 02:50:14
|
> Which version of perl2exe do you need to buy to work with > WxPerl? You only need the light version for MSW ($50?). Downside is that your program will be non-GUI, i.e. a DOS box opens. You can minimize or hide the window with a little code from Win32::GUI though. You do that inside BEGIN {}. The Pro version makes a real GUI version, and has a few other functions. Marcus |
From: boo r. <boo...@at...> - 2002-10-12 19:24:57
|
is there anyway to pass something besides a return code from a dialog? looking in the documentation, it seems that GetReturnCode is the only way to communicate. |
From: boo r. <boo...@at...> - 2002-10-13 08:58:56
|
while I'm being dense, If I read the documentation for wxListCtrl::SortItems correctly, I can only sort on the data for the list items? So how would I make a listview that's sorted on the 3rd column's data, besides using SetItemData to make sure the data's equal to the 3rd column? |
From: Nick J. <sk...@er...> - 2002-10-13 10:50:32
|
boo...@at... wrote: > while I'm being dense, If I read the documentation for > wxListCtrl::SortItems correctly, I can only sort on the data for the > list items? So how would I make a listview that's sorted on the 3rd > column's data, besides using SetItemData to make sure the data's equal > to the 3rd column? Boo Radley, I think you are correct: you can only sort on an item's data. I think the only way of sorting is as you describe. <rant> Overall, Wx::ListCtrl is a very unpleasant and difficult to use control. For instance: - Completely bizarre handling of selections. I would think it would make sense to have a method called GetSelection() or GetSelections() that returns the index of a selected element. Apparently not. You need to set up an event and store the index of the selected item in a global variable. Lovely (!). Even more bizarre is handling of *multiple* selections. If a user selects N items, the event handler for selection is called N items. So you need to store the indices of selected items as keys in hash. Then you need to set up a event handler for items be unselected and delete the index out of the hash. - No documentation for Perl implementation of wxListItem, so I don't know how to iterate over the list control and use wxListItems to find out if any item is selected. - When items are inserted into the list, the item inserted first appears at the bottom of the list. This seems to contradict logic IMHO. - There is no SetPlData() function (as there is for the tree control), the only data that can be associated with an item is a long int. That means if you want to associate any Perl data you need to set up an array and store the index as an item's data. What makes this even more bizarre is that Wx::ListBox does actually provide a GetSelections() method and in general seems more sane. But it doesn't have a report view (which you wouldn't expect from a list *box*, so that's OK)..... </rant> Overall I like wxPerl and I recognise that most of the problems are caused by wxWindows, not the Perl interface... but I do not understand why Wx::ListCtrl is so awkward to use, and why it does not have a SetPlData() method. - Nick |
From: boo r. <boo...@at...> - 2002-10-13 19:55:53
|
Nick Johnston wrote: > boo...@at... wrote: > >> while I'm being dense, If I read the documentation for >> wxListCtrl::SortItems correctly, I can only sort on the data for the >> list items? So how would I make a listview that's sorted on the 3rd >> column's data, besides using SetItemData to make sure the data's equal >> to the 3rd column? > > > > Boo Radley, I think you are correct: you can only sort on an item's > data. I think the only way of sorting is as you describe. > > <rant> > Overall, Wx::ListCtrl is a very unpleasant and difficult to use control. > For instance: > - Completely bizarre handling of selections. I would think it would make > sense to have a method called GetSelection() or GetSelections() that > returns the index of a selected element. Apparently not. You need to set > up an event and store the index of the selected item in a global > variable. Lovely (!). Even more bizarre is handling of *multiple* > selections. If a user selects N items, the event handler for selection > is called N items. So you need to store the indices of selected items as > keys in hash. Then you need to set up a event handler for items be > unselected and delete the index out of the hash. > - No documentation for Perl implementation of wxListItem, so I don't > know how to iterate over the list control and use wxListItems to find > out if any item is selected. > - When items are inserted into the list, the item inserted first appears > at the bottom of the list. This seems to contradict logic IMHO. > - There is no SetPlData() function (as there is for the tree control), > the only data that can be associated with an item is a long int. That > means if you want to associate any Perl data you need to set up an array > and store the index as an item's data. > > What makes this even more bizarre is that Wx::ListBox does actually > provide a GetSelections() method and in general seems more sane. But it > doesn't have a report view (which you wouldn't expect from a list *box*, > so that's OK)..... > </rant> > > Overall I like wxPerl and I recognise that most of the problems are > caused by wxWindows, not the Perl interface... but I do not understand > why Wx::ListCtrl is so awkward to use, and why it does not have a > SetPlData() method. > > - Nick > > > > |
From: DH <cra...@ya...> - 2002-10-13 15:07:22
|
:D. I'm afraid that is not TRUE ANYMORE. Whilst working on PerlBin (an open source replacement for perl2exe) I've come accross exetype.pl Which will change the startup-mode of your program from 4 available modes (CONSOLE and WINDOW being 2 of them) Here it is ;)(Enjoy) #!perl -w use strict; # All the IMAGE_* structures are defined in the WINNT.H file # of the Microsoft Platform SDK. my %subsys = (NATIVE => 1, WINDOWS => 2, CONSOLE => 3, POSIX => 7, WINDOWSCE => 9); unless (0 < @ARGV && @ARGV < 3) { printf "Usage: $0 exefile [%s]\n", join '|', sort keys %subsys; exit; } $ARGV[1] = uc $ARGV[1] if $ARGV[1]; unless (@ARGV == 1 || defined $subsys{$ARGV[1]}) { (my $subsys = join(', ', sort keys %subsys)) =~ s/, (\w+)$/ or $1/; print "Invalid subsystem $ARGV[1], please use $subsys\n"; exit; } my ($record,$magic,$signature,$offset,$size); open EXE, "+< $ARGV[0]" or die "Cannot open $ARGV[0]: $!\n"; binmode EXE; # read IMAGE_DOS_HEADER structure read EXE, $record, 64; ($magic,$offset) = unpack "Sx58L", $record; die "$ARGV[0] is not an MSDOS executable file.\n" unless $magic == 0x5a4d; # "MZ" # read signature, IMAGE_FILE_HEADER and first WORD of IMAGE_OPTIONAL_HEADER seek EXE, $offset, 0; read EXE, $record, 4+20+2; ($signature,$size,$magic) = unpack "Lx16Sx2S", $record; die "PE header not found" unless $signature == 0x4550; # "PE\0\0" die "Optional header is neither in NT32 nor in NT64 format" unless ($size == 224 && $magic == 0x10b) || # IMAGE_NT_OPTIONAL_HDR32_MAGIC ($size == 240 && $magic == 0x20b); # IMAGE_NT_OPTIONAL_HDR64_MAGIC # Offset 68 in the IMAGE_OPTIONAL_HEADER(32|64) is the 16 bit subsystem code seek EXE, $offset+4+20+68, 0; if (@ARGV == 1) { read EXE, $record, 2; my ($subsys) = unpack "S", $record; $subsys = {reverse %subsys}->{$subsys} || "UNKNOWN($subsys)"; print "$ARGV[0] uses the $subsys subsystem.\n"; } else { print EXE pack "S", $subsys{$ARGV[1]}; } close EXE; __END__ =head1 NAME exetype - Change executable subsystem type between "Console" and "Windows" =head1 SYNOPSIS C:\perl\bin> copy perl.exe guiperl.exe C:\perl\bin> exetype guiperl.exe windows =head1 DESCRIPTION This program edits an executable file to indicate which subsystem the operating system must invoke for execution. You can specify any of the following subsystems: =over =item CONSOLE The CONSOLE subsystem handles a Win32 character-mode application that use a console supplied by the operating system. =item WINDOWS The WINDOWS subsystem handles an application that does not require a console and creates its own windows, if required. =item NATIVE The NATIVE subsystem handles a Windows NT device driver. =item WINDOWSCE The WINDOWSCE subsystem handles Windows CE consumer electronics applications. =item POSIX The POSIX subsystem handles a POSIX application in Windows NT. =back =head1 AUTHOR Jan Dubois <ja...@ac...> aka Win32::OLE dude =cut --- Marcus <li...@wo...> wrote: > > Which version of perl2exe do you need to buy to work with > > WxPerl? > > You only need the light version for MSW ($50?). Downside is > that your program will be non-GUI, i.e. a DOS box opens. You > can minimize or hide the window with a little code from > Win32::GUI though. You do that inside BEGIN {}. > > The Pro version makes a real GUI version, and has a few other > functions. > > Marcus > > > > > > ------------------------------------------------------- > This sf.net email is sponsored by:ThinkGeek > Welcome to geek heaven. > http://thinkgeek.com/sf > _______________________________________________ > wxperl-users mailing list > wxp...@li... > https://lists.sourceforge.net/lists/listinfo/wxperl-users __________________________________________________ Do you Yahoo!? Faith Hill - Exclusive Performances, Videos & More http://faith.yahoo.com |