Chipp Walters | 1 Mar 01:23 2007

Re: like pass, but without ending the handler

Thanks Jim,

I assume Python can open sockets back and forth, but there's really
not enough information about the apps implementation of it to bother.
The text files work well and are easy to debug. Plus, as a 3D app,
execution speed isn't critical.

best,
Chipp
_______________________________________________
use-revolution mailing list
use-revolution@...
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution

Chipp Walters | 1 Mar 01:22 2007

Re: like pass, but without ending the handler

Here's what I ended up with..Seems to work fine and I don't see any
increase in processor usage on XP.

Script of btn 1 (the "test" button)

on mouseUp
  answer getThing()
end mouseUp

function getThing
  repeat forever
    wait 100 millisecs with messages
    if there is a file "C:/test.txt" then
      put URL ("file:C:/test.txt") into tResult
      delete file "C:/test.txt"
      beep
      exit repeat
    end if
  end repeat
  return tResult
end getThing

Script of btn 2 (the "stop now" button)

on mouseUp
  put "stop Now" into URL("file:C:/test.txt")
end mouseUp
_______________________________________________
use-revolution mailing list
use-revolution@...
(Continue reading)

Shao Sean | 1 Mar 01:45 2007

Re: If statements vs case

> Sorry, what do you mean that IF-ELSE-IF is always evaluated?

If you have a 20 line nested IF-ELSE-IF statement and the one that 
matches your current situation is the 20th one, the previous 19 are 
evaluated (thankfully Rev uses some short-circuited methods to speed it 
up)

In a SWITCH statement the engine/compiler converts the CASE statements 
into a hashed lookup table (think fast) and as such when the SWITCH 
statement is evaluated it just quickly looks up the code to run in the 
hash table.

As I mentioned in my first posting, if you're only using the IF-ELSE-IF 
statement a few times, you don't have to wait for the SWITCH lookup 
table to be hashed (adding overhead the first time a SWITCH statement 
is called)

Also mentioned in my first posting, how much of this applies to 
Revolution in general only they know, as Revolution allows you to some 
weird things with the SWITCH statements that you couldn't do in other 
languages (apparently a lot of languages the result of the SWITCH 
statement can only be an integer)

-Sean

_______________________________________________
use-revolution mailing list
use-revolution@...
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution
(Continue reading)

Jim Ault | 1 Mar 01:52 2007
Picon

Re: like pass, but without ending the handler

Good.
I use text files, too, in part of my scheme since they work very well as
long as split second speed and response is not a issue.

Jim Ault
Las Vegas

On 2/28/07 4:23 PM, "Chipp Walters" <chipp@...> wrote:

> Thanks Jim,
> 
> I assume Python can open sockets back and forth, but there's really
> not enough information about the apps implementation of it to bother.
> The text files work well and are easy to debug. Plus, as a 3D app,
> execution speed isn't critical.
> 
> best,
> Chipp

_______________________________________________
use-revolution mailing list
use-revolution@...
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution

Sieg Lindstrom | 1 Mar 02:32 2007

basic standalone question

I've got a stack including scripts that write text data to fields in the
stack. Then, if I'm running the stack using StackRunner, for example, on
closeStack the stack gets saved so that any updates to text fields are
reflected the next time a user opens the stack.

With a standalone app version of a stack is there a way to update text
fields in the stack and not lose the changes when one closes it? If so, how?
Thanks in advance.

Sieg Lindstrom

_______________________________________________
use-revolution mailing list
use-revolution@...
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution

Hershel Fisch | 1 Mar 02:33 2007
Picon

Re: If statements vs case

On 2/28/07 7:45 PM, "Shao Sean" <shaosean@...> wrote:
Thanks a mill
Hershel

>> Sorry, what do you mean that IF-ELSE-IF is always evaluated?
> 
> If you have a 20 line nested IF-ELSE-IF statement and the one that
> matches your current situation is the 20th one, the previous 19 are
> evaluated (thankfully Rev uses some short-circuited methods to speed it
> up)
> 
> In a SWITCH statement the engine/compiler converts the CASE statements
> into a hashed lookup table (think fast) and as such when the SWITCH
> statement is evaluated it just quickly looks up the code to run in the
> hash table.
> 
> As I mentioned in my first posting, if you're only using the IF-ELSE-IF
> statement a few times, you don't have to wait for the SWITCH lookup
> table to be hashed (adding overhead the first time a SWITCH statement
> is called)
> 
> Also mentioned in my first posting, how much of this applies to
> Revolution in general only they know, as Revolution allows you to some
> weird things with the SWITCH statements that you couldn't do in other
> languages (apparently a lot of languages the result of the SWITCH
> statement can only be an integer)
> 
> -Sean
> 
> _______________________________________________
(Continue reading)

Sarah Reichelt | 1 Mar 04:59 2007
Picon

Re: like pass, but without ending the handler

On 3/1/07, Chipp Walters <chipp@...> wrote:
> Here's what I ended up with..Seems to work fine and I don't see any
> increase in processor usage on XP.
>
> Script of btn 1 (the "test" button)
>
> on mouseUp
>   answer getThing()
> end mouseUp
>
> function getThing
>   repeat forever
>     wait 100 millisecs with messages
>     if there is a file "C:/test.txt" then
>       put URL ("file:C:/test.txt") into tResult
>       delete file "C:/test.txt"
>       beep
>       exit repeat
>     end if
>   end repeat
>   return tResult
> end getThing
>
> Script of btn 2 (the "stop now" button)
>
> on mouseUp
>   put "stop Now" into URL("file:C:/test.txt")
> end mouseUp
> __________________

(Continue reading)

Sarah Reichelt | 1 Mar 05:10 2007
Picon

Re: basic standalone question

On 3/1/07, Sieg Lindstrom <sl@...> wrote:
> I've got a stack including scripts that write text data to fields in the
> stack. Then, if I'm running the stack using StackRunner, for example, on
> closeStack the stack gets saved so that any updates to text fields are
> reflected the next time a user opens the stack.
>
> With a standalone app version of a stack is there a way to update text
> fields in the stack and not lose the changes when one closes it? If so, how?
> Thanks in advance.
>
>

You might find this article useful
<http://www.revjournal.com/tutorials/saving_data_in_revolution.html>

Cheers,
Sarah
_______________________________________________
use-revolution mailing list
use-revolution@...
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution

Chipp Walters | 1 Mar 06:30 2007

Re: like pass, but without ending the handler

Thanks Sarah, will do.
_______________________________________________
use-revolution mailing list
use-revolution@...
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution

Chipp Walters | 1 Mar 06:32 2007

Re: like pass, but without ending the handler

So, for posterity's sake here's the final.

Here's what I ended up with..Seems to work fine and I don't see any
increase in processor usage on XP.

Script of btn 1 (the "test" button)

on mouseUp
  answer getThing()
end mouseUp

function getThing
 repeat forever
   wait 100 millisecs with messages
   if there is a file "C:/test.txt" then
     put URL ("file:C:/test.txt") into tResult
     if tResult is empty then next repeat
     delete file "C:/test.txt"
     beep
     exit repeat
   end if
 end repeat
  return tResult
end getThing

Script of btn 2 (the "stop now" button)

on mouseUp
  put "stop Now" into URL("file:C:/test.txt")
end mouseUp
(Continue reading)


Gmane