Re: CGI in Mac Classic (8.6)

2003-06-26 Thread LiangTyan Fui
On 6/26/03 9:25 AM, Alain Farmer [EMAIL PROTECTED] wrote:

 Hello everyone,
 
 I have created dozens of HyperCard-based CGI programs.
 I am good at it. But as you all know HyperCard only
 runs on a Mac and, more to the point, Mac-based CGI
 programs react to the web by handling a particular
 Apple event, e.g. on AppleEvent. And the CGI ends with
 the command reply once the HTML has been built
 line-by-line. My problem is adapting this knowledge to
 MetaCard on the same Mac. This is specifically what I
 need to know:
 
 1. Does MetaCard implement CGIs on a MacOS-Classic
 (8.6) by supporting the same on appleEvent mechanism
 ?
 
 2. Is get appleEvent data with keyword supported?
 
 3. Can I convert my HyperCard-based CGI to a MC-based
 CGI merely by opening my HC-stack with MetaCard?
 
 4. Are there one or more ready-made examples of
 MC-based CGI programs for MacOS-Classic?
 
 5. What is the minimal set of HTTP-response-headers
 that CGIs created with MetaCard 2.4+ are required to
 provide? Btw these headers were not necessary in MC
 2.3, but now they are essential.
 
 Thanks you kindly for any help you may provide me to
 get over this initial hurdle in my mastery of
 MetaCard. I've created an entire GUI with MetaCard
 (e.g. FreeGUI), and I am currently creating three
 blogging stacks (2 clients and a server), but, so far,
 I have not mastered its CGI abilities. Please help me
 ( a fellow altruist who will be sharing his blogging
 stacks with the MC community ).
 
 Regards,
 
 Alain Farmer
 
 PS: A working sample script would be ideal.  :)

Stripped from my very old archive.
You sure you still want to use OS 9 for CGI?

#! master handle here to capture event from WebSTAR
on appleEvent class, eventID, sender
  if class  eventID  WWW‡sdoc then pass appleEvent
  put unpackCGI() into theHTML
  
  reply HTTP/1.0 200 OK crlf \
   Server: MC/2.3 ID/ACGI crlf \
   MIME-Version: 1.0 crlf \
   Content-type: text/html crlf \
   Content-Length:  length(theHTML)  crlf  crlf  theHTML
end appleEvent

function unpackCGI
  # available AppleEvent:
  put 
,kfor,refr,Agnt,Kact,Kapt,post,meth,Kfrq,svnm,svpt,ctyp,Kcid,Kcip into
aeList
  
  put  into theHTML
  repeat for each item aeEvent in aeList
request appleEvent data with keyword aeEvent
put aeEvent = it  cr after theHTML
  end repeat
  
  return theHTML
end unpackCGI


___
metacard mailing list
[EMAIL PROTECTED]
http://lists.runrev.com/mailman/listinfo/metacard


Xavier Bury is out of the office. Original subject: 'Xavier Bury is out ofthe office. Original subject: 'Re: UNIX help?''

2003-06-26 Thread xbury . cs
I will be out of the office starting  26/06/2003 and will not return until
27/06/2003.

I will respond to your message when I return. This or your message is not
forwarded.




Visit us at http://www.clearstream.com
  
IMPORTANT MESSAGE

Internet communications are not secure and therefore Clearstream International does 
not accept legal responsibility for the contents of this message.

The information contained in this e-mail is confidential and may be legally 
privileged. It is intended solely for the addressee. If you are not the intended 
recipient, any disclosure, copying, distribution or any action taken or omitted to be 
taken in reliance on it, is prohibited and may be unlawful. Any views expressed in 
this e-mail are those of the individual sender, except where the sender specifically 
states them to be the views of Clearstream International or of any of its affiliates 
or subsidiaries.

END OF DISCLAIMER
___
metacard mailing list
[EMAIL PROTECTED]
http://lists.runrev.com/mailman/listinfo/metacard


Xavier Bury is out of the office. Original subject: 'Xavier Bury is out ofthe office. Original subject: 'Xavier Bury is out of the office. Originalsubject: 'Re: UNIX help?'''

2003-06-26 Thread xbury . cs
I will be out of the office starting  26/06/2003 and will not return until
27/06/2003.

I will respond to your message when I return. This or your message is not
forwarded.




Visit us at http://www.clearstream.com
  
IMPORTANT MESSAGE

Internet communications are not secure and therefore Clearstream International does 
not accept legal responsibility for the contents of this message.

The information contained in this e-mail is confidential and may be legally 
privileged. It is intended solely for the addressee. If you are not the intended 
recipient, any disclosure, copying, distribution or any action taken or omitted to be 
taken in reliance on it, is prohibited and may be unlawful. Any views expressed in 
this e-mail are those of the individual sender, except where the sender specifically 
states them to be the views of Clearstream International or of any of its affiliates 
or subsidiaries.

END OF DISCLAIMER
___
metacard mailing list
[EMAIL PROTECTED]
http://lists.runrev.com/mailman/listinfo/metacard


Re: CGI in Mac Classic (8.6)

2003-06-26 Thread Robert Brenstein
Alain,

1. Does MetaCard implement CGIs on a MacOS-Classic
(8.6) by supporting the same on appleEvent mechanism
?
yes.

2. Is get appleEvent data with keyword supported?
yes.

3. Can I convert my HyperCard-based CGI to a MC-based
CGI merely by opening my HC-stack with MetaCard?
mostly yes.

4. Are there one or more ready-made examples of
MC-based CGI programs for MacOS-Classic?
yes. see below.

5. What is the minimal set of HTTP-response-headers
that CGIs created with MetaCard 2.4+ are required to
provide? Btw these headers were not necessary in MC
2.3, but now they are essential.
A need for header is a function of the web server program. When using 
MacHTTP, for example, one may include headers but things work without 
them as well. But including header is trivial. The min header is:

HTTP/1.0 200 OK  crlf  Server: MacHTTP  crlf  MIME-Version: 
1.0  crlf  Content-type: text/html  crlf  crlf

PS: A working sample script would be ideal.  :)
You can have more than a script -- a complete startup project -- if 
you bother to go to

http://www.robelko.com/metacard/starter-cgi.html

This haven't been updated since MC 2.3 days but should work with only 
minor adjustments.

Robert Brenstein
___
metacard mailing list
[EMAIL PROTECTED]
http://lists.runrev.com/mailman/listinfo/metacard


Xavier Bury is out of the office. Original subject: 'Xavier Bury is out ofthe office. Original subject: 'Xavier Bury is out of the office. Originalsubject: 'Xavier Bury is out of the office. Original subject: 'Re: UNIXhelp?''''

2003-06-26 Thread xbury . cs
I will be out of the office starting  26/06/2003 and will not return until
27/06/2003.

I will respond to your message when I return. This or your message is not
forwarded.




Visit us at http://www.clearstream.com
  
IMPORTANT MESSAGE

Internet communications are not secure and therefore Clearstream International does 
not accept legal responsibility for the contents of this message.

The information contained in this e-mail is confidential and may be legally 
privileged. It is intended solely for the addressee. If you are not the intended 
recipient, any disclosure, copying, distribution or any action taken or omitted to be 
taken in reliance on it, is prohibited and may be unlawful. Any views expressed in 
this e-mail are those of the individual sender, except where the sender specifically 
states them to be the views of Clearstream International or of any of its affiliates 
or subsidiaries.

END OF DISCLAIMER
___
metacard mailing list
[EMAIL PROTECTED]
http://lists.runrev.com/mailman/listinfo/metacard


Xavier Bury is out of the office. Original subject: 'Xavier Bury is out ofthe office. Original subject: 'Xavier Bury is out of the office. Originalsubject: 'Xavier Bury is out of the office. Original subject: 'XavierBury is out of the office. Original subject: 'Re: UNIX help?'''''

2003-06-26 Thread xbury . cs
I will be out of the office starting  26/06/2003 and will not return until
27/06/2003.

I will respond to your message when I return. This or your message is not
forwarded.




Visit us at http://www.clearstream.com
  
IMPORTANT MESSAGE

Internet communications are not secure and therefore Clearstream International does 
not accept legal responsibility for the contents of this message.

The information contained in this e-mail is confidential and may be legally 
privileged. It is intended solely for the addressee. If you are not the intended 
recipient, any disclosure, copying, distribution or any action taken or omitted to be 
taken in reliance on it, is prohibited and may be unlawful. Any views expressed in 
this e-mail are those of the individual sender, except where the sender specifically 
states them to be the views of Clearstream International or of any of its affiliates 
or subsidiaries.

END OF DISCLAIMER
___
metacard mailing list
[EMAIL PROTECTED]
http://lists.runrev.com/mailman/listinfo/metacard


Re: UNIX help?

2003-06-26 Thread Sadhunathan Nadesan
|5. UNIX help? (Richard MacLemale)


Perhaps it would be instructive to see a cgi script that is working?
BTW, this is an old one, I now collect the post data in a loop, since
we found we'd sometimes not get all the data.  However, this should work
for a form that is not too long.

You will of course have to replace my qmail command with a sendmail
equivalent.  

Sadhu


#!/usr/local/bin/mc
#*
#
#-= Web Stuff =-
#
# Program name: form.mt
# Version number:   1.0
# Author:   SN
# Date: 10/9/01
# Description:  Process web form messages
# 
# 
#

on startup

  -- collect the information from the form
  read from stdin until empty
  put it into url file:/tmp/itdata.txt
  put urlDecode (it)  into formdata
  split formdata by  and =

  -- email the form contents to the user
  put formdata into url file:/tmp/formdata.txt
  put /var/qmail/bin/qmail-inject '$EMAIL'  /tmp/formdata.txt \
into command_string
  replace $EMAIL with formdata[email] in command_string
  set shellCommand to /bin/sh
  put shell(command_string)

  -- respond to the user
  put Content-Type: text/plain  cr  cr
  put Your information is below  cr
  put command_string
  put keys(formdata) into keywords
  repeat for each line this_item in keywords
put this_item  =  formdata[this_item]  cr
  end repeat

end startup

___
metacard mailing list
[EMAIL PROTECTED]
http://lists.runrev.com/mailman/listinfo/metacard


Xavier Bury is out of the office. Original subject: 'Xavier Bury is out ofthe office. Original subject: 'Xavier Bury is out of the office. Originalsubject: 'Xavier Bury is out of the office. Original subject: 'XavierBury is out of the office. Original subject: 'Xavier Bury is out of theoffice. Original subject: 'Re: UNIX help?''''''

2003-06-26 Thread xbury . cs
I will be out of the office starting  26/06/2003 and will not return until
27/06/2003.

I will respond to your message when I return. This or your message is not
forwarded.




Visit us at http://www.clearstream.com
  
IMPORTANT MESSAGE

Internet communications are not secure and therefore Clearstream International does 
not accept legal responsibility for the contents of this message.

The information contained in this e-mail is confidential and may be legally 
privileged. It is intended solely for the addressee. If you are not the intended 
recipient, any disclosure, copying, distribution or any action taken or omitted to be 
taken in reliance on it, is prohibited and may be unlawful. Any views expressed in 
this e-mail are those of the individual sender, except where the sender specifically 
states them to be the views of Clearstream International or of any of its affiliates 
or subsidiaries.

END OF DISCLAIMER
___
metacard mailing list
[EMAIL PROTECTED]
http://lists.runrev.com/mailman/listinfo/metacard


Re: Xavier Bury is out of the office...

2003-06-26 Thread Craig Spooner
I guess Xavier's absence is THE hot topic of discussion!  I'd better look 
into it... ;-)
Craig



Today's Topics:
snip

8. Xavier Bury is out of the office. Original subject: 'Xavier Bury is out of
   the office. Original subject: 'Xavier Bury is out of the office. 
Original
   subject: 'Xavier Bury is out of the office. Original subject: 'Xavier
   Bury is out of the office. Original subject: 'Xavier Bury is out 
of the
   office. Original subject: 'Re: UNIX help?'' 
([EMAIL PROTECTED])
___
metacard mailing list
[EMAIL PROTECTED]
http://lists.runrev.com/mailman/listinfo/metacard


Put URL Progress?

2003-06-26 Thread Scott Rossi
Is there a way to get/monitor the K downloaded when using the method put
url DATA1 into url DATA2?

I know this possible using libURL and libUrlFtpUpload, but how about put
url?

Thanks  Regards,

Scott Rossi
Creative Director
Tactile Media, Multimedia  Design
-
E: [EMAIL PROTECTED]
W: http://www.tactilemedia.com

___
metacard mailing list
[EMAIL PROTECTED]
http://lists.runrev.com/mailman/listinfo/metacard


Re: CGI in Mac Classic (8.6)

2003-06-26 Thread Alain Farmer
Hello everyone,

I am currently experimenting with MacOS-Classic CGIs.
I want to thank Liang Tyan and Robert for their help.
The *script* provided in Liang Tyan's reply was
particularly useful to me. I've got a MC-based CGI now
running on my server. Awesome! :))

New problem : so far, the CGI only works when the
client is a web-browser. When the client is a MetaCard
stack it become buggy. When the version of the
client-side stack is 2.4 then nothing happens. No
error dialogs, but also no results whatsoever. When
the version of the client-side stack is 2.5 then it
does was it is supposed to, but only on the *first*
try. On subsequent tries with v2.5, MC says error :
previous request not completed. I wait a while, and a
socket timeout dialog appears ... everytime!!!  What
is going on ???

Inference : It seems like a socket is being remaining
open that needs to be closed. This is not something we
would normally need to attend to when we're using
simple syntax like put url myURL. Therefore, I
believe that it is a BUG [for MacOS-Classic]. I hope
I'm wrong and that there is something simple that I am
overlooking.

Help!

Alain Farmer

__
Do you Yahoo!?
SBC Yahoo! DSL - Now only $29.95 per month!
http://sbc.yahoo.com
___
metacard mailing list
[EMAIL PROTECTED]
http://lists.runrev.com/mailman/listinfo/metacard


Card copy problems

2003-06-26 Thread Norval Bard
Hi,

I have a mainstack containing  4 substacks:  3 tests and one stack to
collect the results from the tests.  The reporting of the results is done by
copying a card detailing a respondent's answers from one of the three tests
back to the results substack (simple script: copy cd X of stack Y to stack
Z, save all).  

The problem I'm having is that immediately following the testing session, I
will occasionally do a quick check to see if the records have been properly
copied and 'stored' in the results stack.  Let's say that there are five
respondents for a given session, and I can see all five of their test
results.  All is fine--or appears to be--but then later, after having quit
the program and come back to it, I am finding that only one new record
(card) has actually been copied and saved to the results stack.

 I  don' t get it: it's always ONE card.  If the stack were locked or could
not be saved then why is one card being copied and saved?  Why am I able to
see all the copied cards when I navigate through the stack immediately
following the test, only to lose them later?  The curious link seems to be
the quitting of the program.I am running mc2.3.2 on Win2K machines.

Any suggestions?  Thanks in advance,  I' ve been kinda pulling my hair out
on this one...

Norval

___
metacard mailing list
[EMAIL PROTECTED]
http://lists.runrev.com/mailman/listinfo/metacard


RE: Put URL Progress?

2003-06-26 Thread Chipp Walters
Hi Scott,

It seems to me that the PUT URL is by nature a blocking command, and
therefore not able to be 'multi-tasked'. In otherwords, the handler stops
and waits for a result before proceeding. You might check with Dave on this,
but my thinking is 'not possible in libURL' -- course I could be wrong.

Of course, you could 'roll your own' if you wanted to.

-Chipp

 -Original Message-
 From: [EMAIL PROTECTED]
 [mailto:[EMAIL PROTECTED] Behalf Of Scott Rossi
 Sent: Thursday, June 26, 2003 3:30 PM
 To: [EMAIL PROTECTED]
 Subject: Put URL Progress?


 Is there a way to get/monitor the K downloaded when using the method put
 url DATA1 into url DATA2?

 I know this possible using libURL and libUrlFtpUpload, but how about put
 url?

 Thanks  Regards,

 Scott Rossi
 Creative Director
 Tactile Media, Multimedia  Design
 -
 E: [EMAIL PROTECTED]
 W: http://www.tactilemedia.com

 ___
 metacard mailing list
 [EMAIL PROTECTED]
 http://lists.runrev.com/mailman/listinfo/metacard



___
metacard mailing list
[EMAIL PROTECTED]
http://lists.runrev.com/mailman/listinfo/metacard


Fun with Large Fonts

2003-06-26 Thread Richard Gaskin
In Microsoft operating systems the user can set the default font size for
controls, window titles, etc.   According to the spec, an application should
respond by querying the registry to get the current font metrics and adjust
all controls to match the formatted width and height.  If controls overlap
as a result of this resizing, the window should be enlarged too accomodate
them.

That's a lot of work, and for little benefit:  by the time the controls are
resized to accomodate the text and the window is resized to accomodate the
controls, the result is not much different from simply lowering the
resolution of the monitor.

But here's the punchline:  this setting is set in the Display control panel,
which in XP ignores the font size settings altogether. ;)

So my question for you folks is:  Do any of you know if this is a bug in
XP's Display control panel, or is Microsoft now telling us we can also
ignore the Large Fonts setting?

-- 
 Richard Gaskin 
 Fourth World Media Corporation
 Developer of WebMerge 2.2: Publish any database on any site
 ___
 [EMAIL PROTECTED]   http://www.FourthWorld.com
 Tel: 323-225-3717   AIM: FourthWorldInc

___
metacard mailing list
[EMAIL PROTECTED]
http://lists.runrev.com/mailman/listinfo/metacard