RE: Two handlers sharing time

2001-12-18 Thread Jeanne A. E. DeVoto

At 2:21 PM -0800 12/18/2001, Chipp Walters wrote:
>What does "with messages" do? And why can't I find the "with" or "without"
>words in the transcript dictionary? And what does "without" do? I understand
>the English syntax, but not the transcript.

(Look in the entry for the "wait" command.)

--
Jeanne A. E. DeVoto ~ [EMAIL PROTECTED]
http://www.runrev.com/
Runtime Revolution Limited - Power to the Developer!


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



Re: Two handlers sharing time

2001-12-18 Thread Geoff Canyon

At 3:19 PM -0500 12/18/01, Shari wrote:
>Is it possible to have handlers share time?  So that when it is idle, the second 
>handler runs?
>
>I have a very lengthy handler, that does certain things, calls other handlers, and 
>they in turn call other handlers.  This sets up the data for the user.
>
>As it takes more than a few seconds, I've created things for the user to "do" while 
>waiting.

One way to accomplish something like this is to break the setup task into individual 
steps (the smaller the better) and then do something like:

global gSetupDone

on setup
  put false into gSetupDone
  doSetupStep 1
end setup

on doSetupStep pWhichStep
  switch pWhichStep
  case 1
blah blah
break
  case 2
blah blah
break
  ...
  case 32 -- last step
put true into gSetupDone
  end switch
  if not gSetupDone then 
send ("doSetupStep" && (pWhichStep + 1)) to me in 1 millisecond
  end if
end doSetupStep

What this will do is process your setup just about as fast as if it were all done at 
once, but automatically put the process on hold for anything the user does. Note that 
you can't break a task up any way you like -- each time through the doSetupStep is a 
different execution, so local variables are lost, loops or branches that go across the 
separate cases would fail, etc.

You should try to break the setup task into steps that will take no more than .1 
seconds each on a medium-speed computer. That way the user will never feel that the 
system is unresponsive.

regards,

Geoff

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



Re: Two handlers sharing time

2001-12-18 Thread Scott Rossi

Recently, Shari wrote:

> This is a level game.  When you enter a new level, it sets up a
> random level.  One of the most time consuming tasks is that it
> randomly places a number of objects on the gameboard.  It must check
> to make sure the object doesn't overlap any other objects, and if it
> does, move it to a new location.

Are you physically checking the locations of placed objects?  Because it
would be a lot more efficient to compare values of where objects *will* be
placed (meaning before they are placed) rather than checking the locations
after the fact and repositioning them.


> I tried 8 ways to Sunday to make this happen in a matter of seconds,
> but it simply doesn't.  And if it isn't instantaneous, something
> needs to occupy the player.

Usually, this is what a progress bar or meter is for.  Computer users expect
this type of feedback when they have to wait (witness the person who
downloads a 10MB file over a 28.8 dialup connection).  In the context of a
game, you can make all manner of cool progress bars that can be entertaining
to watch and occupy the user while they wait.


> The idea I came up with to keep the user busy while the level is
> being set up, I am very happy with this, and consider it a very good
> addition to the game overall.

It may be a great idea, but any extra processing you do will probably add to
the overall time needed to complete the level.  My suggestions were really
just intended to save you some work -- it sounds like you have a lot going
on.

Regards,

Scott

_
Scott Rossi   Tactile Media - Multimedia & Design
Creative Director Email: [EMAIL PROTECTED]
  Web: http://www.tactilemedia.com

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



Re: Two handlers sharing time

2001-12-18 Thread Scott Rossi

Recently, Chipp Walters wrote:

> What does "with messages" do? And why can't I find the "with" or "without"
> words in the transcript dictionary? And what does "without" do? I understand
> the English syntax, but not the transcript. thanks,

Normally, the wait command causes script processing to stop until the
designated condition is reached.  Adding "with messages" halts the
*currently running* script and allows processing of scripts from other
objects (mouse clicks, scrolls, etc) to take place, until the wait condition
is met.

The basic move command causes the *currently running* script to stop
processing until the move is complete (though scripts from other controls
can run during the move).  Adding "without waiting" allows the current
script to continue while the move is taking place.

I don't have the TranScript docs so I don't know if these items aren't
documented.  If the above descriptions are not accurate, I'm sure someone
will chime in.

Regards,

Scott

_
Scott Rossi   Tactile Media - Multimedia & Design
Creative Director Email: [EMAIL PROTECTED]
  Web: http://www.tactilemedia.com

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



Re: Two handlers sharing time

2001-12-18 Thread Shari

>The efficiency of this may be questionable depending on what's being
>processed.  It would help to know what you're doing when setting up data
>that takes long enough to justify preoccupying the user.

This is a level game.  When you enter a new level, it sets up a 
random level.  One of the most time consuming tasks is that it 
randomly places a number of objects on the gameboard.  It must check 
to make sure the object doesn't overlap any other objects, and if it 
does, move it to a new location.

I tried 8 ways to Sunday to make this happen in a matter of seconds, 
but it simply doesn't.  And if it isn't instantaneous, something 
needs to occupy the player.

The idea I came up with to keep the user busy while the level is 
being set up, I am very happy with this, and consider it a very good 
addition to the game overall.

Unfortunately, while the user can see the busy work, he can't do 
anything with it until the level is complete.  Basically the user 
will be typing text in a field, or clicking on buttons.  I will 
experiment with an idle handler or a send handler to see if I can 
coax them to coexist.

-- 
--Shareware Games for the Mac--
http://www.gypsyware.com
http://www.gypsygames.com

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



RE: Two handlers sharing time

2001-12-18 Thread Chipp Walters

Scott,

What does "with messages" do? And why can't I find the "with" or "without"
words in the transcript dictionary? And what does "without" do? I understand
the English syntax, but not the transcript. thanks,

Chipp

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]On Behalf Of Scott Rossi
Sent: Tuesday, December 18, 2001 2:43 PM
To: [EMAIL PROTECTED]
Subject: Re: Two handlers sharing time


Recently, Shari wrote:

> Is it possible to have handlers share time?  So that when it is idle,
> the second handler runs?
>
> I have a very lengthy handler, that does certain things, calls other
> handlers, and they in turn call other handlers.  This sets up the
> data for the user.
>
> As it takes more than a few seconds, I've created things for the user
> to "do" while waiting.
>
> Is there a built in way for the main handler that sets up the data,
> to pause if the user wants to do something while it's running?  And
> then start back up where it left off the minute the user isn't doing
> anything?

I don't believe MC permits simultaneous running of multiple scripts.

That being said, some events can be run while other messages are processed.
Wait and move are a couple of examples.

  wait until x = 5 with messages

  move grc 1 rel 0,100 without waiting

One way to do what you want might be to place "checkpoints" in your main
handler to check for activity or property/variable change in the second
handler.  A simple example:

# IN THE STACK...
on mainHander
  attentionCheck
  #doStuff1
  #doStuff2
  attentionCheck
  #doStuff3
  #doStuff4
  attentionCheck
  #doStuff5
  #doStuff6
end mainHandler

on attentionCheck
  if the userNeedsAttention of me then \
 wait until not the userNeedsAttention of me with messages
end attentionCheck


# IN A BUTTON OR OTHER CONTROL ACCESSIBLE BY THE USER...
on mouseDown
  set the userNeedsAttention of this stack to true
  # doUserStuff
end mouseDown

The efficiency of this may be questionable depending on what's being
processed.  It would help to know what you're doing when setting up data
that takes long enough to justify preoccupying the user.

Regards,

Scott

_
Scott Rossi   Tactile Media - Multimedia & Design
Creative Director Email: [EMAIL PROTECTED]
  Web: 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



Re: mailTo problems

2001-12-18 Thread Ken Ray

Hugh,

You're right. I can only get this to work reliably with Outlook (not Outlook
Express or Eudora). You may need to use DDE to communicate with an already
running application. I believe Tuviah's external collection has a DLL that
will let you use DDE with other applications. The link is:

http://www.xworlds.com/metacard/contributorfiles/ext10final.sit

Once you get this to work, please post your final results so others can see
how you did it.

Thanks,


Ken Ray
Sons of Thunder Software
Email: [EMAIL PROTECTED]
Web Site: http://www.sonsothunder.com/

- Original Message -
From: "Hugh Senior" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, December 17, 2001 2:20 PM
Subject: Re: mailTo problems


> Hi Ken,
>
> >put queryRegistry("HKEY_CLASSES_ROOT\mailto\shell\open\command\") into
> >tMailApp
> >if (quote & "%1" & quote) is in tMailApp
> >then replace quote & "%1" & quote with tMailTo in tMailApp
> >if "%1" is in tMailApp then replace "%1" with tMailTo in tMailApp
> >open process tMailApp for neither
>
> I did try this but I'm afraid it didn't work either, leastways on win2000.
> If Eudora is already launched, it brings it to the front (but no new
> message is created). Otherwise nada, except a 'process already open'
error.
>
> This is becoming a nightmare! Looks like we cannot launch an email from
mc.
>
> Does anyone know what handler Revolution uses, and more importantly
whether
> it works or not?
>
>
> /H
>






>
> ---
> Outgoing mail is certified Virus Free.
> Checked by AVG anti-virus system (http://www.grisoft.com).
> Version: 6.0.306 / Virus Database: 166 - Release Date: 04/12/2001
>

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



Re: Two handlers sharing time

2001-12-18 Thread Scott Rossi

Recently, Shari wrote:

> Is it possible to have handlers share time?  So that when it is idle,
> the second handler runs?
> 
> I have a very lengthy handler, that does certain things, calls other
> handlers, and they in turn call other handlers.  This sets up the
> data for the user.
> 
> As it takes more than a few seconds, I've created things for the user
> to "do" while waiting.
> 
> Is there a built in way for the main handler that sets up the data,
> to pause if the user wants to do something while it's running?  And
> then start back up where it left off the minute the user isn't doing
> anything?

I don't believe MC permits simultaneous running of multiple scripts.

That being said, some events can be run while other messages are processed.
Wait and move are a couple of examples.

  wait until x = 5 with messages
 
  move grc 1 rel 0,100 without waiting

One way to do what you want might be to place "checkpoints" in your main
handler to check for activity or property/variable change in the second
handler.  A simple example:

# IN THE STACK...
on mainHander
  attentionCheck
  #doStuff1
  #doStuff2
  attentionCheck
  #doStuff3
  #doStuff4
  attentionCheck
  #doStuff5
  #doStuff6
end mainHandler

on attentionCheck
  if the userNeedsAttention of me then \
 wait until not the userNeedsAttention of me with messages
end attentionCheck


# IN A BUTTON OR OTHER CONTROL ACCESSIBLE BY THE USER...
on mouseDown
  set the userNeedsAttention of this stack to true
  # doUserStuff
end mouseDown

The efficiency of this may be questionable depending on what's being
processed.  It would help to know what you're doing when setting up data
that takes long enough to justify preoccupying the user.

Regards,

Scott

_
Scott Rossi   Tactile Media - Multimedia & Design
Creative Director Email: [EMAIL PROTECTED]
  Web: http://www.tactilemedia.com

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



Two handlers sharing time

2001-12-18 Thread Shari

Is it possible to have handlers share time?  So that when it is idle, 
the second handler runs?

I have a very lengthy handler, that does certain things, calls other 
handlers, and they in turn call other handlers.  This sets up the 
data for the user.

As it takes more than a few seconds, I've created things for the user 
to "do" while waiting.

Is there a built in way for the main handler that sets up the data, 
to pause if the user wants to do something while it's running?  And 
then start back up where it left off the minute the user isn't doing 
anything?

-- 
--Shareware Games for the Mac--
http://www.gypsyware.com
http://www.gypsygames.com

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



Re: configuration file

2001-12-18 Thread Pierre Sahores

David Frank a écrit :
> 
> I am using Machttp as the Web server, trying to get
> Metacard's survey.mt script to run in the cgi-bin
> folder, which also contains the Metacard Mac
> application. On the client side I've downloaded the
> Survey stack, and have edited the script of the Post
> button to my URL.  What comes back to the stack is the
> script itself, not the results of running the script's
> instructions.
> 
> I have a feeling I need a line in the configuration
> file to identify that MC is to be called up by the
> script. From the default config. file I learn:
> #These lines define the suffix and file type mappings
> for MIME types.
> #The syntax is creator> 
> #Some examples from the config file are:
> TEXT.HTML TEXT * text/html
> BINARY  .GIF  GIFf * image/gif
> CGI .CGI APPL * text/html
> ACGI .ACGI APPL * text/html
> SCRIPT  .SCRIPT TEXT * text/html
> SCRIPT  * TEXT ToyS text/html
> 
> I've tried several configurations but nothing works,
> if in fact that is the problem. Does anyone have any
> suggestions?
> 
> Dave
> 
> __
> Do You Yahoo!?
> Check out Yahoo! Shopping and Yahoo! Auctions for all of
> your unique holiday gifts! Buy at http://shopping.yahoo.com
> or bid at http://auctions.yahoo.com
> ___
> metacard mailing list
> [EMAIL PROTECTED]
> http://lists.runrev.com/mailman/listinfo/metacard

Hi David,

If you need an example about how Hypercard/Metacard speaks to webstar
trough appleevents, get and hack the "HCACGI.cpt.bin" file i posted,
long times ago, to .

Regards, Pierre Sahores

WEB & VPN applications & databases servers
Inspection académique de Seine-Saint-Denis
Qualifier & produire l'avantage compétitif
___
metacard mailing list
[EMAIL PROTECTED]
http://lists.runrev.com/mailman/listinfo/metacard



Re: configuration file

2001-12-18 Thread Robert Brenstein

>I am using Machttp as the Web server, trying to get
>Metacard's survey.mt script to run in the cgi-bin
>folder, which also contains the Metacard Mac
>application. On the client side I've downloaded the
>Survey stack, and have edited the script of the Post
>button to my URL.  What comes back to the stack is the
>script itself, not the results of running the script's
>instructions.

David, the MC instructions about .mt scripts apply only to Unix. You 
are using Macintosh where the MacHTTP and your stack communicate via 
AppleEvents. You need to add an applevent (on applevent 
type,class,sender) handler and filter incoming events for web events 
using the type and class info. If you run your stack as a stack under 
MC, you also need to front end your appleevent handler to ensure that 
it is your stack that processes it.

I have currently a database online with MC as a cgi and MacHTTP as 
the web server, and it all works just dandy. If you need an example 
of an event handler or has some specific questions, write me off the 
list.

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