Re: [perl-win32-gui-users] How I have to separe the Win32::GUI between pm module

2003-01-23 Thread Aldo Calpini
Guillem Cunillera Wefers wrote:
> Thank you for your attention, but these 2 possible problems doesn't
> appear in my program. I think I have a more basic problem.
> Let me present how I distribute in pseudocode, for a module that can
> easy be extended to more modules.
>
> ---
> module_a.pm
> ---
>
> # all window definition...for instance $window_a
>
> sub initial   ##the first function that is call for another module
> {
>...
>$window_a->Show()
>   Win32::GUI::Dialog
>   ...
> }

this seems to be exactly the problem Sean pointed out. if you call the
'initial' function for more than one module (assuming they are all similar),
you're in fact calling Win32::GUI::Dialog more than one time. try removing
the Win32::GUI::Dialog call from your modules and placing it in the main
application, where it is called only once.

cheers,
Aldo

__END__
$_=q,just perl,,s, , another ,,s,$, hacker,,print;




[perl-win32-gui-users] Win32::GUI Release 0.0.665

2003-01-23 Thread Aldo Calpini
hello people,

finally, an update! this release of Win32::GUI introduces many new features,
the most important being:

- the NEM (New Event Model), which allows for something like:

  $Window->AddButton(
  -text => 'say hello',
  -onClick => sub { print "hello, world!\n"; },
  );

  *** editor's note *** there are actually many gotchas with NEM,
  I'll elaborate more on this in a separate post.

- tooltips are now supported on most controls with the -tip => STRING
  option.

- ListView checkboxes can now be managed with the ItemCheck() method;
  there's also a new ItemCheck event for ListViews that gets fired when
  you toggle an item's checkbox.

the biggest changes are in the codebase, which is now splitted in several
files. please note that something - particularly the NEM - may be broken
in this release (you already knew it, huh? ;-)

source code is available at my site (http://dada.perl.it, which is up and
running again :-) and at SourceForge. PPM binaries will follow ASAP -- if
someone wants to pack the binaries for us, please do it (you'll certainly
be faster than me ;-) and send me the files so that I can put it online.

cheers,
Aldo

__END__
$_=q,just perl,,s, , another ,,s,$, hacker,,print;





[perl-win32-gui-users] TreeView Issues

2003-01-23 Thread SPRENGER, EDWARD J
I've looked thoroughly through the entire archive for this list, and haven't
seen these problem solutions resolved. The issues I'm having are all related
to a treeview object, with the -checkboxes => 1 option. 

- For some reason, enabling checkboxes screws up the horizontal scrolling of
the object. Despite having enough space for the object, the horizontal
scrollbar appears, with a massive amount of space available to scroll (it's
as if the object is now several thousand pixels wide, of entirely blank
space). This is mostly a cosmetic issue, but let's face it: it looks awful,
and makes it hard to scroll horizontally when you really need to. Is there a
way to prevent this, or at the very least disable the horizontal scrollbar
entirely?
- Identifying when a checkbox has been clicked. I noticed some discussion
about how to detect this, and it seems there isn't an _ItemCheck event for
treeview nodes. Ok. I would settle for using TreeView_Click() event, but the
problem is that the event is triggered *before* the item's state is changed.
So any logic I perform on the click event will be wrong, since it's looking
at the tree before the action you just performed is taken into account. Is
there a way to trigger an event when an item is checked, as opposed to right
before it?
- Anyone have any luck with the HitTest() function? It seems to only work
sporadically, and makes it impossible for any sort of context-sensitive
actions (like a context menu on right-click) without it. When I call it, I
sometimes get the node I clicked on, but usually not. 

Any suggestions or answers for these questions would be much appreciated.
Thanks!




Ed Sprenger
Enterprise Systems Management
Internet Operations
Fleetboston Financial





[perl-win32-gui-users] "Can't locate loadable object for module Win32::GUI in @INC..."

2003-01-23 Thread Anton Yasnitsky
Hi, everybody!


 That's basically my primitive beginner's
question:

what should I do since I downloaded Win32::GUI
0.0.665 from http://dada.perl.it/ (many thanks to
Aldo Calpini!) and unzipped it?

I realize that the whole unzipped contents should
be put somewhere (it says "@INC contains
C:/Perl/lib and C:Perl/site/lib "), but nothing
came out of my exerimenting with moving files
from one directory to another (whatever idiotic
it may look).

So, where to? Or, generally, what to do next?

__ 
Post your free ad now! http://personals.yahoo.ca



[perl-win32-gui-users] Newbie Win32::GUI Question

2003-01-23 Thread Jeff Slutzky
I have created a window with 4 buttons, 2 labels, 2 text fields, and a
status bar.  In the Button_1 click event I try to write to the txt field
and get the following error:  "Can't locate
auto/Win32/GUI/Textfield/text.al in @INC (@INC contains; C:/Perl/lib
C:/Perl/site/lib .) at C:\Perl\Perlscripts\Sound Recorder\soundrecorder.pl
line 107"

Can anyone tell me what and why I get this error?

Ultimately, I want to be able to write to a Status bar for each button 
event.  I have a beefier application that calls Win32::API calls and want 
to make sure that the calls are also made in the correct space.  So, 
obviously I'm a newbie and need some help.


use Win32::GUI;

$Win = new Win32::GUI::DialogBox(
  -left   => 284,
  -top=> 466,
  -width  => 334,
  -height => 238,
  -name   => "Win",
  -text   => "sound recorder"
  );



$Win->AddButton(
   -text=> "Record",
   -name=> "Button_1",
   -left=> 15,
   -top => 19,
   -width   => 46,
   -height  => 21,
   -foreground=> 16711680,
  );

$sb1 = $Win->AddStatusBar(
   -text=> "inactive...",
   -name=> "StatusBar_1",
   -left=> 0,
   -top => 193,
   -width   => 324,
   -height  => 17,
  );

$Win->AddButton(
   -text=> "Play",
   -name=> "Button_2",
   -left=> 84,
   -top => 19,
   -width   => 35,
   -height  => 21,
   -foreground=> 16711680,
  );

$Win->AddButton(
   -text=> "Stop",
   -name=> "Button_3",
   -left=> 143,
   -top => 20,
   -width   => 36,
   -height  => 21,
   -foreground=> 16711680,
  );

$Win->AddButton(
   -text=> "Save",
   -name=> "Button_4",
   -left=> 203,
   -top => 20,
   -width   => 41,
   -height  => 21,
   -foreground=> 16711680,
  );

$Win->AddTextfield(
   -text=> "",
   -name=> "userid",
   -left=> 126,
   -top => 89,
   -width   => 95,
   -height  => 20,
  );

$txt1 = $Win->AddTextfield(
   -text=> "",
   -name=> "campaign",
   -left=> 126,
   -top => 119,
   -width   => 95,
   -height  => 20,
  );

$Win->AddLabel(
   -text=> "userid",
   -name=> "Label_1",
   -left=> 86,
   -top => 90,
   -width   => 28,
   -height  => 13,
   -foreground=> 0,
  );

$Win->AddLabel(
   -text=> "campaign",
   -name=> "Label_2",
   -left=> 69,
   -top => 120,
   -width   => 46,
   -height  => 13,
   -foreground=> 0,
  );

$Win->Show();
Win32::GUI::Dialog();


sub Button_1_Click {
print "test\n";
$txt1->text("recording..");
}

sub Win_Terminate {
   return -1;
}





Jeff Slutzky




RE: [perl-win32-gui-users] Newbie Win32::GUI Question

2003-01-23 Thread Rogers, John
In your click sub, Try,
$Win->campaign->Text("recording..");

call them by name.

JohnR

> -Original Message-
> From: Jeff Slutzky [mailto:[EMAIL PROTECTED]
> Sent: Friday, January 24, 2003 1:24 PM
> To: 'perl-win32-gui-users@lists.sourceforge.net'
> Subject: [perl-win32-gui-users] Newbie Win32::GUI Question
> 
> 
> I have created a window with 4 buttons, 2 labels, 2 text fields, and a
> status bar.  In the Button_1 click event I try to write to 
> the txt field
> and get the following error:  "Can't locate
> auto/Win32/GUI/Textfield/text.al in @INC (@INC contains; C:/Perl/lib
> C:/Perl/site/lib .) at C:\Perl\Perlscripts\Sound 
> Recorder\soundrecorder.pl
> line 107"
> 
> Can anyone tell me what and why I get this error?
> 
> Ultimately, I want to be able to write to a Status bar for 
> each button 
> event.  I have a beefier application that calls Win32::API 
> calls and want 
> to make sure that the calls are also made in the correct space.  So, 
> obviously I'm a newbie and need some help.
> 
> 
> use Win32::GUI;
> 
> $Win = new Win32::GUI::DialogBox(
>   -left   => 284,
>   -top=> 466,
>   -width  => 334,
>   -height => 238,
>   -name   => "Win",
>   -text   => "sound recorder"
>   );
> 
> 
> 
> $Win->AddButton(
>-text=> "Record",
>-name=> "Button_1",
>-left=> 15,
>-top => 19,
>-width   => 46,
>-height  => 21,
>-foreground=> 16711680,
>   );
> 
> $sb1 = $Win->AddStatusBar(
>-text=> "inactive...",
>-name=> "StatusBar_1",
>-left=> 0,
>-top => 193,
>-width   => 324,
>-height  => 17,
>   );
> 
> $Win->AddButton(
>-text=> "Play",
>-name=> "Button_2",
>-left=> 84,
>-top => 19,
>-width   => 35,
>-height  => 21,
>-foreground=> 16711680,
>   );
> 
> $Win->AddButton(
>-text=> "Stop",
>-name=> "Button_3",
>-left=> 143,
>-top => 20,
>-width   => 36,
>-height  => 21,
>-foreground=> 16711680,
>   );
> 
> $Win->AddButton(
>-text=> "Save",
>-name=> "Button_4",
>-left=> 203,
>-top => 20,
>-width   => 41,
>-height  => 21,
>-foreground=> 16711680,
>   );
> 
> $Win->AddTextfield(
>-text=> "",
>-name=> "userid",
>-left=> 126,
>-top => 89,
>-width   => 95,
>-height  => 20,
>   );
> 
> $txt1 = $Win->AddTextfield(
>-text=> "",
>-name=> "campaign",
>-left=> 126,
>-top => 119,
>-width   => 95,
>-height  => 20,
>   );
> 
> $Win->AddLabel(
>-text=> "userid",
>-name=> "Label_1",
>-left=> 86,
>-top => 90,
>-width   => 28,
>-height  => 13,
>-foreground=> 0,
>   );
> 
> $Win->AddLabel(
>-text=> "campaign",
>-name=> "Label_2",
>-left=> 69,
>-top => 120,
>-width   => 46,
>-height  => 13,
>-foreground=> 0,
>   );
> 
> $Win->Show();
> Win32::GUI::Dialog();
> 
> 
> sub Button_1_Click {
> print "test\n";
> $txt1->text("recording..");
> }
> 
> sub Win_Terminate {
>return -1;
> }
> 
> __
> __
> 
> 
> 
> Jeff Slutzky
> 
> 
> 
> ---
> This SF.NET email is sponsored by:
> SourceForge Enterprise Edition + IBM + LinuxWorld = Something 2 See!
> http://www.vasoftware.com
> ___
> Perl-Win32-GUI-Users mailing list
> Perl-Win32-GUI-Users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/perl-win32-gui-users
> 


## 
Disclaimer 

If this e-mail has been sent to you in error, please notify 
Océ-Australia Limited immediately and delete this e-mail from 
your system. 

Any views expressed in this e-mail are those of the individual 
sender and may not necessarily reflect the views of 
Océ-Australia Limited. 
##