[perl-win32-gui-hackers] Mini update to Hook()

2003-12-11 Thread Stephen Pick
Hi,

Just thought I'd add a little something to the HEM (Hacker/Horrible/Hotchpotch 
Event Model). $win->Hook() now returns the previous coderef if you reassign a 
hook. For instance:

my $hookone = $win->Hook(0x0020, \&setcursor);
my $hooktwo = $win->Hook(0x0020, \&somethingelse);

$hookone now equals 0 (no previous reference).
$hooktwo is now a reference to &setcursor (the hook handler that was replaced 
by \&somethingelse).

You can't assign more than one handler to a message, since the message 
identifies the handler to call on a key/value basis (just a perl list).

The function still returns undef if you passed it invalid arguments, so error 
handling is a breeze:

if( defined($hookone) ) {
if( ref($hookone) ) {
print "Previous reference re-defined\n";
}
else {
print "This is the first hook we've made for this message\n";
}
}
else {
print "We passed dumb arguments.\n";
}

It's in the CVS now. Hopefully this will make things more useful, and allows 
you to create modules that "grab" hooks but still honour any hooks that the 
user of your module has previously defined.

Steve


[perl-win32-gui-hackers] CVS Commit

2003-12-11 Thread Laurent ROCHER
I commit :

[Laurent Rocher]
- GUI.pm : Change version to 0.0.670
- GUI.h  : Set NO_XSLOCKS for perl 5.005
- GUI_MessageLoops.cpp : Fix for perl 5.005

Now Win32::GUI work for ActivePerl 5.005

Does someone have something to add on CVS ?

Where upload new package release ?

We can put on Sourceforge but we need a new package name
(Win32-GUI-PPM-5.8).
I can upload new release but not create new package name.

Laurent.




Re: [perl-win32-gui-hackers] CVS Commit

2003-12-11 Thread Glenn Linderman

Laurent,

Do you mean that you don't have the rights to create a new package name?

Is that something that only Aldo can do?  Maybe Aldo will do it for us then?

If not, I would be glad to host the PPM for the package briefly on my 
web site until we can make a more official home for it.


Is the issue that sourceforge hasn't had a package for Perl 5.8 prior to 
 now?



On approximately 12/11/2003 12:33 PM, came the following characters from
the keyboard of Laurent ROCHER:

I commit :

[Laurent Rocher]
- GUI.pm : Change version to 0.0.670
- GUI.h  : Set NO_XSLOCKS for perl 5.005
- GUI_MessageLoops.cpp : Fix for perl 5.005

Now Win32::GUI work for ActivePerl 5.005

Does someone have something to add on CVS ?

Where upload new package release ?

We can put on Sourceforge but we need a new package name
(Win32-GUI-PPM-5.8).
I can upload new release but not create new package name.

Laurent.



---
This SF.net email is sponsored by: SF.net Giveback Program.
Does SourceForge.net help you be more productive?  Does it
help you create better code?  SHARE THE LOVE, and help us help
YOU!  Click Here: http://sourceforge.net/donate/
___
Perl-Win32-GUI-Hackers mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/perl-win32-gui-hackers




--
Glenn -- http://nevcal.com/
===
Like almost everyone, I receive a lot of spam every day, much of it
offering to help me get out of debt or get rich quick.  It's ridiculous.
-- Bill Gates

And here is why it is ridiculous:
 The division that includes Windows posted an operating profit of $2.26 
 billion on revenue of $2.81 billion.
 --from Reuters via 
http://biz.yahoo.com/rc/031113/tech_microsoft_msn_1.html


So that's profit of over 400% of investment... with a bit more 
investment in Windows technology, particularly in the area of 
reliability, the profit percentage might go down, but so might the bugs 
and security problems?  Seems like it would be a reasonable tradeoff. 
WalMart earnings are 3.4% of investment.