[Date Prev][Date Next][Thread Prev][Thread Next] [Search] [Date Index] [Thread Index]

MacPerl-Digest V1 #16




MacPerl-Digest         Friday, March 19 1999         Volume 01 : Number 016



Re: [MacPerl] 3D Ball
Re: [MacPerl] 3D Ball
[MacPerl] configuring personal web sharing
Re: [MacPerl] personal web sharing
Re: [MacPerl] personal web sharing
Re: [MacPerl] personal web sharing
[MacPerl] Using AppleEvents with FileMaker Pro
[MacPerl] RE: Using AppleEvents with FileMaker Pro
Re: [MacPerl] RE: Using AppleEvents with FileMaker Pro
[MacPerl] MacHTTP and MacPerl
[MacPerl] MacDialog in color
[MacPerl] 3D Ball - problems
[MacPerl] Multiple File Selection
Re: [MacPerl] Multiple File Selection
[MacPerl] stat() equivalent for owner, group, mode?
re: [MacPerl] 3D Ball - problems
Re: [MacPerl] RE: Using AppleEvents with FileMaker Pro
[MacPerl] Novice trouble with StandardFile

----------------------------------------------------------------------

Date: Wed, 17 Mar 1999 08:17:31 -0600
From: Greenblatt & Seay <g-s@navix.net>
Subject: Re: [MacPerl] 3D Ball

Jay said...
>I was impressed when I accidentally found I could rotate
>the box or change my perspective or whatever...
>

Impressive!

Directions for dragging and rotating are given in the first few commented
lines of the code.

Beware, when I pressed the escape key to quit my computer locked up. I'm
running  MacPerl 5.2.0r4 on a PPC 604 running at 120 with 7.5.5.

Thanks Kevin.

David Seay
http://www.mastercall.com/g-s



===== Want to unsubscribe from this list?
===== Send mail with body "unsubscribe" to macperl-request@macperl.org

------------------------------

Date: Wed, 17 Mar 1999 08:34:13 -0800
From: Nathaniel Irons <irons@apple.com>
Subject: Re: [MacPerl] 3D Ball

Neat-o.  

I found it curious that my frame rate more than quadrupled when I manipulated
it with the keyboard (12 to 52 fps).

  -nat

- --
Nat Irons
WWDR &c, Apple Computer
408-974-0915
PGP fingerprint: 873D 7978 23FC 37FE 10D5  349A F57F 0FAA F4D4 B19A



===== Want to unsubscribe from this list?
===== Send mail with body "unsubscribe" to macperl-request@macperl.org

------------------------------

Date: Wed, 17 Mar 1999 10:51:41 -0800
From: jrough@nanospace.com
Subject: [MacPerl] configuring personal web sharing

Okay, I have this little hello.cgi script in the "web pages" folder with
personal web sharing turned on and web sharing is configured to point to
this folder.  When I turn to the current IP number in my web browser i
get the message "A CGI or internal server component could not complete
the requested action."  What am I doing wrong?

#! perl -w
print "Content-type: text/html\n\n";
print "Hello, world!\n";

===== Want to unsubscribe from this list?
===== Send mail with body "unsubscribe" to macperl-request@macperl.org

------------------------------

Date: Wed, 17 Mar 1999 16:03:45 -0800
From: jrough@nanospace.com
Subject: Re: [MacPerl] personal web sharing

Allan:

It worked for you but its not working for me.  I turned on web sharing
read only access.  I put the following hello world script in my web
pages folder on my hard disk with the extension .cgi.  dow.

#! perl -w

print "Content-type: text/html\n\n";
print "Hello, world!\n";

I type the IP address of my TCP/IP control panel in my web browser.  I
checked the web sharing preferences and there are some action items, do
I have to add an action tab for MacPerl or a pre-process action or something?

Its saying "Bad Gateway" on my browser and A CGI or internal server
component could not complete the requested action in the browser win

Janis

Allan Greenier wrote:
> 
> Actually I just did this tonite! You of course get a different address
> every time you dial up, but other than that I pointed at the CGI, it
> launched MacPerl and then itself.
> Worked like a charm right "out of the box".
> 
> Allan Greenier
> AutoScript Applications
> 
> agreenier@snet.net
> http://www.geocities.com/~autoscript
> 
> > Since personal web sharing sets up your mac as a server is there a way
> > to test cgi scripts using this feature?  If there is how do you do it?
> > My ISP has a site I can put my uploaded files but I would like a way to
> > test them out locally any ideas?
> 
> ===== Want to unsubscribe from this list?
> ===== Send mail with body "unsubscribe" to macperl-request@macperl.org

===== Want to unsubscribe from this list?
===== Send mail with body "unsubscribe" to macperl-request@macperl.org

------------------------------

Date: Wed, 17 Mar 1999 16:09:03 -0800
From: jrough@nanospace.com
Subject: Re: [MacPerl] personal web sharing

P.S.  I saved it as a cgi script as well.

Allan Greenier wrote:
> 
> Actually I just did this tonite! You of course get a different address
> every time you dial up, but other than that I pointed at the CGI, it
> launched MacPerl and then itself.
> Worked like a charm right "out of the box".
> 
> Allan Greenier
> AutoScript Applications
> 
> agreenier@snet.net
> http://www.geocities.com/~autoscript
> 
> > Since personal web sharing sets up your mac as a server is there a way
> > to test cgi scripts using this feature?  If there is how do you do it?
> > My ISP has a site I can put my uploaded files but I would like a way to
> > test them out locally any ideas?
> 
> ===== Want to unsubscribe from this list?
> ===== Send mail with body "unsubscribe" to macperl-request@macperl.org

===== Want to unsubscribe from this list?
===== Send mail with body "unsubscribe" to macperl-request@macperl.org

------------------------------

Date: Wed, 17 Mar 1999 16:46:41 -0800
From: jrough@nanospace.com
Subject: Re: [MacPerl] personal web sharing

I figured out how to configure it.  Sorry for the extra noise.  The
problem was I didn't restart my browser so it was using the disk cache. 
Thanks for the previous input it was sufficient.

Allan Greenier wrote:
> 
> Actually I just did this tonite! You of course get a different address
> every time you dial up, but other than that I pointed at the CGI, it
> launched MacPerl and then itself.
> Worked like a charm right "out of the box".
> 
> Allan Greenier
> AutoScript Applications
> 
> agreenier@snet.net
> http://www.geocities.com/~autoscript
> 
> > Since personal web sharing sets up your mac as a server is there a way
> > to test cgi scripts using this feature?  If there is how do you do it?
> > My ISP has a site I can put my uploaded files but I would like a way to
> > test them out locally any ideas?
> 
> ===== Want to unsubscribe from this list?
> ===== Send mail with body "unsubscribe" to macperl-request@macperl.org

===== Want to unsubscribe from this list?
===== Send mail with body "unsubscribe" to macperl-request@macperl.org

------------------------------

Date: Thu, 18 Mar 99 10:41:29 +0200
From: Sean Carte <SeanC@mediatek.co.za>
Subject: [MacPerl] Using AppleEvents with FileMaker Pro

Please will someone point me in the right direction.

Up until now I've been embedding AppleScripts in MacPerl scripts in order 
to manipulate records in a FileMaker database. It's worked very well, but 
my current project will be based on cgis and, performance issues aside, I 
seem to be running into difficulties.

I believe that it is possible to use AppleEvents to achieve the same 
results as running embedded AppleScripts, but I don't know where to 
begin. I've looked at lib:Mac:AppleEvents using Shuck, but that didn't 
help much. What I really need are examples so that I can see how these 
things are accomplished.

Does anybody know where I might find something that might help me?

My brain hurts!
SeanC
                     Mediatek Training Institute
           129 Moore Road, Berea, Durban, South Africa
   phone: +27 (0)31 305 4200              SeanC@mediatek.co.za
   fax: +27 (0)31 305 4236                SeanC@dmax.co.za


===== Want to unsubscribe from this list?
===== Send mail with body "unsubscribe" to macperl-request@macperl.org

------------------------------

Date: Thu, 18 Mar 99 11:04:54 +0200
From: Sean Carte <SeanC@mediatek.co.za>
Subject: [MacPerl] RE: Using AppleEvents with FileMaker Pro

I've just remembered that there's information in MPPE and am now 
rereading that. If there is anything else that anybody thinks I might 
find useful, please let me know.

My brain hurts!
SeanC
                     Mediatek Training Institute
           129 Moore Road, Berea, Durban, South Africa
   phone: +27 (0)31 305 4200              SeanC@mediatek.co.za
   fax: +27 (0)31 305 4236                SeanC@dmax.co.za


===== Want to unsubscribe from this list?
===== Send mail with body "unsubscribe" to macperl-request@macperl.org

------------------------------

Date: Thu, 18 Mar 1999 10:24:15 -0500
From: Chris Nandor <pudge@pobox.com>
Subject: Re: [MacPerl] RE: Using AppleEvents with FileMaker Pro

At 04.04 -0500 1999.03.18, Sean Carte wrote:
>I've just remembered that there's information in MPPE and am now
>rereading that. If there is anything else that anybody thinks I might
>find useful, please let me know.

Well, if  you have MacPerl 5.2.0r4 (and you should), go the Help -> Toolbox
menu and see the last link, to the Apple Events tutorial.

I am working on ways to make dealing with Apple Events much easier (and in
fact, my Mac::AppleEvents::Simple module goes a long way toward that end),
with something called Mac::Glue.  In progress.

Also, I wrote an article in The Perl Journal about Apple Events and MacPerl
(see http://pudge.net/macperl/ for a link to it, as well as links to all my
other MacPerl and Apple Events stuff, and a more recent version of the
tutorial mentioned above).

- --
Chris Nandor          mailto:pudge@pobox.com         http://pudge.net/
%PGPKey = ('B76E72AD', [1024, '0824090B CE73CA10  1FF77F13 8180B6B6'])

===== Want to unsubscribe from this list?
===== Send mail with body "unsubscribe" to macperl-request@macperl.org

------------------------------

Date: Thu, 18 Mar 1999 12:27:22 -0600
From: Jeffrey Hull <jwhull@drhull.com>
Subject: [MacPerl] MacHTTP and MacPerl

If anybody has had success setting up and running MacPerl under MacHTTP
remotely over an intranet - that is MacPerl cgi  on server machine and
script-invoking browser on a client - please contact me off list.  I am
stuck getting this to work, and I need a bit of help.  FAQs so far have led
to blind alleys and -1701 errors.  If it is in a FAQ somewhere just point
me there.

Jeff Hull

- ----------------------------------------------------
                         Jeffrey W. Hull, M.D., F.A.A.P.
                       1215 7th Street SE, Suite 210
                           Decatur, AL  35601-3309
                           mailto:jwhull@drhull.com
                            http://www.drhull.com
- ----------------------------------------------------



===== Want to unsubscribe from this list?
===== Send mail with body "unsubscribe" to macperl-request@macperl.org

------------------------------

Date: Thu, 18 Mar 1999 20:09:01 -0500
From: kpreid@ibm.net (Kevin Reid)
Subject: [MacPerl] MacDialog in color

How do I set the backgrond color of a MacDialog? I tried RGBBackColor()
but that doesn't work; it only affects text boxes.

- -- 
 Kevin Reid: |    Macintosh:      
  "I'm me."  | Think different.
    

===== Want to unsubscribe from this list?
===== Send mail with body "unsubscribe" to macperl-request@macperl.org

------------------------------

Date: Thu, 18 Mar 1999 20:15:26 -0500
From: kpreid@ibm.net (Kevin Reid)
Subject: [MacPerl] 3D Ball - problems

Several people have reported problems with my recently-posted "3D Ball"
program. These problems include:
  * Freeze when pressing the Escape key
  * "Useless use of a constant in void context" an lines 68 & 70
  * Freeze or crash when Control-dragging

I would like to fix these problems, but since I do not experience any of
them, I cannot do so withot more information.

Also, I would rather that problem reports be posted to the list, not
sent directly to me, so people can compare notes.

- -- 
 Kevin Reid: |    Macintosh:      
  "I'm me."  | Think different.
    

===== Want to unsubscribe from this list?
===== Send mail with body "unsubscribe" to macperl-request@macperl.org

------------------------------

Date: Thu, 18 Mar 1999 16:58:21 -0800
From: "Mark Yannuzzi" <myannuzzi@Filss.com>
Subject: [MacPerl] Multiple File Selection

Greetings All:

I am trying to figure out how to retrieve a list of user-selectable files
using a standard file dialog box, but am not having much success.  I have no
trouble getting a single file (StandardGetFile()), or an entire directory of
files (StandardFile::GetFolder() in StandardFile.pl is the simplest way),
but cannot find out how this is done for either a contiguous, or
non-contiguous group of files within a directory.  Has anyone done this?

Thanks In Advance,
Mark

- -------------
Mark Yannuzzi
myannuzzi@aya.yale.edu

===== Want to unsubscribe from this list?
===== Send mail with body "unsubscribe" to macperl-request@macperl.org

------------------------------

Date: Thu, 18 Mar 1999 20:57:33 -0500
From: Chris Nandor <pudge@pobox.com>
Subject: Re: [MacPerl] Multiple File Selection

At 19.58 -0500 1999.03.18, Mark Yannuzzi wrote:
>I am trying to figure out how to retrieve a list of user-selectable files
>using a standard file dialog box, but am not having much success.  I have no
>trouble getting a single file (StandardGetFile()), or an entire directory of
>files (StandardFile::GetFolder() in StandardFile.pl is the simplest way),
>but cannot find out how this is done for either a contiguous, or
>non-contiguous group of files within a directory.  Has anyone done this?

I don't think it is possible.  You need to create your own dialog box, or
use Navigation Services, which comes with Mac OS 8.5 (the Mac::Navigation
module is on the main MacPerl FTP site somewhere).

- --
Chris Nandor          mailto:pudge@pobox.com         http://pudge.net/
%PGPKey = ('B76E72AD', [1024, '0824090B CE73CA10  1FF77F13 8180B6B6'])

===== Want to unsubscribe from this list?
===== Send mail with body "unsubscribe" to macperl-request@macperl.org

------------------------------

Date: Thu, 18 Mar 1999 18:05:13 -0800
From: Tom Holub <tom@ls.berkeley.edu>
Subject: [MacPerl] stat() equivalent for owner, group, mode?

I'm working on a MacPerl script to take a snapshot of an AppleShare IP
server's directory structure (and later do some things with it).  
Part of the information I need is the directory permissions, owner,
and group.  On Unix, of course, I'd just use stat(), and since I have
many Unix scripts which do similar directory traversals, I 
copied the code over from one, with various modifications to path
delimiters and such.

However, I was disappointed to find that stat() doesn't work very well
for the information I need.  The mode always seems to be "16895", no
matter what the sharing permissions are, and the owner and group are
always 0.  

I looked at Mac::Files and a few other modules and didn't see anything
obvious which would provide the information I need.  

So my question is, is there a way to get these three pieces of information
(permissions, owner, and group for a directory on an AppleShare server)
using MacPerl?

- -- 
Tom Holub (tom_holub@LS.Berkeley.EDU)
Letters & Science Computer Resources
154 LeConte Hall (510-642-9069)

===== Want to unsubscribe from this list?
===== Send mail with body "unsubscribe" to macperl-request@macperl.org

------------------------------

Date: Fri, 19 Mar 1999 15:14:40 +1030
From: "Paul McCann" <pmccann@maths.adelaide.edu.au>
Subject: re: [MacPerl] 3D Ball - problems

Hi Kevin,

          On Friday, 19 March 1999 11:45 AM  you wrote:

>Several people have reported problems with my recently-posted "3D Ball"
>program. These problems include:

>  * "Useless use of a constant in void context" an lines 68 & 70

Using "use diagnostics" near the top of the program gave the
following expansion of this.
- -----
(W) You did something without a side effect in a context that does nothing
    with the return value, such as a statement that doesn't return a value
    from a block, or the left side of a scalar comma operator.  Very often
    this points not to stupidity on your part, but a failure of Perl to
 parse    your program the way you thought it would.
- -----

Looking at the code, it seems that this is related to the two lines
that read "3.5+1;" in the following segment:
- -----

use constant WINSIZEH => $ScrnRect->right - $ScrnRect->left; #BOXSIZE *
3.5 + 1;
use constant WINSIZEV => $ScrnRect->bottom - $ScrnRect->top; #BOXSIZE *
3.5 + 1;
use constant WINRECT => new Rect (0, 0, WINSIZEH, WINSIZEV);
- -----

Commenting out these allowed the script to compile (under -w)
without complaint, and also had the (desirable I guess!) side-effect
of changing my frame rate to 200 from about 20. Am I missing
something here? (I'm a novice macperler, and would appreciate
someone explaining what the assignments in question are actually
doing.)

Cheers,
        Paul

===== Want to unsubscribe from this list?
===== Send mail with body "unsubscribe" to macperl-request@macperl.org

------------------------------

Date: Fri, 19 Mar 99 09:43:33 +0200
From: Sean Carte <SeanC@mediatek.co.za>
Subject: Re: [MacPerl] RE: Using AppleEvents with FileMaker Pro

>Well, if  you have MacPerl 5.2.0r4 (and you should), go the Help -> Toolbox
>menu and see the last link, to the Apple Events tutorial.

I read that yesterday. MPPE references it at the end of chapter 18. I 
found it quite daunting, but helpful nevertheless.

>I am working on ways to make dealing with Apple Events much easier (and in
>fact, my Mac::AppleEvents::Simple module goes a long way toward that end),
>with something called Mac::Glue.  In progress.

I followed a link to Mac::AppleEvents::Simple 0.60 from your MacPerl page 
and it took me to a page on CPAN with nothing much in it. Is this right? 

>Also, I wrote an article in The Perl Journal about Apple Events and MacPerl
>(see http://pudge.net/macperl/ for a link to it, as well as links to all my
>other MacPerl and Apple Events stuff, and a more recent version of the
>tutorial mentioned above).

I'm working my way through the article now. It looks good; thanks!

My brain hurts!
SeanC
                     Mediatek Training Institute
           129 Moore Road, Berea, Durban, South Africa
   phone: +27 (0)31 305 4200              SeanC@mediatek.co.za
   fax: +27 (0)31 305 4236                SeanC@dmax.co.za


===== Want to unsubscribe from this list?
===== Send mail with body "unsubscribe" to macperl-request@macperl.org

------------------------------

Date: Fri, 19 Mar 1999 00:10:54 -0800
From: John Abbe <johnca@ourpla.net>
Subject: [MacPerl] Novice trouble with StandardFile

I'm just starting to make use of Mac-ish stuff in MacPerl (heck, I'm 
just starting with Perl, really) and I got this error message from a 
simple (I thought) attempt to open and process a file:

# "" is not exported by the Mac::StandardFile module.
File '...MacPerl Ÿ:lib:Exporter.pm'; Line 111
# "" is not exported by the Mac::StandardFile module.
File '...MacPerl Ÿ:lib:Exporter.pm'; Line 111
# Can't continue after import errors
File 'Dev:Pseudo'; Line 3
# BEGIN failed--compilation aborted.
File '...:John's Fontsize cleaner'; Line 3

MacPerl also opened the Exporter.pm file to these lines:

...
elsif ($sym !~ s/^&// || !$exports{$sym}) {
	warn qq["$sym" is not exported by the $pkg module];
	$oops++;
}
...

This is beyond my deciphering. Here's my Perl (John's Fontsize cleaner):

use Mac::StandardFile
# John's fontsize cleaner
my ($file, @lines, $long_line);

$file = StandardGetFile(); # Ask user for a file

if ($file->sfGood()) {

	# Open the file and join the lines into $long_line
	open (HTMLFILE, $file) or die "What happened?!\n" ;
	@lines = <HTMLFILE>;
	close(HTMLFILE);
	$long_line = join("", @lines);

	$long_line =~ s/<fontsize="+1">(*)<\/font>/$1/gio # This does it

	print $long_line;
} else {
	print "User chose no file.";
}

$file = StandardPutFile(); # Ask user where to save file

if ($file->sfGood()) {
	# Open the file and save it
	open (HTMLFILE, $file) or die "What happened?!\n" ;
	print HTMLFILE $long_line;
	close (HTMLFILE);
} else {
	print "User chose no file.";
}

When I use -w the "my" line generates even more errors, but this 
seems enough to start with.

Thanks,
__John

p.s. If I comment out line 3:
my ($file, @lines, $long_line);

...then I get this error:

# Undefined subroutine &main::StandardGetFile called.
File '...:John's Fontsize cleaner'; Line 5
# BEGIN failed--compilation aborted.
File '...p:John's Fontsize cleaner'; Line 5
- --
 All you  /\/\ John Abbe, Cat Herder johnca      "Imagination is more
     need \  /                       @ourpla.net  important than knowledge."
     is... \/  http://www.ourpla.net/john/                 --Einstein

===== Want to unsubscribe from this list?
===== Send mail with body "unsubscribe" to macperl-request@macperl.org

------------------------------

End of MacPerl-Digest V1 #16
****************************


==== Want to unsubscribe from this list?
==== Send mail with body "unsubscribe" to
==== macperl-digest-request@macperl.org