Re: [perl-win32-gui-users] How to combine tool- and rebars properly?

2008-03-03 Thread Robert May
On 24/02/2008, M2U Germany <[EMAIL PROTECTED]> wrote:
> On Thursday, February 14, 2008 6:27 PM Robert May wrote:
>  > I'd be interested in the solution to this!
>  >
>  > With the code below I see the toolbar jumping from 1 to 3 rows,
>  > despite the fact that
>  > the buttons only appear on 2 rows, and except for when there is only
>  > one row, the number
>  > of rows is always one too big.
>  >
>
>  Nevertheless I reconsidered your example code, Rob. I finally found the
>  problem causing the wrong dimensions and row counts: we had set the state
>  constant for the seperator to "TBSTATE_ENABLED" but in fact this doesn't
>  make much sense because a "TBSTYLE_SEP" button can't be disabled, right? So
>  I just replaced "TBSTATE_ENABLED" with "0" and all strange behaviour
>  disappeared. This is probably not a really neat solution and I think there
>  might be a constant specified for this purpose. "TBSTATE_INDETERMINATE" is a
>  good candidate, isn't it? It works, too.

Interesting.  That change doesn't fix the problem for me.  can you
post the exact code you are using so I can confirm that I'm
understanding what you say exactly.

>
>  Of course I'm not as nearly into Win32::GUI programming
>  internals as you and probably most other members of this list are... so I
>  can only guess that using "TBSTATE_ENABLED" on a separator button causes the
>  toolbar sizing routines to *think* of it as a normal button with comparable
>  dimension needs and therefore to wrap this (imaginary and obviously not
>  displayed) space into the next line.

As far as I am aware a 'button' of type TB_SEP should completely
ignore the state, and it shouldn't make any difference what state you
set.  I can't see any difference myself.

>  Whatever the exact reason may be, the solution shown above seems to work.
>  Main conclusion: no bug to be eliminated... hooray!

I don't think this is a bug in Win32::GUI - my gut feeling is that it
is the behaviour of the underlying Win32 toolbar control, but I'd be
interested in seeing a working solution.

Cheers,
Rob.

-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
Perl-Win32-GUI-Users mailing list
Perl-Win32-GUI-Users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/perl-win32-gui-users
http://perl-win32-gui.sourceforge.net/


Re: [perl-win32-gui-users] tutorials use strict? use warnings? globals? sender and eventargs? $self?

2008-03-03 Thread Robert May
On 21/02/2008, David Christensen <[EMAIL PROTECTED]> wrote:
> perl-win32-gui-users:
>
>  I'm a Win32::GUI newbie who went through the tutorials the other night:
>
> http://perl-win32-gui.sourceforge.net/cgi-bin/docs.cgi?doc=tutorial
>
>  and was shocked to see:
>
>  1.  No "use strict" nor "use warnings".

If you look at the tutorial demo code distributed with Win32::GUI (run
win32-gui-demos from a cmd prompt) you'll see that it is all strict
and warnings safe.  There is a line to be drawn somewhere with respect
to clarity of the documentation and 'correctness'.  We'll never satify
everyone with the style used, and so I have tried to err on the side
of keeping the task at hand clear.  This is not supposed to be a
tutorial in good perl coding style, but a tutorial showing the
Win32::GUI concepts.  Patches are always welcome if you think you can
make things clearer.

>  2.  The scripts used global variables to pass around references to the
>  windows, controls, etc..

Again, this is one possible style.  Possibly not a good one, but it
makes it very clear what is being done.   I didn't write the
tutorials, but have inherited their maintainance based on the lack of
anyone else willing to do it.  Again, patches welcome.

>  3.  There were no sender or eventargs arguments.

Before this email I wasn't even aware what these things were.
Remember this is Perl, not some MS language, so you shouldn't expect
the idioms to be the same.  There is more than enough support within
Win32::GUI to provide an interface like this if you'd like to invest
the time in creating all the necessary objects, but there will be a
speed and memory hit from doing so (although it's probably not very
significant).  I think, more importantly, the procedural interface
with the parameters decoded is more familiar to perl programmers.

>  (Not even a $self arg?)  RTFM, I don't see them either.

You probably want to read about the differences between the OEM and
NEM event models (although there's not much in the docs, the samples
provide quite a lot of material, as does searching the list archives).

>  Am I missing something?  I was looking for an OO GUI toolkit in Perl.  I
>  intend to build an application that will feature pop-up forms for
>  editing objects persisted in a database.  My idea is to create a class
>  and a table for each object type.  The class includes a method to create
>  and display a window for editing that type of object.  When the user
>  needs to create/ edit an object, I create an object, stuff it/ get it
>  stuffed with data, and/or create/ display the editor window.  The user
>  may have many such windows open at the same time, including multiple
>  windows from the same class.  When the user interacts with the windows
>  and controls, the event handlers need to be able to find the right
>  object.  Microsoft's "sender" argument solves this need nicely.
>  Microsoft's "eventargs" argument solves other needs nicely.  Does
>  Win32::GUI have equivalents?

Yes, it does.  If the other replies have not helped you find the right
direction, then please post back and we'll see what we can do to help
you - there's nothing very hard if you're familiar with perl (and, in
some cases, the Win32 API).

Regards,
Rob.
>
>
>  TIA,
>
>  David
>
>
>  -
>  This SF.net email is sponsored by: Microsoft
>  Defy all challenges. Microsoft(R) Visual Studio 2008.
>  http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
>  ___
>  Perl-Win32-GUI-Users mailing list
>  Perl-Win32-GUI-Users@lists.sourceforge.net
>  https://lists.sourceforge.net/lists/listinfo/perl-win32-gui-users
>  http://perl-win32-gui.sourceforge.net/
>


-- 
Please update your address book with my new email address:
[EMAIL PROTECTED]

-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
Perl-Win32-GUI-Users mailing list
Perl-Win32-GUI-Users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/perl-win32-gui-users
http://perl-win32-gui.sourceforge.net/


Re: [perl-win32-gui-users] Win32 GUI 1.06 PPM 5.10 x64 and Source Distribution

2008-03-03 Thread Robert May
On 21/02/2008, Cloud Strife <[EMAIL PROTECTED]> wrote:
>
>  I'm tried to compile Win32 GUI 1.06 for Active Perl 5.10 x64 on Windows XP
>  Professional 64 bit Edition (Using Platform SDK and Windows SDK v6.0). After
>  failing many times, it was successfully done. But  AxWindow and Grid have
>  problems. I'm trying to fix this when I have time.
>
>  This is Active Perl PPM 5.10 and Source Distribution.
>
>  PPM:
>  http://rapidshare.de/files/38625281/Win32-GUI-1.06-AMD64-PPM-5.10.rar.html
>  SRC: http://rapidshare.de/files/38627491/Win32-GUI-1.06_x64.rar.html

Thank you for this.   When I get time I will look at integrating your
changes into the main codebase.  Are you having any troubles once you
have made these changes, as I know there are many place where pointer
are stored in DWORDs and LONGs (or at least cast through them), which
I would have though would cause problems on Win64??

Regards,
Rob.

-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
Perl-Win32-GUI-Users mailing list
Perl-Win32-GUI-Users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/perl-win32-gui-users
http://perl-win32-gui.sourceforge.net/


Re: [perl-win32-gui-users] Process list on Vista

2008-03-03 Thread Robert May
On 01/03/2008, Bhupendra G J <[EMAIL PROTECTED]> wrote:
> I wanna get the list of processes and the following function in WIn32 Gui
> package is being used.
>
> Win32::PerfLib::GetCounterNames('', \%counter);
>
> On windows xp, am getting the process list but on vista this subroutine
> doesn't return any value. Is there any way to get process list on vista
> using Win32 GUI package.
>
> PS: Perl version 5.8.8 is used.

This is the mailing list for the Win32::GUI package, not
Win32::PerfLib.   Win32::PerfLib is a part of libwin32.  The README
for libwin32 says:

: Welcome to libwin32 version 0.28.
:
: All discussion of development / maintenance of the libwin32 package
: should happen on the [EMAIL PROTECTED] mailing list.  You can
: subscribe by sending an empty email message to:
:
:[EMAIL PROTECTED]
:
: An NNTP archive of previous messages is available from:
:
: http://www.nntp.perl.org/group/perl.libwin32
:
: Please report any bugs or enhancement requests to the CPAN
: request tracker at:
:
: http://rt.cpan.org/NoAuth/Bugs.html?Dist=libwin32

Can I suggest that you try there instead.

Regards,
Rob.

-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
Perl-Win32-GUI-Users mailing list
Perl-Win32-GUI-Users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/perl-win32-gui-users
http://perl-win32-gui.sourceforge.net/