Hi all,
I've got a little object-oriented programming question:
I've built a class that recursively creates instances of itself,
storing them in itself.
$top = MyClass-new();
$top-{_var}{name1} = MyClass-new();
and so on, down a number of levels, creating a tree.
If I now delete one of the
Hi!
You only delete the reference to the object, not the object itself. What you have to
do is a recursive delete function as well. Something like:
$top-{_var}{name1}-delete();
And then define this method to first call delete on all it's children and then delete
itself and finaly delete the
Yes, that's it. Thank you, Magnus.
But thinking a bit about it:
I thought Perl was taking care of objects, variables etc. that
don't have a reference pointing to them and destroy / delete
them immediately, or is this not true for blessed objects?
Regards,
Hi!
Now here I'm not sure, I also think (hope) it does it's garbage collecting
automatically but sometimes (especially with referenced values) I have experienced it
better and safer to remove them myself.
Regards, Magnus
But thinking a bit about it:
I thought Perl was taking care of
I'm just working thru the *guitutx* tutorials that come with the Win32::GUI
distribution (0.0.502 on W2K with 5.6.1 633)
2 questions:
1. Are the *top* and *left* options used to determine the location of an
object (label, button, listbox..) in a Window?
2. Is there an ?object? manager (something
At 08:40 2003-01-28 -0700, Mark Sutfin wrote:
I'm just working thru the *guitutx* tutorials that come with the Win32::GUI
distribution (0.0.502 on W2K with 5.6.1 633)
That's a way old release of Win32::GUI. The 0.0.558, or 0.0.665 release are
better.
http://dada.perl.it/#gui
I think it
Greetings to all,
i want to do some 'find and replace' on a .doc file.
Sample i found on this mailing list was:
-
use strict;
use Win32::OLE;
use Win32::OLE::Const;
my $wd = Win32::OLE::Const-Load(Microsoft Word 9.0 Object Library);
my($outputFile) = 'file.doc';
my($word) =
I'm trying to get a percent that's say 80% to the true size of 80.23%
im using something like:
$percent = 8023;
$percent = sprintf( %.2f, $percent);
This will give me 80 but I need it to round to 80.12 or so on.
Any suggestions greatly appreciated.
Steve.
On Tuesday, January 28, 2003 9:18 AM, Johan Lindstrom wrote
At 08:40 2003-01-28 -0700, Mark Sutfin wrote:
I'm just working thru the *guitutx* tutorials that come with the
Win32::GUI
distribution (0.0.502 on W2K with 5.6.1 633)
That's a way old release of Win32::GUI. The 0.0.558, or 0.0.665
-Original Message-
From: steve silvers [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, January 28, 2003 1:34 PM
I'm trying to get a percent that's say 80% to the true size of 80.23%
im using something like:
$percent = 8023;
$percent = sprintf( %.2f, $percent);
Your code gave me
I am attempting to make a socket server running on a Win98 platform and
have a socket client connecting from a SCO Unix platform. What happens is
that I start the server and it sits waiting, I then connect from the SCO
server with the client socket app and I detect a connection on the Windows
Use 'or die Win32::OLE-LastError();' to see what the error is. In this
case it was 'Type mismatch' on the line with Ecexute. Then look in the
Visual Basic Object Browser (in Word, under the tools-maco menu is the
Visual Basic Editor, you use this to look at macros that you want to do in
perl, in
Below is the base code for a forking server. When I attempt to close my
child process with an exit(0), it terminates the server application. Is
there something I have done wrong or misunderstand? I stripped
out all the
variable initialization, but this code does work for a single
Jeff Slutzky wrote:
I am attempting to make a socket server running on a Win98 platform and
have a socket client connecting from a SCO Unix platform. What happens is
that I start the server and it sits waiting, I then connect from the SCO
server with the client socket app and I detect a
I need the ability
from PERL to read files in MSG format. I use WIN32::MAPI to get the list of the
attachments. I can modify any attachment that are Text Files, but I need
to be able to read the *.msg attachment and make a change the the attachment and
read resend it with the modification.
Rob,
Thank you very much! I got it worked !
Dawn
- Original Message -
From: Sisyphus [EMAIL PROTECTED]
To: Dawn Sun [EMAIL PROTECTED];
[EMAIL PROTECTED]
Sent: Monday, January 27, 2003 9:53 PM
Subject: Re: newbie question: about perl56 and perl58
- Original Message -
From:
I have been trying to figure out a way to insert text at the end of a Word
document. I know you can insert with
$word-Selection-TypeText(text here);
but if I am correct I need to place the cursor at the end of the file in
order to insert there. I have tried looking for the control to place
- Original Message -
From: Jeff Slutzky [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Tuesday, January 28, 2003 13:13
Subject: socket application
I am attempting to make a socket server running on a Win98 platform and
have a socket client connecting from a SCO Unix platform. What
Johan wrote:
snip
2. Is there an ?object? manager (something like TK's geometry mgr), or is
everyone else just able to do the pixel math in their head(s)?
That's not how layout is done using Win32::GUI.
The easiest way to avoid pixel math is The GUI Loft...
- Original Message -
From: Gerber, Christopher J [EMAIL PROTECTED]
To: 'Dirk Bremer (NISC)' [EMAIL PROTECTED]
Sent: Tuesday, January 28, 2003 15:25
Subject: RE: socket application
Dirk,
I had hacked together something like this in C at one point. I think I
have
a copy of the source
I'm glad my question was inspiring. I am trying to get this to work on my
Win2000 Workstation and it just hanging, not erroring out or anything. I
tested your code on another SCO server and it works like a charm. What
platform did you test this on? I thank you again for your help.
- Original Message -
From: Jeff Slutzky [EMAIL PROTECTED]
To: 'Dirk Bremer (NISC)' [EMAIL PROTECTED];
[EMAIL PROTECTED]
Sent: Tuesday, January 28, 2003 15:42
Subject: RE: socket application
I'm glad my question was inspiring. I am trying to get this to work on my
Win2000 Workstation
This seems like a useful starting point, courtesy of Dave Roth:
http://www.roth.net/perl/scripts/scripts.asp?ProcList.pl
In Python, I sometimes use one of the distribution scripts called killProcName.py.
Here's an excerpt which can probably be translated to Perl without too much difficulty:
This may not be the best way but it works for me.
my $doc = $word - Documents - Open(c:/test.doc);
my $oRange = $doc-Range();
my $oRange-EndOf;
my $oFont = $oRange-{Font};
$oRange-{Text} = Hello;
$oFont-{Color} = $clBlue;
$oRange-{Text} .= \nWorld;
--
Nathaniel G. Bartusiak
TTMS, Keesler AFB
At 14:22 2003-01-28 -0700, Mark Sutfin wrote:
The easiest way to avoid pixel math is The GUI Loft...
http://www.bahnhof.se/~johanl/perl/Loft/
Downloaded this as well... No properties showing as per docs (running
tgl.exe 11/2002). FAQ indicates that my screen resolution must be low...? So
It's
25 matches
Mail list logo