I've got a script that consistantly crashes MacPerl. It compiles several binaries and
then distributes them to their respective localized installer source trees. It
compiles (via Codewarrior) fine, and the crash starts when it try's to copy all the
files to their respecticve destination, when
So I'm coming up to speed on building Apple Events from the various
perl ways, and I'm starting with macperlcat.
I have a question about the documentations. The example shows:
params =>["'':obj {want:type(cobj), " .
"from:null(), form:enum(name), seld:TEXT(\@)}",
$
I want to search tru a file named test.file
In this file thera are about 20 lines, ordert
first name, last name, adres, info
I want to type a word wich is not case sensetif, and then search tru the
file.
if there is a match, the word must be hylited, and the line in wish the word
is found must be
Well, what about reading all lines into an array, do a grep on it and then
work further ?
open(FILE,"file.data");
@array = ;
close FILE;
@array = grep(/string_to_search/i,@array);
foreach(@array){
$_ =~ s/(string_to_search)/&highlight($1)/ieg; # Get string again and do
perform the hig
=o
>>I want to search tru a file named test.file
>>In this file thera are about 20 lines, ordert
>>first name, last name, adres, info
>>I want to type a word wich is not case sensetif, and then search tru the
>>file.
>>if there is a match, the word must be hylited, and the line in wish the word
Did you try increasing MacPerl's memory allocation?
--
Chris Nandor [EMAIL PROTECTED]http://pudge.net/
Open Source Development Network[EMAIL PROTECTED] http://osdn.com/
At 08:02 -0800 2002.04.02, Andrew O. Mellinger wrote:
>Is this last example correct? From what I am led to believe the
>"form:enum(name)" should instead be "form:indx"
Yes.
> I am actually getting the index of some item on the desktop, and it
>isn't a disk. Subesquent numbers are files and
At 10:38 -0800 2002.04.02, Perry Pillard wrote:
>Yup...It weighs in around 30 megs now...
>
>
>> -Original Message-
>> From: Chris Nandor [mailto:[EMAIL PROTECTED]]
>> Sent: Tuesday, April 02, 2002 12:20 PM
>> To: Perry Pillard
>> Cc: [EMAIL PROTECTED]
>> Subject: Re: [MacPerl] Rotate Curs
I'm curious, Chris, where would be a good line to draw for something
like this? How much should we allocate before calling it a day and
redesigning the app? How would we know?
Thanks!
Bill
Chris Nandor wrote:
>
> At 10:38 -0800 2002.04.02, Perry Pillard wrote:
> >Yup...It weighs in around 30
Yes, in the same spot most every time. I have seen one instance where it waited a
couple of seconds longer than normal to crash, but usually it happens in the exact
same spot. I got it to complete successfully once when I created a new MacPerl doc
and cut-n-pasted my code into it. I tried th
When I was having problems with the DoAppleScript and system, I would
also have crashes in RotateCursor.
RotateCursor is just a good place to expose heap corruptions, which
is what is probably happening. You might even see the cursor turn to
garbage (as it is overwritten) before it crashes.
My compile code sends applescript commands, and immediately after that I do a system
call to duplicate the binaries, just like you said. I'll swap my duplicate code to
your File::Copy like you said and see if that fixes it. Thanks!
==
Pillard
Keeper of the Code
Macromedia, Fre
>My compile code sends applescript commands, and immediately after
>that I do a system call to duplicate the binaries, just like you
>said. I'll swap my duplicate code to your File::Copy like you said
>and see if that fixes it. Thanks!
BTW: I have logged this bug in the MacPerl bug datab
At 11:59 -0800 2002.04.02, Andrew O. Mellinger wrote:
> Right now I am converting all of my DoAppleScript calls to
>Mac::Glue for the Finder, CodeWarrrior and InstallerVise because I
>can't wait for the fix.
That's OK, Mac::Glue is better anyway. :) Thanks for spotting the
problem, Andrew, an
So you're using DoAppleScript? Or generating the events directly?
I've found that you can corrupt MacPerl's heap pretty easily if you're
using events directly and not disposing of the AppleEvent descriptors
properly (AEDisposeDesc). 5.6.1r1 seems to be a lot more sensitive that
5.2.0r4 to this pr
At 2:03 PM -0600 4/2/02, Alex Harper wrote:
>So you're using DoAppleScript? Or generating the events directly?
>
>I've found that you can corrupt MacPerl's heap pretty easily if you're
>using events directly and not disposing of the AppleEvent descriptors
>properly (AEDisposeDesc). 5.6.1r1 seems t
At 12:11 -0800 2002.04.02, Andrew O. Mellinger wrote:
> But as Chris pointed out Mac::Glue rocks. Unless you're trying to
>write something that will work under 9 & X.
Well, MacPerl can use Mac::Glue to control Mac OS X apps, though support
for this is not complete. At some point I hope we get
Y'all,
Can someone give me the quick rundown on how to use properties from
Mac::Glue?
For example, I'm using the Finder. How do I find the name of the
startup disk? In AppleScript it is:
tell application "Finder"
return Startup Disk as text
end tell
Would one of you guys mind giving me a sample of your Apple Event dispose code,
including the AppleScript that came before it? I've got some info on Google about it,
but it's vague and new to this novice. Thanks!
By the way, I converted my system duplicates over to File::Copy and my script go
At 1:19 PM -0800 4/2/02, Perry Pillard wrote:
>Would one of you guys mind giving me a sample of your Apple Event
>dispose code, including the AppleScript that came before it? I've
>got some info on Google about it, but it's vague and new to this
>novice. Thanks!
>
>By the way, I converted my
Thanks for the link. I have looked a bit at Mac::Glue, and it looks promising, but
it's gonna take a little more research for me to implement it. I'm a novice here
who's learning as he goes. I know just enough perl to get me in trouble, learning
more every day. But I got no teacher, so it's
Unfortunately, the AEDisposeDesc issue only applies if you are creating
the events directly using the Mac::AppleEvent module. If you are using
the DoAppleScript functionality (where you inline AppleScript code in
your Perl) it doesn't apply.
As Andrew indicated, your best bet may be to move from
H. Thanks for the info. Lookin' into this now...
==
Pillard
Keeper of the Code
Macromedia, FreeHand
"What the web can be"
==
> -Original Message-
> From: Alex Harper [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, April 02, 2002 3:32 PM
> To: [EMAIL PR
At 15:32 -0600 2002.04.02, Alex Harper wrote:
>Unfortunately, the AEDisposeDesc issue only applies if you are creating
>the events directly using the Mac::AppleEvent module. If you are using
>the DoAppleScript functionality (where you inline AppleScript code in
>your Perl) it doesn't apply.
Right
At 13:15 -0800 2002.04.02, Andrew O. Mellinger wrote:
> Can someone give me the quick rundown on how to use properties from
>Mac::Glue?
>
> For example, I'm using the Finder. How do I find the name of the
>startup disk? In AppleScript it is:
>
> tell application "Finder"
>
BTW, I know some of this is a little bit subobvious; if you have
suggestions (or patches) for the documentation, or suggestions for
alternate ways to do the interface itself (for example, how to make
implicit get() work as it does in AppleScript), please let me know.
--
Chris Nandor
26 matches
Mail list logo