Re: pass vars to sub via TK/Button

2003-12-15 Thread Laurent_Coudeur
not to sure what your problem is so 

Here is How I get the variables back 

sub test{
my $type=$_[0]; #$rb_val
my $number=$_[2];   #$bonobo
my $path1=$_[1];#$oracleid
 

(these are string but I use the same process)


Laurent coudeur




Oliver Schaedlich <[EMAIL PROTECTED]>
15/12/2003 12:41
Please respond to Oliver Schaedlich

 
To: [EMAIL PROTECTED]
cc: 
Subject:Re: pass vars to sub via TK/Button


Greetings, 

15.12.2003, [EMAIL PROTECTED] wrote:

>$mw->>Button (-text=>"run",
> -command=> sub {test($rb_val,$bonobo,$oracleid)})
> ->place(-x=>320,-y=>>250 ,-width=>75);

thanks for your reply.

I tried to adapt to your example:

$main->Button
( -text => 'Add',
  -command => sub { add_item($var1, $var2) }
) -> pack;

but the output &add_item delivers looks more like hash references
than the content of aforementioned variables:
 
Added Tk::Entry=HASH(0x1c1956c) Tk::Entry=HASH(0x1c1e3a8)

Is it possible to pass simple variables via Entry/Button in the
first place, and if, how?

Best regards, 
oliver.



-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
 






-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
 




Re: pass vars to sub via TK/Button

2003-12-15 Thread Laurent_Coudeur
Here is how I do it

$mw->Button (-text=>"run",
-command=> sub {test($rb_val,$bonobo,$oracleid)})->place(-x=>320, 
-y=>250 ,-width=>75);


Laurent coudeur




Oliver Schaedlich <[EMAIL PROTECTED]>
15/12/2003 11:27
Please respond to Oliver Schaedlich

 
To: [EMAIL PROTECTED]
cc: 
Subject:pass vars to sub via TK/Button


Greetings, 

I'd like to know how to pass variables fetched by TK/entry to a
subroutine by using a Button. The Button/-command line in the
following script is obviously wrong, but should suffice to illustrate
what I want it to do.

I'd be happy if someone could tell me how to do this properly.

---
#! /usr/bin/perl -w

use strict;
use Tk;

my $main = MainWindow->new;

my $var1 = $main -> Entry( -width => 30 );
$var1 -> pack;
my $var2 = $main -> Entry( -width => 30 );
$var2 -> pack;

$main -> Button
( -text => 'Add',
  -command => \&add_item($var1, $var2)
#  ^^
) -> pack;

MainLoop;

sub add_item {
print "Added @_\n";
}
---

Best regards, 
oliver.



-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
 






-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
 




RE: Executable perl program help!!

2003-08-20 Thread Laurent_Coudeur
Also try

http://www.indigostar.com/



Laurent coudeur




Bob Showalter <[EMAIL PROTECTED]>
20/08/2003 16:20

 
To: "'Rich Parker'" <[EMAIL PROTECTED]>, [EMAIL PROTECTED]
cc: 
Subject:RE: Executable perl program help!!


Rich Parker wrote:
> I was at Active State the other day, they have one that can be
> purchased. I have seen a few others when I did a similar search as
> mentioned. I haven't seen one for free or one that has a demo for it,
> I'd love to try one, if anyone sees one, let everyone know about it.

You can download a demo version of ActiveState's Perl Dev Kit:



-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]





-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



writing in UTF8

2003-03-28 Thread Laurent_Coudeur
Hi all,

I have to print a report in UTF8

Is there any options to format the file to UTF8 while creationg it
then print into it safely?

like 

open (XLIFF,">$path1\\$_");
print XLIFF "$header$header2$filename ";

is there a module to do this or am i lost in limbo and missed the doc?

Laurent coudeur

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]