Screen refresh problems in OS X

2006-04-11 Thread Jim Hurley
Unfortunately the planned fix for the refresh problem in OS X will 
have to await a later update. The fix had repercussion elsewhere in 
2.7.1 (fields particularly) and so we will have to await 2.7.2.


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


Re: Runtime Revolution Ships Revolution Media; Announce Revolution Forums

2006-04-09 Thread Jim Hurley


Message: 22
Date: Sat, 08 Apr 2006 17:52:17 -0700
From: Jim Ault [EMAIL PROTECTED]
(Snip)
Meander thru the book store, look at the shelves and see the impact those
names have... a variety of reactions, I would imagine.  The C++ primer as
thick as your arm.

Now imagine Revolution snuggled between them in alphabetical order...
Revolution in 21 Days
Revolution Bible
Revolution Cross-Platform Made-Easy
Rev Desktop Reference
Revolution for Network Administrators
Revolution Externals Handbook
Revolution-ize Your Office
Eye-popping Rev Interfaces

Revolution for Dummies (which is when you know you have finally arrived)

Jim Ault
Las Vegas



Brilliant!

We need to put out a Revolution for Dummies. Maybe Dan would 
consider a re-write. He could do it in Transcript--I mean Revolution:


Put Revolution at the speed of thought into tText
replace Transcript with Revolution in tText
revPrintText tText

We haven't arrived, but people would think we have, and perception 
trumps reality.


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


Re: Revolution is very slow to refresh fields. How can I speed it up?

2006-04-06 Thread Jim Hurley


Message: 26
Date: Thu, 30 Mar 2006 02:12:00 +0100
From: Eric Colvin [EMAIL PROTECTED]
Subject: Revolution is very slow to refresh fields.  How can I speed
it up?
To: use-revolution@lists.runrev.com
Message-ID: [EMAIL PROTECTED]
Content-Type: text/plain;   charset=ISO-8859-1

I¼ve just started playing with Revolution ‚ having been a passionate
enthusiast for Hypercard in a previous life.

One thing I¼ve hit upon early on that annoys me a little.  Though Revolution
is far newer, and loads into memory rather than writing to disk, it is still
way slower at certain things ‚ such as refreshing text fields ‚ than
Hypercard ever was.

I wrote the following counting routine (as a speed test to measure the
difference between writing to a variable and writing to a field).  However,
what I learned was that ‚ on my computer, at any rate ‚ Revolution only
refreshes its text fields slightly more than once a second. When I run the
same script on Hypercard, the counting field whirs through changes faster
than a gas pump - with every new number registered on screen.  Revolution
only shows me about one figure in every twenty five or so ‚ despite the fact
that the routine tells the field to display every consecutive number from 1
to 300.

Just add this script to a locked text field, and click on it, to see what
I¼m talking about:

on mouseup
  -- COUNT TO 300
  put the ticks into startTime
  repeat with i = 1 to 300
put 1 + line 1 of me into line 1 of me
  end repeat
  put the ticks - starttime into stopTime1
  put stopTime1 into word 1 of line 3 of me
  put the ticks into startTime
  put me into testVar

  -- NOW JUST SHOW MULTIPLES OF TEN
  repeat with i = 1 to 300
put 1 + line 2 of testVar into line 2 of testVar
if i mod 10 = 0 then put line 2 of testVar into line 2 of me
  end repeat
  put line 2 of testVar into line 2 of me
  put the ticks - startTime into stopTime2
  put stopTime1   :   stopTime2 into line 3 of me
end mouseup



Eric,

You didn't mention what operating system you are 
using. If it is OS X then check the following (in 
the message box):


   go stack url http://home.infostations.net/jhurley/DisplayProblemsOSX.rev;

Mark Waddingham says that this screen refresh 
issue will be address in the next upgrade. In the 
meantime you might insert unlock screen or 
wait 0 millisec


Jim

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


Re: Draw spokes on a wheel

2006-03-18 Thread Jim Hurley


Message: 21
Date: Sat, 18 Mar 2006 00:20:45 -0800
From: Mark Talluto [EMAIL PROTECTED]
Subject: Re: Draw spokes on a wheel
To: How to use Revolution use-revolution@lists.runrev.com
Message-ID: [EMAIL PROTECTED]
Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed


On Mar 17, 2006, at 10:26 PM, Dick Kriesel wrote:


 You're welcome.  You didn't note whether it worked for you.  Did it?


It worked very well.  I did end up using Malte's solution because I
was able to modify it easily enough to have it rotate as needed.  I 
will be tinkering with the turtle graphics that Jim has developed.  I 
learned a lot from all the solutions indeed!  Thx again!



Mark Talluto
--
CANELA Software
http://www.canelasoftware.com



Mark,

And to modify the TG handler to rotate the spokes:

on mouseUp
  startTurtle
  put 12 into tNumSpokes
  put 100 into tLengthSpokes
  repeat with tAngle = 0 to 358 step 2
seth tAngle --Short for setHeading
repeat 360/tNumSpokes
  fd tLengthSpokes
  bk tLengthSpokes
  left 360/tNumSpokes
end repeat
stopTurtle
cleanPts
unlock screen
--This last line is only necessary in Mac OSX.
--Kevin tells me that this screen refresh problem in OSX will be 
fixed in 2.7.1 
  end repeat

end mouseUp

For fun and games with rolling you may  want to look at:

go url  http://home.infostations.net/jhurley/Rolling.rev;

Run Rev has expressed an interest in implementing TG in Revolution. 
Be nice to have a new control, a turtle control (multiple turtles 
like multiple graphic objects) that responds to the TG vocabulary.


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


Re: Draw spokes on a wheel

2006-03-18 Thread Jim Hurley


Message: 11
Date: Fri, 17 Mar 2006 18:32:17 -0800
From: Dick Kriesel [EMAIL PROTECTED]
Subject: Re: Draw spokes on a wheel
To: How to use Revolution use-revolution@lists.runrev.com
Message-ID: [EMAIL PROTECTED]
Content-Type: text/plain;   charset=US-ASCII

On 3/17/06 2:24 PM, Mark Talluto [EMAIL PROTECTED] wrote:

 One things is for sure, I owe each of you a drink of your choice 
at the RevCon

 in Monterey this year.


With positive reinforcement like that, I'll do even better:

on mouseUp
  drawAstig 50,200,225,2
end mouseUp

on drawAstig pSpokeRadiusInner,pSpokeRadiusOuter,pLabelRadius,pLineSize
  go url http://home.infostations.net/jhurley/StopTurtles.rev;
  start using stack stopTurtles -- note: thanks, Jim Hurley
  create stack
  set the width of it to 600
  set the height of it to 600
  go to it
  lock screen
  set the textSize of the templateField to 16
  set the margins of the templateField to 1,7,0,0
  startTurtle
  setH 75 -- note: set heading
  repeat with i = 1 to 24
penUp
forward pSpokeRadiusInner
penDown
forward pSpokeRadiusOuter - pSpokeRadiusInner
penUp
if i mod 2 = 0 then
  forward pLabelRadius - pSpokeRadiusOuter
  label i div 2
  set the width of last field to the formattedWidth of last field
  set the height of last field to the formattedHeight of last field
  back pLabelRadius
else
  back pSpokeRadiusOuter
end if
right 15
  end repeat
  stopTurtle
  set the lineSize of last graphic to pLineSize
  unlock screen
end drawAstig

RevConWest is sounding better and better...


-- Dick


Dick,

Ah, ha, A TG pro. Thanks.

My apologies to all for not responding in order to the posts on this 
thread.  I get the  digest version of the list--it comes all at once. 
It has become a bit overwhelming recently. So much, so fast. I have 
only the vaguest idea of what's going on.


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


Re: Draw spokes on a wheel

2006-03-17 Thread Jim Hurley


Message: 10
Date: Fri, 17 Mar 2006 10:26:30 -0800
From: Mark Talluto [EMAIL PROTECTED]
Subject: Draw spokes on a wheel
To: Revolution use Revolution use-revolution@lists.runrev.com
Message-ID: [EMAIL PROTECTED]
Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed

Hello everyone,

I need a little help drawing spokes to a wheel.  This is actually 
used in a vision test.  I have an image here to help illustrate the 
madness.  I am sure someone like Jim Ault is shaking his head right

now.  http://www.canelasoftware.com/pub/rev/astig.jpg

I have been using an image, but would like to offer the ability to 
adjust the line length and thickness.  The new antialiasing feature 
will also be handy.  Thanks for any input.



Mark Talluto
--
CANELA Software
http://www.canelasoftware.com



Mark,

You  may be able to guess what my  solution might be; that's right 
Turtle Graphics.


on mouseUp
  startTurtle
  put 12 into tNumSpokes
  put 100 into tLengthSpokes
  repeat 360/tNumSpokes
forward tLengthSpokes
back tLengthSpokes
left 360/tNumSpokes
  end repeat
  stopTurtle
end mouseUp


Paste this handler into a button in the stack:

go url http://home.infostations.net/jhurley/StopTurtles.rev;

Or if you want something like the clock in your graphic;

go url http://home.infostations.net/jhurley/Build_a_clock.rev;

There are lots of variations possible.

Jim

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


Re: ANN: Displacement Scaling of graphic objects

2006-03-16 Thread Jim Hurley


Jim Hurley wrote:


 In the message box:

 go url http://home.infostations.net/jhurley/ScaleMe3.rev;


Oh my. To those of us who are math-impaired, this is astounding.

It is also funny you should post this right now, because just two days
ago I was thinking how I would like to write a fractal generator, only I
don't have the math to do it. I still don't. But if I did, I bet I could. ;)

--
Jacqueline Landman Gay | [EMAIL PROTECTED]
HyperActive Software   | http://www.hyperactivesw.com




Thanks to all for your kind words. We all bring special backgrounds 
to this tool which we share. Personally, I never got over the joy I 
found in my high school geometry class.


But I too am astounded by all the rest of you, with your sockets, and 
your cgi, and your HMAC/SHA1, and all the  rest of the mysteries of 
programming.


But Jacque, I know you can do fractals with your math tied behind 
your back. The beauty of Turtle Graphics is that all the analytical 
stuff is done for you. The rest is a little geometry using such 
commands as: Forward, Back, Right, Left, to handle the local 
geometry, and setXY, incXY to deal with the coordinate stuff. It is 
amazing what you can do with this tool. There are books, written by 
MIT math professors, using TG to do special relativity.


To do the snowflake all the geometry you need is to recognize that:

on drawSide L
forward L
left 60
forward L
right 120
forward L
left 60
forward L
end drawSide

will draw a four segment line with a angular (60 degree) bump in the middle.

The hard part, at least it's hard for me, is to recognize that the 
recursive version of this is:


on drawSide L
  if L  3 then --Three is a measure  of the  smallest fractal 
segment to be considered.

divide L by 3 -- Or whatever
drawSide L
left 60
drawSide L
right 120
drawSide L
left 60
drawSide L
  else
forward  L
  end if
end drawSide

And that takes a while to see. You would probably be better at that 
than I am. My mind doesn't work recursively.


The stopTurtle  stack is an interpreter I wrote in Transcript to 
implement  TG. To check it out,  in the msg box, run:


go url http://home.infostations.net/jhurley/StopTurtles.rev;

It includes a TG dictionary and a few examples.

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


ANN: Displacement Scaling of graphic objects

2006-03-15 Thread Jim Hurley
Scaling is a very common feature of all graphics applications, e.g. 
Illustrator and Freehand. But there is another type of scaling that 
is sometimes useful; for lack of a better expression I'll call it 
displacement scaling. (Thanks to a suggestion from Scott Rossi for 
bringing this up.)


As a simple example, consider a rectangle of width w and height h. If 
you magnify this in Illustrator or Freehand by an amount m, you get a 
rectangle with sides m*w and m*h. This  preserves the geometrical 
features of the rectangle. For example the tangent of the angle 
between the diagonal and the base is h/w in both rectangles.


But  suppose you wanted to make a frame by putting two rectangles 
together, one inside the other. You would want all the sides of the 
expanded rectangle to be at a uniform distance, say d, from the 
original--as in a frame. This expanded rectangle does not preserve 
the geometry. The tangent of the diagonal angle becomes: 
(h+2d)/(w+2d), which is not the same as h/w. In fact, for large 
displacements, the rectangle becomes a square--the tangent approaches 
one. (Similarly, an expanded ellipse approaches a circle.)


The stack ScaleMe performs this displacement scaling on all 
polygons. (It also applies to any polygon with sufficient points that 
it approximates a curved figure, for example an ellipse.)


It presents some interesting problems, particularly when the graphic 
points are numerous and close together--as in an ellipse. In this 
case it is necessary to define the points of the graphic, not by Run 
Rev's graphic points (with just 3 significant figures) but with the 
full precision of Run Rev's decimal calculations. The calculated 
graphic points are stored in a custom property of the graphic. The 
points then are stored both as the customary 3 digit graphic points 
for purposes of display and as a decimal (8 displayed , 15 total?) 
digits for purposes of calculation.  (Scott: This eliminates all the 
problems we had with such figures.)


The stack shows how to create some dazzling graphic figures by 
repeatedly scaling a simple form and setting each displaced figure to 
a different color. It also touches on fractal graphics.


In the message box:

go url http://home.infostations.net/jhurley/ScaleMe3.rev;
___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: Mac OSX, Spotlight, and Rev

2006-03-10 Thread Jim Hurley


Message: 19
Date: Sat, 11 Mar 2006 08:23:19 +1000
From: Sarah Reichelt [EMAIL PROTECTED]
Subject: Re: Mac OSX, Spotlight, and Rev
To: How to use Revolution use-revolution@lists.runrev.com
Message-ID:
[EMAIL PROTECTED]
Content-Type: text/plain; charset=ISO-8859-1

   Revolution 2.6 has a spotlight importer that will index our scripts
   but I really don't know if it is present on 2.7


 Hmm. So, if we wanted to make our own content indexable, this doesn't
 have much to do with that, huh? I was hoping there was some way to
 support indexing data stacks and the like.


Rev stacks since 2.6.1 (I think) have been indexed by Spotlight, but I
think it only indexes the scripts and not the fields. It may index
custom properties, so if your data is stored there, you can test that.

Cheers,
Sarah




Sarah,

You  are right. Spotlight does not index content, but EasyFind--see 
below--does search content.


Richard:  Very  useful in finding that stack which has the special 
function, e.g. intersection or theAngleBetween in some script, 
somewhere.


However, EasyFind will search both the scripts and the  content. It 
does not index, so it is slow. (To search scripts be sure to include 
RSTK file types.)


To check out EasyFind (freeware) check the url:

http://www.versiontracker.com/dyn/moreinfo/macosx/11706

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


Re: Scrollbar to drag through a movie?

2006-03-08 Thread Jim Hurley

Klaus Major wrote:



Hi Jim,


 Klaus,

 Sorry to be so dense about this, but I presume that the QT 
 controller must first be loaded into RR for it to appear in the 
 inspector. That's what I don't get: How do I load the controller 
 into RR?


That's just an option for a (QT) player object, just like the 
controller bar in the QuickTime Player!


Create a player and check Controller on the Basic Properties tab 
of the inspector, that's all.

It's not magic, ladies and gentlemen :-)



Klaus,

It's always magic the first time!

There is a considerable lag if one uses one's own scroll bar verses 
the scroll bar built into the controller using the handler:


on scrollbardrag tNew
  set the currenttime of player myPlayer to tNew
end scrollbardrag


I couldn't find the messages described in the documentation under player i.e.

To see a list of messages that can be sent to a player as a result 
of user actions or internal Revolution events, open the Transcript 
Language Dictionary page of the main Documentation window, and 
choose Player Messages from the Show menu at the top. To see a list 
of all the properties a player can have, choose Player Properties 
from the Show menu. (RR 2.6.1)




 I spoke to Mark Waddingham at Monterey about this screen refresh 
 problem in Mac OS X and he said (I think) that he was going to fix 
 it. Maybe I should remind him.


That is supposed to get fixed in 2.7.1 (or already 2.7).



That is good news. I'll wait for 2.7.1. (I thought you said it was 
not fixed in 2.7) The grass is always greener on the other side of 
the current version.


Thanks for your help.

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


Re: Scrollbar to drag through a movie?

2006-03-07 Thread Jim Hurley

---

Message: 12
Date: Tue, 7 Mar 2006 09:57:32 +0100
From: Klaus Major [EMAIL PROTECTED]
Subject: Re: Scrollbar to drag through a movie?
To: How to use Revolution use-revolution@lists.runrev.com
Message-ID: [EMAIL PROTECTED]
Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed

Hi Jim,


 Klaus,

 Thanks. I have been using the handler you describe above, but there 
 was never a picture that responds to the setting of the 
 currentTime. Although the movie would start at the currentTime.


 I'm not sure I know what you mean by when the QT controller is 
 visible. Is this a feature of RR?


you can check Controler in the inspector for the player, and that 
is a QT only feature.
That one checked is what I mean by when the QT controller is 
visible. :-)


 I haven't taken the plunge into 2.7 as yet. Waiting for things to 
 sort themselves out.


 But I would appreciate it if someone would let me know whether RR 
 has fixed the display problem in OS X. That is, whether the 
 following stack runs as expected:


 go  url http://home.infostations.net/jhurley/DisplayProblemsOSX.rev;

 Does the graphic move evenly across the screen or is the  motion 
 herky-jerky?

 Same for the banner display?


Tried it on my 1 Ghz G4 Mac and the motion is ehmm... immediate (the 
graphic is here and then
there at once) and so is the banner, the text suddenly appears 
without the OS X fix



 Thanks,

 Jim


Regards

Klaus Major


Klaus,

Sorry to be so dense about this, but I presume that the QT 
controller must first be loaded into RR for it to appear in the 
inspector. That's what I don't get: How do I load the controller into 
RR?


I spoke to Mark Waddingham at Monterey about this screen refresh 
problem in Mac OS X and he said (I think) that he was going to fix 
it. Maybe I should remind him.


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


Re: In-line Fraction with Horizontal Line

2006-03-07 Thread Jim Hurley


Message: 33
Date: Mon, 6 Mar 2006 19:55:55 -0700
From: Mark Greenberg [EMAIL PROTECTED]
Subject: In-line Fraction with Horizontal Line
To: Runtime Revolution use-revolution@lists.runrev.com
Message-ID: [EMAIL PROTECTED]
Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed

Fellow list members, I have a problem for which I can only find 
difficult or unsatisfactory solutions, and I was hoping you might 
have some suggestions.


I am making a stack to teach students math -- linear equations, to be 
more precise.  When I display the y = mx + b form, the best I can do 
to show a fraction in the m position is something like y = 4/5x + 2.  
This is ambiguous because it isn't clear what should be taken as the 
divisor, 5 or 5x or 5x + 2.  The math teacher for whom I am making 
the game would prefer a horizontal division line instead of a slash.


So far this is what I've thought of and rejected:

Use fonts that have fractions built in as one character.  No, because 
they have too few for the range of possible slopes I want to generate.


Force the numerals around as subscripts and superscripts until it is 
clear what the fraction is.  Messy and probably won't lead to success.


Use inline images.  Need too many images to cover possible slopes.

Write it y = (4/5)x + 2.  This is mathematically acceptable, but not 
the way the students will see it elsewhere.


Use a different 2-line field that moves according to the location of 
the fraction.  Hmm.. maybe.


I could use some help on this one.

TIA,
Mark



Mark,

This won't help you with this question but  the math teacher might be 
interested in SupAndSub.rev


It facilitates typing equations.

In the message box:

go url http://home.infostations.net/jhurley/SupAndSub.rev;

To answer your question, I guess I would  try using separate fields 
for the num and dem of the fraction with a graphic line in between. I 
presume the slope is always represented by the fraction?


Jim




--

___
use-revolution mailing list
use-revolution@lists.runrev.com
http://lists.runrev.com/mailman/listinfo/use-revolution

End of use-revolution Digest, Vol 30, Issue 14
**

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


Re: Scrollbar to drag through a movie?

2006-03-06 Thread Jim Hurley


Message: 16
Date: Sat, 4 Mar 2006 17:52:24 +0100
From: Klaus Major [EMAIL PROTECTED]
Subject: Re: Scrollbar to drag through a movie?
To: How to use Revolution use-revolution@lists.runrev.com
Message-ID: [EMAIL PROTECTED]
Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed

Hi Jim,

 Is is possible to drag smoothly through the video frames of a movie 
 using  a scrollbar?


with version 2.6.1 this is only possible when the QT controller is 
visible

OR
(if the controller is not visible) when the movie is already 
playing...?!


This was possible with earlier versions of Rev :-/

But with Rev 2.7 this is possible again :-)

Just set the startvalue of your slider to 0 and the endvalue to the 
duration of the player...


on scrollbardrag tValue
   set the currenttime of player xyz to tValue
end scrollbardrag

C'est ca :-)

 I can drag to a current time and then start from that point, but I 
 would like to see the frames shuttle by as I drag the thumb.


Hope that helps...


 Jim


Regards

Klaus Major
[EMAIL PROTECTED]
http://www.major-k.de

*



Klaus,

Thanks. I have been using the handler you describe above, but there 
was never a picture that responds to the setting of the currentTime. 
Although the movie would start at the currentTime.


I'm not sure I know what you mean by when the QT controller is 
visible. Is this a feature of RR?


I haven't taken the plunge into 2.7 as yet. Waiting for things to 
sort themselves out.


But I would appreciate it if someone would let me know whether RR has 
fixed the display problem in OS X. That is, whether the following 
stack runs as expected:


go  url http://home.infostations.net/jhurley/DisplayProblemsOSX.rev;

Does the graphic move evenly across the screen or is the  motion 
herky-jerky? Same for the banner display?


Thanks,

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


Scrollbar to drag through a movie?

2006-03-04 Thread Jim Hurley
Is is possible to drag smoothly through the video frames of a movie 
using  a scrollbar? I can drag to a current time and then start from 
that point, but I would like to see the frames shuttle by as I drag 
the thumb.


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


Running and stepping thru a repeat loop not the same

2006-02-12 Thread Jim Hurley
This  is weird beyond measure. When I step 5 times through the repeat 
loop below I get the expected results--see below.


When I allow the loop to run the first few lines are the second set 
of results below. They are completely different and incomprehensible.


The purpose is to add a new database field which is a combination of 
the street name, street number, and last name of the voter.


set the itemdel to tab
repeat for each line tLine in tOld
put tab  item 5 of tLine  item 4 of tLine  item 2 of tLine  after tLine
put tLine  cr after oldResults
end repeat


First few lines of the variable oldResults obtained by stepping 
through the loop. Exactly what I expected.


(Voter ID   LASTFIRST   ST.NO.  STREET  PARTY   DATEComboField)

30871   KOVACS  JUDITH  237 ADAMS   NP  02/19/2002  ADAMS237KOVACS
47200	SHARP	KATHERINE	237	ADAMS	DEM	09/11/1995 
	ADAMS237SHARP

107995  NUCKELS ANDREA  239 ADAMS   REP 08/07/2003  ADAMS239NUCKELS
48272   RUSSELL ANNA239 ADAMS   NP  09/01/2000  ADAMS239RUSSELL
778	BRITTEN	CONSTANCE	239	ADAMS	GRN	08/18/1999 
	ADAMS239BRITTEN


(The results above would all line up nicely with the proper setting 
of the tabs.)


First few lines of the variable oldResults obtained by running the 
loop. Totally bizarre results.


30871   KOVACS  JUDITH  237 ADAMS   NP  02/19/2002  ADAMS237KOVACS
30871	KOVACS	JUDITH	237	ADAMS	NP	02/19/2002	AD 
	ADAMS237SHARP

107995  NUCKELS ANDREA  239 ADAMS   REP 08/07/2003  ADAMS239NUCKELS
107995  NUCKELS ANDREA  239 ADAMS   REP 08/07/  ADAMS239RUSSELL
107995  NUCKELS ANDREA  239 ADAMS   REP 08/07/  ADA ADAMS239BRITTEN
107995	NUCKELS	ANDREA	239	ADAMS	REP	08/07/	ADA	A 
	ADAMS239NUCKELS


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


Re: Formatting numbers

2006-01-15 Thread Jim Hurley


Message: 21
Date: Fri, 13 Jan 2006 15:40:10 -0800
From: Marty Knapp [EMAIL PROTECTED]
Subject: Formatting numbers
To: Revolution User List use-revolution@lists.runrev.com
Message-ID: [EMAIL PROTECTED]
Content-Type: text/plain; charset=ISO-8859-1; format=flowed

Does somebody have a suggestion for formatting numbers with commas for a
printed report? It wil have columns of data, with numbers ranging from 
small to large. The larger ones are hard to read, so I'd like to insert

commas at the appropriate places. I can think of clunky ways to do it,
but thought I'd ask here in case someone had already brewed up something
nice.

Thanks,

Marty Knapp



Marty,

Here are a couple of number formatting functions I use a lot.

The first is the standard comma formatting and the second puts the 
number into scientific format.


For example, the number 12225677.98 formats to

Comma format: 12,225,677.98
Scientific format 1.22*10^7

Jim

function commaFormat tNum
  put tNum mod 1 into remainder
  delete char 1 of remainder
  put trunc(tNum) into tNum
  put the number of chars in tNum into n
  repeat with i = 1 to trunc((n-1)/3)
put comma after char n - 3*i of tNum
  end repeat
  return tNum remainder
end commaformat

function sciFormat tNum,sigFigures
  if tNum  0 then
put - into sign
  else put empty into sign
  put abs(tNum) into tNum
  if sigFigures is empty then put 3 into sigFigures--Default 
significant figures.

  put 0 into count
  if tNum = 1 then
repeat until tNum  10
  divide tNum by 10
  add 1 to count
end repeat
put round((10^(sigFigures-1))*tNum)/10^(sigFigures-1) into tNum
return sign  (char 1 to sigFigures + 1 of tNum) *10^  count
  end if
  if tNum  1 then
repeat until tNum = 1
  multiply tNum by 10
  add 1 to count
end repeat
  end if
  return sign  (char 1 to sigFigures + 1 of tNum)  *10^-  count
end sciFormat
___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution


Quicktime movie novice question

2006-01-07 Thread Jim Hurley

Is the movie always the top layer? Can one show it behind Rev controls?

Is there some nifty Quicktime movie tutorial that shows Rev/Quicktime 
to advantage?


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


Re: Fractals

2005-12-31 Thread Jim Hurley


Message: 19
Date: Sat, 31 Dec 2005 21:43:19 +1100
From: Scott Kane [EMAIL PROTECTED]

Recently I came across a Rev project that
did fractals.  I've managed to lose the
file in the interim.  I've checked the
Rev Online stacks and can't see anything
there.  Anybody know of any fractal scripts
for Rev?

Scott



Scott,

There are a few simple fractals in the following stack.

In the message box run:

go url http://home.infostations.net/jhurley/TurtleGraphics.rev;


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


Re: Don't understand the meaning of local

2005-12-23 Thread Jim Hurley

Type: text/plain; charset=ISO-8859-1; format=flowed

Jim,

If you declare your local outside the object handlers, then it stays
persistent to that object *until* you edit the script. Editing scripts
resets all it's locals.

best,

Chipp



Chipp,

Thanks. That is what I was missing. I was also finding that when I 
returned to the script the old local variable retained its value from 
the previous run--until, as you  say, the script is recompiled.


Local is a deceptive descriptor. It is used (as a script local) to 
control not only locality, but also persistence--it has both spacial 
and temporal implications.


I'm not faulting the docs. It's all there.

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


Re: Stacks Shapes Via Pictures

2005-12-23 Thread Jim Hurley


Message: 12
Date: Fri, 23 Dec 2005 20:34:52 +1000
From: Sarah Reichelt [EMAIL PROTECTED]
Subject: Re: Stacks Shapes Via Pictures
To: How to use Revolution use-revolution@lists.runrev.com

Have a look at Klaus Major's Christmas tree stack at
http://www.major-k.de/xtalke.html

It is a great example of how to do this and the extra bits needed like
a way to move and close the resulting window, since it will have no
title bar.

Cheers,Sarah


Great example, but what makes the lights (buttons) blink?

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


Re: Don't understand the meaning of local

2005-12-23 Thread Jim Hurley


Message: 7
Date: Fri, 23 Dec 2005 09:24:41 -0800
From: Jim Ault [EMAIL PROTECTED]
Subject: Re: Don't understand the meaning of local
To: How to use Revolution use-revolution@lists.runrev.com
Message-ID: [EMAIL PROTECTED]
Content-Type: text/plain;   charset=US-ASCII


 Local is a deceptive descriptor. It is used (as a script local) to
 control not only locality, but also persistence--it has both spacial
 and temporal implications.



Perhaps it is the terminology used in the docs.  More precisely, I think of
it as  *handler local, *script local, and *global to Rev variables.  The
handler local is the one that dies when exiting that handler.  This allows
the same variable name (eg. tempVar) to be used without carry-over.

Also, 'set the itemDel to space' only applies to that running handler.
Entering another starts with the default itemDel, so this is a 'handler
local' setting.  Important concept for front/back scripts and stacks in use

Globals are held by Rev and only die when either
delete variable gGlobalVar --is done
the user quits Revolution app.
This means that you could build a stack that is opened, sets some globals,
close with the 'destroyStack' as true, leaving the globals in RAM and
available to all stacks and sub stacks.

Obviously, the kinder, gentler stack design is to delete these variables on
closeStack.

Good questions.

Jim Ault
Las Vegas



Jim,

Good points.

The persistence of local SCRIPT variables that Chipp's earlier reply 
clears up for me is handlers calling themselves (in x millisec or 
whatever) in  order to achieve asynchronous behavior ( i.e. not 
monopolizing CPU  time and allowing other uses of the  CPU to seek 
in.)


Unless the script remembers the local script variables (until the 
next compiling of the code) then on the next call the handler will 
not know what values to assign.


On way around this would be to include the value of the variable in 
the call. For example in the  following script the send message tells 
the handler what the value of the variable should be after 20 
millisec is up.


on mouseUp
  put  into field 1
  checkPersistence 1
end mouseUp


on checkPersistence tNum
  if tNum  10 then exit checkpersistence
  put tNum  into field 1
  send checkPersistence tNum + 1 to me in 20 millisec
end checkPersistence

And there would be no need to include a script local variable.

But  if checkPersistence look like this:

on checkPersistence
  if tNum  10 then exit checkpersistence
  put tNum  into field 1
  add 1 to tNum
  send checkPersistence to me in 20 millisec
end checkPersistence

It would not work unless tNum was declared earlier as a script local.

It's about time I'm getting these fundamental points straight. There 
is a danger in learning RR on an as-needed basis.


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


Don't understand the meaning of local

2005-12-22 Thread Jim Hurley
I suspect that  this issue has been dealt with before, but I don't 
get it. I thought I understood what a local variable was.


Create a field. Put a bunch  of returns into it--or several lines of text.

Lock the field and put the following script into it.

Hold the mouse down and move it through the field. I would have 
expected a list of the lines that have been moved over to appear in 
the msg box. Instead only the current line is shown.


But I so get the entire list if I include tLines as  a local script 
variable. Apparently tLines is set to empty after every execution of 
mouseMove, unless tLines is included as a local script variable.


I get the feeling that mouseMove stops and restarts with every cycle 
and therefore forgets the value of tLines.


However if tLines is set as a local script varable then the script 
continues to run and therefore remembers tLines.


I had thought that the function of the local script declaration was 
to allow the variable to be used throughout  the handlers of the 
script. However, in this example tLines is used only in mouseMove.


I think I ran into this behavior earlier when adding a rolling 
snowball asynchronously to Scott's snow storm. I wondered why local 
variables were kept in memory each time a handler called itself after 
a few milliseconds. Once again it appears that setting a local script 
variable retains the variables  in memory--even when the script stops 
(?) until called again.


Anyone understand the different behavior of this script depending on 
whether tLines is declared as a local script variable? Or, more 
challenging, can anyone explain it to me?



local myName,  --tLines

on mouseDown
  put the name of me into myName
end mouseDown

on mouseUP
  put  into myName
end mouseUP


on mouseMove
  if myName is  then exit mouseMove

  put  word 2 of the MouseLine into tLine
  if tLine is not in tLines then put  tLine   comma after tLines
  put tLines into msg box

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


How do I import an image from a web page?

2005-12-18 Thread Jim Hurley

How do I import an image from the web into a Rev stack?

For example:

The web site is http://www.example.com/; and there is an image at 
this site myPicture.jpg


Thanks,

Jim

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


Re: Christmas e-cards as learning tools

2005-12-16 Thread Jim Hurley

There has been a call for a snowman rather than a snowball, so..

   go stack url http://home.infostations.net/jhurley/flurrySnowman.rev'

(It's a terrible cheat--from a physics point of view.)

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


Re: Christmas e-cards as learning tools

2005-12-16 Thread Jim Hurley

Update:

It occurred to me that the graphic for the snowman's head can be 
greatly simplified using the move command. Seems that RunRev has 
thought of everything necessary to make life simpler.


 I have updated the file--see below.

Jim


There has been a call for a snowman rather than a snowball, so..

   go stack url http://home.infostations.net/jhurley/flurrySnowman.rev'

(It's a terrible cheat--from a physics point of view.)

Jim

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


Re: Christmas e-cards as learning tools

2005-12-15 Thread Jim Hurley

This this is snowballing.

go stack url http://home.infostations.net/jhurley/flurryAndSnowball.rev;

We're getting there.

Jim

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


Re: Sockets

2005-12-12 Thread Jim Hurley
Like Graham, I too would like to thank Alex and Dave for their 
detailed discussion of sockets.


I tried Dave's small handler and it worked well, but only  once. I 
went into the script to insert a break point so that I could step 
through it to see how it works, but it wouldn't work a second time. 
Even after I took the break point out, it still wouldn't work.


Looks like it got all wore out after one use.

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


Sockets

2005-12-11 Thread Jim Hurley
I'm learning something about testing for an Internet connection from 
the last couple of posts of the list digest.


I used to use the old method of testing for a connection to Google. 
Now all I need to do is find out was a socket is. I know it must have 
something to do with light bulbs.


Searched the dictionary for socket and came up with the single 
Using URLs, uploading, and downloading, 18 pages (copied to Word) 
which don't  appear to contain the word socket.


Is there a secret RR society which is privy to this sort of thing? 
Can I join? Sock it to me.


Jim

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


Re: Heads Tails

2005-12-10 Thread Jim Hurley


Message: 7
Date: Fri, 9 Dec 2005 13:58:46 -0700
From: Mark Greenberg [EMAIL PROTECTED]
Subject: Re: Heads  Tails
To: use-revolution@lists.runrev.com
Message-ID: [EMAIL PROTECTED]
Content-Type: text/plain;	charset=US-ASCII;	delsp=yes; 
	format=flowed


	Yes, but the original post (quite a while ago) was looking for a way 
to determine how many times h occurred in singles, doubles, triples, 
etc.  Your script counts how many heads and tails there are total.
	There were some non-RegEx solutions offered, but they were long.  
RegEx shortens the length of the solution quite a bit.  I can't 
determine whether the RegEx solution is faster because I am using an 
older version of Rev which has slower RegEx.


Mark


Mark,

Sorry. Should  have realize there  was more to it that.

And there is another way to skin that cat: separate the sting of h's 
and t's into words and do a word count using an array.


on mouseUP
  put field 1 into tText
  put char 1 of tText into tLastChar
 --Separate the string of h's and t's into words
  repeat for each char c in tText
if c = tLastChar then
  put c after results
else put  space  c after results
  put c into tLastChar
  end repeat

  --Do a word count
  repeat for each word tWord in results
add 1 to tWordCount[tWord]
  end repeat

  --Display
  combine tWordCount with return and comma
  put tWordCount into field 2
end mouseUP

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


Re: Can I do show through graphic regions...

2005-12-10 Thread Jim Hurley

Scott Rossi wrote:

Hi Andy:

How can anyone resist a GUI challenge?...

OK, I'm not sure if I did what you're asking, but I took a stab at this, and
spent way to much time figuring out the math (this was a good exercise for
me in efficient scripting).  I think it works as an abacus should but the
abacus experts out there should take a look to verify.
Execute the following in your message box (not a browser):

 go url http://www.tactilemedia.com/download/abacus.rev;




I'd give my soul to be able to make these graphics.

Jim


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


Re: Heads Tails

2005-12-09 Thread Jim Hurley


Message: 5
Date: Fri, 9 Dec 2005 04:35:10 -0700
From: Mark Greenberg [EMAIL PROTECTED]
Subject: Heads  Tails
To: Runtime Revolution use-revolution@lists.runrev.com
Message-ID: [EMAIL PROTECTED]
Content-Type: text/plain;	charset=US-ASCII;	delsp=yes; 
	format=flowed


Here's another solution for the problem of finding the runs of heads 
in a series of coin flips:


Function TheRuns Data --in the form of tthttthhth...
   Local P1, P2=1
   Repeat with i = 1 to 12
 Put True into M;Put Data into D;Put 0 into Ct
 Repeat until M is False
   Put MatchChunk (D,(?:^|t)(h{  i  })(?:t|$),P1,P2) into M
   If M then Add 1 to Ct
   Delete Char 1 to P2 of D
 end Repeat
 Put Ct   runs of   i  Return after Report
   end Repeat
   Return Report
end TheRuns



Mark and Marielle,

The many ways of skinning a cat:

on mouseUp
  put field 1 into tText
  put 0 into tHeads
  repeat for each char tChar in tText
if tChar is h then add 1 to tHeads
  end repeat
  put the number of chars in tText - tHeads into tTails
  put tHeads, tTails into msg box
end mouseUp

Given field 1 of the form hhhththhthhhth

Jim




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


Re: What Rev Needs -- Again (was Why is Konfabulator Pretty?)

2005-12-07 Thread Jim Hurley

Scott Rossi wrote;


  As a matter of fact, since the accusations are hurling, flames are flying,

 and there's generally a lot of smoke and debris around, I'd like to take
 this opportunity throw some fuel on a different fire.  I'll try and put this
 as non-ageist as I can:

 Rev developers are too old.

 Many of us have been around the development block many times, some of us a
 lot more than others, and we wear this history like a badge of honor.  This
 honor is unquestionably well deserved, but it wasn't until a newer Rev
 community member came up to me during RevConWest and asked the following
 question that it hit me:

 This conference is great, but where are all the young people?





Sarah Reicheit wrote:



Good point, Scott. I know we have a few tertiary educators on this
list, but I would love to see Rev push into secondary schools. My
middle son (13) is starting a programming course next year and they
will be using Visual Basic. He has asked his teacher if he can use
Revolution instead, since he is already familiar with it. She is
agreeable, but I don't know if the school will be prepared to pay for
Rev when they already own VisualBasic.

Cheers,
Sarah



Sarah et. al.,

Although I come from the tertiary branch of the educational system, 
my first objective for RR would be in the primary and secondary 
schools. And for this reason I support Rev's stated objective of 
implementing Turtle Graphics for Revolution.


By implementing TG  I mean creating another class of controls, turtle 
controls, like buttons, only different. Their properties would 
include position (standard Cartesian coordinates with a user defined 
origin-not the same as screen coordinates), heading (standard 
Cartesian polar angle-0 along the right-pointing x-axis0, pen state 
(pen up or pen down) so that they may draw (leave a trail) as they 
move.


They would have an augmented vocabulary, responding to such commands 
as Forward, Back, Right, Left, setXY, setRA, incXY, and functions 
such as xyCor(of the turtle), direction(of the turtle), distance(to 
any to any point), heading(direction to any object) etc.


And the course content would be directed toward programming as a 
general problem-solving tool, as opposed to a course in computer 
programming, recognizing that programming is a generic tool, useful 
in a wide variety of endeavors.  Examples would include, beside text 
manipulation, applications in the sciences, acknowledging that every 
scientist should have some programming experience, and that this is 
the audience most likely to be attracted toward, and in need of such 
a course.


(Some examples of application of TG to mathematics and the sciences 
can be found in:


go stack url http://home.infostations.net/jhurley/TurtleGraphics.rev

Jim

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


Re: What Rev Needs -- Again (was Why is Konfabulator Pretty?)

2005-12-07 Thread Jim Hurley

On further thought, I probably overstated RR's position on TG.

I can't say that they have committed themselves to implementing same; 
I think their  position was that they are interested and recognized 
the importance and significance of TG in education.


Jim

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


Re: Paranoid?

2005-12-06 Thread Jim Hurley

 Richard Gaskin wrote:


Jim Hurley wrote:

 I see that I received issue 22 and issue 26 of the digest, but am
 missing issues 23 through 25.

 

 Anyone know why this might be?


We spent issues 23 through 25 talking about you. ;)



Why aren't I more popular?

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


Re: ANN: Remove double spaces--plugin

2005-12-05 Thread Jim Hurley


Message: 9
Date: Sun, 04 Dec 2005 20:02:28 -0800
From: Jim Ault [EMAIL PROTECTED]
Subject: Re: ANN: Remove double spaces--plugin
To: How to use Revolution use-revolution@lists.runrev.com
Message-ID: [EMAIL PROTECTED]
Content-Type: text/plain;   charset=US-ASCII

  It will replace doubles spaces in a text field with single spaces

 without affecting the formatting.


Another approach is to use :

put replaceText(fld storyline, +, ) into fld storyline

which is the regular expression that replaces all runs of spaces with a
single space.  The  + says 'one or more spaces'
Further... automation is possible for any field when it is closed.
Simply add to a stack script, back script, or stack in use stack script


Jim,

Thanks for the tip.

If there if formatting in the field you might use:

   put replaceText(the htmlText of field 1, +, ) into tText
  set the htmltext of field 1 to tText

Jim
(Seems that every Tom, Dick and Harry  is named Jim.)
___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution


Paranoid?

2005-12-05 Thread Jim Hurley
I see that I received issue 22 and issue 26 of the digest, but am 
missing issues 23 through 25.


Anyone know why this might be?

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


Re: Adventures in Rotation

2005-12-04 Thread Jim Hurley

Message: 7
Date: Sun, 4 Dec 2005 19:16:29 -0500
From: Bill Marriott [EMAIL PROTECTED]
Subject: Adventures in Rotation
To: use-revolution@lists.runrev.com
Message-ID: [EMAIL PROTECTED]

#13) General flakiness. I would definitely say revCrumplePoly is a better
name for the revRotatePoly command. Is there any situation where
revRotatePoly could be useful? Not if it does this. Totally bugged. (I
suspect the reason why is that Rev doesn't have fractional coordinates?
Could such a limitation really result in such dramatic distortion? If this
is the case, then Rev should store fractionals, but render to integers.)



Here, here. I have been promoting fractional coordinates for graphic 
points for some time. Try the following handler:


on mouseUp
  set the loc of me to 200.6,200.4
  put the loc of me into msg box--reveals 200,200

  set the points of grc 1 to 100,100  cr  200.4,200.6
  --There is no evidence of the line graphic
  -- The fractional point is not truncated but interpreted as a blank line.
end mouseUp

RR will accept fractional coordinates for controls (it truncates the 
coordinates) but it will not accept fractional graphic points.


You don't get an error message and no feedback that the problem lines 
in the fractional coordinates.


Problems arises when the graphic points are computed; the programmer 
may  not realize that the points are fractional or that RR will not 
accept  fractional points. Any point with a fractional coordinate is 
interpreted as an empty point and therefore a discontinuity.


It has been a while and I forget the details, but I think there was 
support for this change in RR; so far no implementation.


Jim

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


ANN: Remove double spaces--plugin

2005-12-04 Thread Jim Hurley
Maybe it's just me. Maybe I  have a heavy thumb, but I  always get a 
number of  multiple spaces in my  text.


(Witness the above line.)

Hence the following VERY simple plugin--in the message box:

go stack url http://home.infostations.net/jhurley/RemoveDoubles.rev;

It will replace doubles spaces in a text field with single spaces 
without affecting the formatting.


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


Re: ANN: Phun Physics

2005-12-01 Thread Jim Hurley


Message: 12
Date: Tue, 29 Nov 2005 09:51:51 -0700
From: Roger Guay [EMAIL PROTECTED]
Subject: ANN: Phun Physics
To: use-revolution@lists.runrev.com,
[EMAIL PROTECTED]
Message-ID: [EMAIL PROTECTED]
Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed

I've added fireworks (with lots of sound), and dressed up two other 
features of a stack I call PhunPhysics.  You can find it at revOnline 
under RogerG or Education.  Have phun!


Cheers, Roger




Roger,

I like the way you simulated the explosion with the expanding and 
contracting graphic. Simple and effective.


I also noticed on the User Space your moving finger application. 
Useful in help stacks where you want to associate text with a screen 
control.


Also in this regard, check out (in the message box):

go stack url http://home.infostations.net/jhurley/PointerTool.rev'

This plug-in automates the task of locating the pointer site with the 
word description. Just click on the word (a link is created) and then 
at the screen site to which the word refers. When the user passes the 
mouse over the word a hand with a finger point to the object appears.


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


Re: OT Last week's CarTalk puzzler

2005-11-25 Thread Jim Hurley
I guess I can assume you have all had time to work on this beautiful 
problem. But if not, read no further.


I really like the  solution that Charles Hartman provided. Simple and precise.

It wasn't the solution I had in mind at all. There is another 
approach, not as quick as Charles', but it not only  demonstrates 
when the number of factors is odd or even, but it also provides a 
method of obtaining how many odd or how many even factors there are, 
and, as a bonus, as a process for finding those factors.


From the fundamental theorem of arithmetic any number N can be 
represented as a unique product of primes


N = p1^n1 * p2^n2 *  etc.

where p1, p2, etc are prime numbers, and n1, n2, etc. are integers

The factors of N are then

p1^m1 * p2^m2 * . etc.

where m1 takes on values from 0 to n1,  m2 takes on values from 0 to n2, etc.

The number of factors is therefore: (n1 + 1) * (n2 + 1) etc.

This product will be odd if and only if EACH of the brackets is odd; 
But  (n + 1) is odd if and only  if n is even.


If all the n's are even, it follow that N is as perfect square.

Similarly  for the odd number of factors.

For example, if N = 24 then its prime factor representation is

24 = 2^3 * 3^1

And the number of factors is the exponent 3 plus 1, times the 
exponent 1 plus 1, or 4 * 2 = 8


Explicitly the 8 factors are:

1,2,3,4,6,8,12,24

Each factor is 2 to some power less than or equal to 3, multiplied by 
3 to some power less than or equal to 1.


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


Re: OT Last week's CarTalk puzzler

2005-11-25 Thread Jim Hurley

Mark Wieder wrote:

Jim-

Friday, November 25, 2005, 6:45:22 AM, you wrote:

I think it's simpler than that. (warning - it's Friday morning and the
caffeine hasn't really taken effect yet)

Consider any number in terms of its factors. By definition, factors
come in pairs:

the factors of 15 are 1 x 15, 3 x 5
the factors of 17 are 1 x 17
the factors of 18 are 1 x 18, 2 x 9, 3 x 6

The *only* exceptions to this are perfect squares, unless you want to
count the same factor twice:

the factors of 16 are 1 x 16, 2 x 8, and 4

Therefore, every switch will be toggled an even number of times and
turned off except for the perfect squares.

--
-Mark Wieder
 [EMAIL PROTECTED]




Yes, Mark. But I think that is essentially Charles solution. It is 
certainly simpler. (But not as rich, IMHO :))


For some reason I didn't get Issue 99 of the Run Rev list. I presume 
that is where my alternate approach appears, and what you are 
responding to.



Jim

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


Re: OT Last week's CarTalk puzzler

2005-11-24 Thread Jim Hurley


Message: 10
Date: Wed, 23 Nov 2005 21:19:31 -0500
From: Charles Hartman [EMAIL PROTECTED]
Subject: Re: OT Last week's CarTalk puzzler
To: How to use Revolution use-revolution@lists.runrev.com
Message-ID: [EMAIL PROTECTED]
Content-Type: text/plain;	charset=US-ASCII;	delsp=yes; 
	format=flowed



On Nov 23, 2005, at 6:07 PM, Jim Hurley wrote:



 All those numbers are called perfect squares. And only they have an 
 odd number of factors, because one of the factors is the square 
 root of the number in question. For example, nine has three 
 factors, 1 and 9 and 3.  [I confess, I can't see how this follows. 
 Jim]



Well, because 9 has four factors -- 1, 3, 3, and 9 -- two of which 
are assigned to the same chain-puller, who however only pulls the 
chain once.


Charles




Charles,

I expressed myself badly. What I meant was that I didn't see how this 
one example proved the theorem. A proof needs to show how the theorem 
follows for all perfect squares and only for perfect squares, i.e. it 
must be both a necessary  and sufficient condition.


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


Re: OT Last week's CarTalk puzzler

2005-11-24 Thread Jim Hurley

Charles Hartman wrote:

Interesting. At first it looks straightforward:

1. If a factor is by definition an integer that when multipilied by 
another integer
	yields the number we're interested in as a product, then factors 
have to come

in pairs. (It takes two to multiply.)
2. Odd number of factors is therefore a contradiction in terms, 
unless factor is

shifted to mean unique factor.
3. If a number has a pair of factors that are identical (so not 
unique, so they only
	count once), then it's the product of that factor (which provably 
can't be
	either 1 or the number itself), times that factor, which is the 
definition of a

square.

So having an odd number of factors is a sufficient condition for 
being a square.


But it doesn't seem to be a necessary condition. The factors of 36 -- 
by the double definition you have to use in order to make sense of 
the statement of the problem -- are either

1   36   2   2   3   3
or
1   36   2   3



Charles,

The factors of 36 are 1, 2, 3, 4, 6, 9, 12, 18, and 36; an odd number 
of factors as the theorem predicts.


The factors of 32 are 1, 2, 4, 8, 16,  and 32; an even number of 
factors, again consistent with the theorem.


The only way  I know to solve this problem, i.e. show that the number 
of factors of a given number is odd, if and only if the number is a 
perfect square, is to express the number as a product of primes.


For example 36 = 2^2 * 3^2

And 32 = 2^5

In case anyone wants to pursue this further, I will quit here. Beauty 
is best enjoyed if you discover it for yourself.


Jim

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


Re: OT Last week's CarTalk puzzler

2005-11-24 Thread Jim Hurley


Message: 10
Date: Thu, 24 Nov 2005 10:11:15 -0800
From: Mark Wieder [EMAIL PROTECTED]
Subject: Re: OT Last week's CarTalk puzzler
To: How to use Revolution use-revolution@lists.runrev.com
Message-ID: [EMAIL PROTECTED]
Content-Type: text/plain; charset=us-ascii

Charles-

Thursday, November 24, 2005, 7:05:31 AM, you wrote:


 But it doesn't seem to be a necessary condition. The factors of 36 --
 by the double definition you have to use in order to make sense of 
 the statement of the problem -- are either

 1   36   2   2   3   3
 or
 1   36   2   3
 -- which counted one way amount to 6 and the other, 4, neither of 
 which is conspicuously odd. It looks to me as though old Tom is 
 wrong. Gee, does that ever happen?


???

I count the factors of 36 as being:

1 2 3 4 9 18 36

and that seems odd to me...

--
-Mark Wieder
 [EMAIL PROTECTED]
**



Well, Mark, it is odd, but so is 1,2,3,4,6,9,12,18,36.

Moral: Better to make two slips than one, particularly when the 
answer is binary.


It is easy to miss factors. I make a little educational stack some 
time ago to automate the process:


In the message box:

go stack url http://home.infostations.net/jhurley/PrimeNumbers.rev;

Jim


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


OT Last week's CarTalk puzzler

2005-11-23 Thread Jim Hurley

For those of you who find beauty in mathematics.

Below is this week's CarTalk puzzle. (A National Public Radio program 
on cars and car repair, hence this beautiful puzzle in number 
theory--don't ask.)


At first I didn't believe Ray theorem (below), so I used Run Rev to 
at least confirm his hypothesis: All numbers with an odd number of 
factors is a perfect square, i.e. the square of an integer, 1, 4, 9 
16, etc. As an example: 16 has as factors, 1, 2, 4, 8 and 16. There 
are 5 factors, an odd number. This implies that the 16'th bulb will 
be switch an odd number of times and therefore will be off if 
initially on, and on if initially off.


Sure enough a little repeat loop shows that the theorem is true. To 
prove it you may find the fundamental theorem of arithmetic helpful, 
i.e. Every integer may be uniquely represented as a product of prime 
numbers.


(20,000 is just an arbitrarily large number.)

Jim


PUZZLER: The Hall of 20,000 Ceiling Lights
There are 20,000 lights on. A person comes through and pulls the cord 
on every second light. A third person comes along and pulls the cord 
on every third light, etc. When someone comes who pulls every 
20,000th chain, which lights are on?


Their solution(?):

The Hall of 20,000 Ceiling Lights
RAY: Let's number all the lights and pick one at random.

TOM: How about 26?

RAY: OK, let's look at light number 26 and figure out if it's going 
to be on or off. All we need to know are the factors of the number 
26. Well what's a factor? A factor is a whole number that will divide 
evenly into another number, with nothing leftover.


So, the factors of 26 are 1, 26, 13 and 2.

Here's why that's important. It tells us that light number 26 is 
going to get its chain pulled four times.


TOM: How did you figure that out?

RAY: Well, when every cord gets pulled it gets turned on, right? 
Light number 26 gets its cord pulled again at 2, which is a factor of 
26.


When every 13th chain gets pulled, light number 26 gets turned on 
again. And it doesn't get touched again until 26, when it gets turned 
off forever.


Now it's pretty obvious then that every bulb that has an even number 
of factors will eventually get turned off for good.


So, which lamps remain on? All those represented by a number with an 
odd number of factors. And those are, are you ready for this? Light 
bulbs 1, 4, 9, 16, 25, 36, etc.


All those numbers are called perfect squares. And only they have an 
odd number of factors, because one of the factors is the square root 
of the number in question. For example, nine has three factors, 1 and 
9 and 3.  [I confess, I can't see how this follows. Jim]


Do we have a winner?

TOM: We do have a winner and the winner this week is Laurie Warner 
from Greer, South Carolina. And for having her answer selected at 
random from among all the correct answers that we got Laurie gets a 
26 dollar gift certificate to the Shameless Commerce Division at Car 
Talk.com, with which she can pick up our new best and second best of 
Car Talk CD pack.

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


Re: Difference between Step over and Run

2005-11-22 Thread Jim Hurley


Jim Hurley wrote:

 I have noticed in the debugger that there is quite a difference in
 time of execution between

 Step over

 and

 Run


I think this is because of the traceDelay. When you are debugging, every
step includes a pause equivalent to the traceDelay setting. When you
run, the engine goes back to full speed.

snip stuff


 Moral: Even though the screen is locked by script, it is not locked when
 running the debugger, UNLESS you Run to the next line. And it will run
 though the window work much faster if you  unlock the window.

 Unless someone recognizes this as a known bug in the debugger, I will
 submit it.


I believe this behavior is intentional. The assumption is that during
debugging you always want to see what is happening. There have been
innumerable instances where I was happy it worked that way, because I
could see the screen change during debugging without altering my code
temporarily.



Jacque,

Yes, I understand and appreciate this facility.

To understand my point you need to run the following script:

on mouseUp
  put   into field 1
  lock screen --Try with and without this line.
  doWindowWork --With a break point maker here
  beep
end mouseUp

on doWindowWork
  put the ticks into tStartTime
  put 1 into field 1
  repeat 100
add 1 to field 1
  end repeat
  put cr  the Ticks - tStartTime after msg box
end doWindowWork

First, step over doWindowWork with the screen unlocked. You see the 
values in field 1 change (rapidly) from 1 to 100. It take about 30 
ticks. This is the way I would hope the debugger would work in this 
case.


Next, step over doWindowWork with the  screen locked. You again see 
the values in field 1 change from 1 to 100, but this time very 
slowly--it takes about 1000 ticks.


In both cases you see what is happening but at a very different 
pace. Many times in the stack I was working on, there was so much 
field work being done that Step over is not feasible with the 
screen locked--taking several minutes to execute. (The screen was 
locked precisely because of this field activity.)


The work around is to strike out the screen lock line in the script. 
A bit of a nuisance, requiring one script without the  debugger and 
another with the debugger. Or better, if viewing the field changes is 
not important, then running to the  next line of code.


My suggestion would be that the debugger would reveal the field 
changes at the same pace with and without the screen lock when 
stepping over the line which effects the field changes.


Sorry; long winded and perhaps a point too fine. And I'm afraid I 
confused the issue with the subject line of this post.


Jim

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


Difference between Step over and Run

2005-11-21 Thread Jim Hurley
I have noticed in the debugger that there is quite a difference in 
time of execution between


   Step over

and

   Run

even when Run takes me to the very next line of code--a line which is 
also a break point.


When the handler to be Stepped over is complex, the time to execute 
Step over can be prohibitive. In such cases I set a break point at 
the next line and Run to the next line. This is VERY much faster.


Is this a bug? Wouldn't it be better if RR executed Step over as if 
it were a Run to the next line of code? Does the Step over do 
something other than Run to the next line when that next line is a 
breakpoint?


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


Re: Difference between Step over and Run

2005-11-21 Thread Jim Hurley

I have noticed in the debugger that there is quite a difference in
time of execution between

Step over

and

Run

even when Run takes me to the very next line of code--a line which is
also a break point.

When the handler to be Stepped over is complex, the time to execute
Step over can be prohibitive. In such cases I set a break point at
the next line and Run to the next line. This is VERY much faster.

Is this a bug? Wouldn't it be better if RR executed Step over as if
it were a Run to the next line of code? Does the Step over do
something other than Run to the next line when that next line is a
breakpoint?

Jim




I knew it would come to this some day. Here I am responding to my own 
message. (I don't own a cell phone, but I appreciate them 
nevertheless. I can hold my hand to my ear and talk to my imaginary 
friends without attracting undue attention.)


Here is an example of the problem I have with the debugger. The 
following handlers are in a button script:


on mouseUp
  lock screen
  doWindowWork--There is a break point marker at this line.
  beep--There is also a break point marker at this line.
end mouseUp

on doWindowWork
  put the ticks into tStartTime
  put 1 into field 1
  repeat 100
add 1 to field 1
  end repeat
  put cr  the Ticks - tStartTime after msg box
end doWindowWork



When I run MouseUp and Step over the line doWindowWord in the 
debugger, it take 1100 ticks to get to the next line, beep


When I hit Run at dowindowWork it takes 10 ticks to run to the next 
line, beep


Now it gets really weird. If you comment out the lock screen line 
it takes only  30 ticks to step over the doWindowWork line. The 
doWindowWork is 30 fold faster if the screen is not locked. (This 
applies only to scripts run in the degugger.)


Moral: Even though the screen is locked by script, it is not locked 
when running the debugger, UNLESS you Run to the next line. And it 
will run though the window work much faster if you  unlock the window.


Unless someone recognizes this as a known bug in the debugger, I will 
submit it.


You  can try  your luck at:

In the message box:

go stack url http://home.infostations.net/jhurley/WeirdDebugger.rev;

(Be sure to set break point markers at the indicated lines.)


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


Re: mTropolis Refugees

2005-11-17 Thread Jim Hurley


Message: 10
Date: Wed, 16 Nov 2005 16:01:25 -0800 (PST)
From: Janus Jakaterina [EMAIL PROTECTED]
Subject: mTropolis Refugees
To: use-revolution@lists.runrev.com
Message-ID: [EMAIL PROTECTED]
Content-Type: text/plain; charset=iso-8859-1

Are there many mTropolis folk now residing in the land
of Revolution?

If so, how is Revolution for behaviors, aliasing, and
messaging?

Other than the arcade engine, which seems to be a 3rd
party product, can Revolution handle multiple moving
objects or collision detection?



Janus,

Not sure what mTropolis is, but you might check out  Nine ball on 
my web site:


http://home.infostations.net/jhurley/

Actually Run Rev can handle 15 ball pool, but it clutters the table. 
You might also find Bouncing ball tools helpful as well. Depends on 
what you are interested in.


Jim


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


Re: Scripting conference stack available - Standalones

2005-11-08 Thread Jim Hurley


Message: 3
Date: Tue, 8 Nov 2005 07:10:37 +1000
From: Sarah Reichelt [EMAIL PROTECTED]
Subject: Re: Scripting conference stack available - Standalones
To: [EMAIL PROTECTED],  How to use Revolution
use-revolution@lists.runrev.com
Message-ID:
[EMAIL PROTECTED]
Content-Type: text/plain; charset=ISO-8859-1


 The scripting conference will be held at 1131814800 seconds. To convert
 this to your own local time and date:

get 1131814800;convert it to system date and time;put it



So, you've gone on to daylight-savings time. Now it's at 3am my time
instead of 2am. I'm having trouble deciding if that's better or worse
:-)

Yours sleepily,
Sarah



Sarah,

You have Conrad Adenauer to thank for daylight saving time.

And on the issue of standalones, would it be helpful if Run Rev made 
their Installer available? It is very attractive.


Jim


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


[OT] Daylight Savings (Was Re: Scripting conference stack

2005-11-08 Thread Jim Hurley


 

 Sarah,

 You have Conrad Adenauer to thank for daylight saving time.


Actually, I thought it was Benjamin Franklin...

  http://webexhibits.org/daylightsaving/franklin.html

or did he just muse about it?

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



Ken,

That line, attributing daylight savings time to Adenauer, works 
better if you HEAR it rather than read it. :)


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


Re: Constrain Within Circle?

2005-11-05 Thread Jim Hurley


Message: 11
Date: Fri, 04 Nov 2005 22:12:40 -0800
From: Scott Rossi [EMAIL PROTECTED]
Subject: Constrain Within Circle?
To: How to use Revolution use-revolution@lists.runrev.com
Message-ID: [EMAIL PROTECTED]
Content-Type: text/plain; charset=US-ASCII

Anyone have a formula to constrain object dragging within a circular region?

I'm guessing something like Arcade Engine has this in it, but I really only
need this one function.

Thanks  Regards,

Scott Rossi



Scott,

The following script should keep the contol it is in to the inside of 
a circle of radius r. The variable rr is the distance from the mouse 
to the center of the circle at x0,y0. It uses a simple 
proportionality in similar triangles.


local myName,x0,y0,r

on mouseDown
  put the name of me into myName
  put round((the width of this card)/2)  into x0
  put round((the height of this card)/2) into y0
  put 200 into r
end mouseDown

on mouseUP
  put   into myName
end mouseUP

on mouseLeave
  mouseUP
end mouseLeave


on mouseMove u,v
  if myName is  then exit mouseMove
  put sqrt((u-x0)^2 + (v-y0)^2) into rr
  if   rr r then
set the loc of me to x0+(u-x0)*r/rr, y0+(v-y0)*r/rr
  else  set the loc of me to u,v
end mouseMove

Jim



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


Re: Constrain Within Circle?

2005-11-05 Thread Jim Hurley

Scott,

An afterthought. Here are a couple of examples of circular  objects 
confined  inside a circle and, a bit more involved, inside an ellipse.


In the message box.

go stack url http://home.infostations.net/jhurley/ConfinedBalls.rev;

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


Re: Constrain Within Circle?

2005-11-05 Thread Jim Hurley


From: Roger Guay [EMAIL PROTECTED]

Cool, Jim.  And, if you change just one line of your code in the 
mouseMove handler to



   if   rr is not r then


you get an object that is constrained to move on the circle of radius
rr.  This is useful if you want to build a rotary knob for example.




Roger,

Scott and I were working on a problem like the one you describe some 
time ago. But  the question was: Could the rotary knob be used to 
*accumulate* multiple turns by  following the the polar angle. The 
difficulty here was that the angle as reported by RR using the atan2 
function is single valued, that is it returns to the same value after 
one complete revolution. How then do you record the angle *plus* the 
number of revolutions?


But as the knob crosses the branch cut where the angle changes from 
360 back to 0, one can detect this large discontinuity using 
something like: if abs(da)  some small number then add 1 to the 
counter and multiply this  counter by 360, where da is the 
continuously measure difference in polar angle in the mouseMove 
function.


This is hard to explain. Easier to see: In the message box:

go stack url http://home.infostations.net/jhurley/Clock.rev;

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


Re: [Slightly OT?] Why It's Hard to Explain Rev

2005-11-04 Thread Jim Hurley


Message: 19
Date: Fri, 04 Nov 2005 18:17:02 -0800
From: Richard Gaskin [EMAIL PROTECTED]
Subject: Re: [Slightly OT?] Why It's Hard to Explain Rev
To: How to use Revolution use-revolution@lists.runrev.com
Message-ID: [EMAIL PROTECTED]
Content-Type: text/plain; charset=ISO-8859-1; format=flowed

Judy Perry wrote:
  And, when I recently mentioned it to Chris Crawford of 'The Art of

 Computer Game Design,' he said that he only wished that he'd heard of Rev
 before wading neck-deep into Java.


You know the great Chris Crawford?!  He's a god. Loved Siboot -- nothing
like it at the time.

He spoke at a game developer gathering here in LA many years ago -- yep,
he brought his legendary whip to punctuate key points in his talk. :)

Great guy.  He's done so much for the gaming community (not to mention
the Mac community), but in this era of 3D fetishism it doesn't seem his
contributions are as widely acknowleded as deserved.

Tell him it's never too late to start with Rev -- next time I'm up his
way I'd even donate a day of Rev as a second language orientation just
for the chance to talk with him a spell.


-

Richard and Judy,

I suspect this is the same Chris Crawford that was a physics major at 
UC Davis many years back. I never had him as a student but he was 
legendary among his classmates. Always had a stuffed animal under his 
arm--a green frog, as I recall. Very bright, very eccentric.


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


Re: A must have stack for all...

2005-11-03 Thread Jim Hurley


Message: 12
Date: Wed, 02 Nov 2005 17:14:45 -0600
From: Chipp Walters [EMAIL PROTECTED]
Subject: A must have stack for all...
To: How to use Revolution use-revolution@lists.runrev.com
Message-ID: [EMAIL PROTECTED]
Content-Type: text/plain; charset=ISO-8859-1; format=flowed

altEmailHarness
by Chipp Walters using Sean Shao's GREAT libSmtp253



Chipp,

Thanks for this. Don't have any  immediate need yet, but nice to know 
it is there for the future.


Unfortunately it doesn't work for me.

In the log I get: Opening true followed quickly by Closing 
connection, and then a dialog box: Send failed


I tried stepping through the script in the debugger and the failure 
occurs at the line:


start using stack libSmtp253

That stack shows in the Application Browser.

I haven't figured out how to step into the substack for further debugging.

Any thoughts?

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


ANN Sukodu puzzles--again

2005-11-02 Thread Jim Hurley
Our local paper has begun to carry a daily Sukodu puzzle. A friend 
challenged me to solve one that he had trouble with. I couldn't find 
a solution; I kept running into situations where I could find no 
possible entry without guessing.


To work on it I loaded up Alex Tweedly wonderful Sukodu Assistant. 
But I  needed something that would determine in there was a unique 
one-stage solution, i.e. a solution in which there was always at 
least one cell  with a determined digit, given the present 
configuration.


Well, one thing lead to another and Sukodu--see below--resulted. It 
uses Alex's very nice interface. The drop down menu is an excellent 
way to enter this limited assortment of discrete data into a field.


The stack also does an analysis of the puzzle after each step and 
will display in each cell the possible entries. It also looks at the 
constraints on rows, columns, and blocks, to determine what's 
possible in these components--applying the restriction that each row, 
column and block are to contain all nine digits. This analysis is 
displayed in separate fields.


If you choose the mode in which this info is displayed, the solution 
to any puzzle will be trivial. But I found it a very useful tutorial 
to run through a few of the harder puzzles this way. There were 
strategies available which I had never guessed at. (You can toggle 
the display of this analysis on and off with a right-click or 
control-click. You can turn any  entry green with a shift-click. This 
is useful if you have to make a guess. Then, if  you run into a 
contradiction at some point down the road, you can undo back to the 
green entry.)


When the puzzle is first loaded, the stack uses this analysis of 
rows, columns and blocks to run through the puzzle (with the screen 
locked) step by step to obtain a solution--if there is a one-stage 
solution. With this solution available, it is then possible to choose 
a mode of play which will not allow an incorrect entry into a 
cell--comforting.


I have tested this in Mac OS X, but not thoroughly in Windows. I had 
one stinker of a problem with the Window version. It read a menuPick 
handler in a button which I had commented out, and did not pass the 
menuPick message to the card. Took a while to find this bug.


Turned out that the puzzle my friend had given me was missing a 
number. With friends like this


The stack (and file folder) are at:

 http://home.infostations.net/jhurley/SudokuFolder.zip

Keep the file folder with the stack. The folder contains a few 
additional puzzles and a place to save your own.


I may never do one of these Sudoku puzzles again.

Jim

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


Re: ANN: Simple Pendulum Simulation

2005-10-31 Thread Jim Hurley


Thanks, Jim.  I do indeed have this inclination.  In fact my original 
intent was to use the simple pendulum to learn and apply the Runge-
Kutta Method.  I just haven't gotten around to it yet.  Might your 
suggestion be a variation of this?


Cheers, Roger




Roger,

Actually I was thinking of something even simpler than the 
Runge-Kutta approximation.


Using the Euler approximation, the repeat loop to generate the 
pendulum motion is really simple and looks like this:


repeat until the mouseClick
setRA r,270+psi -- Polar coordinates; 270 so that the pendulum hands DOWN
add -c*psi to angVel --Add angular acceleration to the angular velocity
add angVel to psi --Add angular velocity to the angle
end repeat

where psi is the angular displacement of the pendulum.

I am using Turtle Graphics, but I think you get the idea. To see this 
in action, put this in the message box:


go stack url http://home.infostations.net/jhurley/ControlGraphics.rev;

and go to the last card.

Control graphics is a variation on TG. It allows you to identify any 
control as a Turtle which not only responds to Transcript, but also 
to TG. So you can create a circle graphic and call it pendulum and 
then talk to the circle like it was a turtle, i.e. forward 10, right 
90, setXY 20,30, setRA 200,35 etc.


Polar coordinates are particularly  useful in the pendulum problem

I tried to show the dependence of the period on the amplitude but no 
luck so far. Maybe Runga-Kutta is required.


The period depends on the amplitude (to second order in the 
amplitude) in this way:


T = T(0) (1 + A^2/16)

where A is the angular amplitude in radians.

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


Re: ANN: Simple Pendulum Simulation

2005-10-30 Thread Jim Hurley


A simple simulation of a simple pendulum . . .


 revOnlin - User Spaces - RogerG or 
Education.



Cheers, Roger



Roger,

Nice job! Good interface.

If you have the inclination, you might want to tackle the large 
amplitude pendulum. There is no nice analytic solution but you could 
numerically integrate the equation of motion. Something like this:


Let A represent the angle. Then you  would do a numerical integration with

repeat loop
  set the location of the pendulum to R,A --using radial coordinates
  add c *  sine(A) to the angular velocity -- where c depends on the 
mass, L and  g
  --The angular acceleration is proportional to  the torque which is 
proportional to sine(A)

  --For small amplitudes sine(A) = A, in radial coordinates
  add the angular velocity to A
end repeat loop

Where I have assumed the time interval between loops is one second, 
so that dt =1


It would be interesting to show how the period (determined by the 
number of loops between changes in sign of the angular velocity) 
depends on the amplitude. Show that the clock slows down as it runs 
down, i.e. the period decreases with decreasing amplitude--albeit 
slowly; it is a second order effect in the amplitude. That's why 
pendulum clocks work so well.


Jim


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


Re: Creating sub-menus a la the inspector?

2005-10-29 Thread Jim Hurley


Hi Jim,

If I understand correctly your question, you want to build a menu 
with sub-menus (a hierarchical menu).
That's easy using tabs you place in front of menu items to specify 
they are sub-menu items.
With this method, you can build hierarchical menus including as many 
rows as you need.
You will build your menu on-the-fly at mouseDown in the way you want 
according to the number of items you have to display :-)
Have a look at my How to Build and Manage Dynamic Menus available 
from Tutorials Picker to get started:


. How to build on-the-fly a menu with sub-menus from an outline 
stored into a custom property.

. How to add contextual items, checkmark, activate or disable menu
items, etc.
. How to respond to the user's actions: choosing a menu item, using a
keyboard shortcut, etc.



Hi Eric,

Thanks a lot. I tried using the tab before, but  all I got was something like:

Choice 1
Sub a
Sub b
Choice 2
Sub c

Etc. That is the literal result of what I put in the button text.

On exploring further, I see the tab creates a submenu only in Pull 
Down and Pop Up styles. I think that was where I went wrong earlier.


Small bug: If you create a PullDown button, change it to a Combo Box, 
and then back to a PullDown, the button name disappears. Only by 
putting the cursor into the Labels field and hitting return, will the 
button name (not the label name) reappear. This applies to 2.6 and 
2.6.1 alike.


Thanks again,

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


Creating sub-menus a la the inspector?

2005-10-28 Thread Jim Hurley
How would one go about creating those sub-menus in an option menu (or 
whatever) that appear in the inspector when there are more then  20 
menus or fields etc.?


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


Display problems remain in 2.6.1 using OS X

2005-10-26 Thread Jim Hurley

Just got around to downloading 2.6.1.

Haven't had a chance yet to explore all the good bug fixes yet. But, 
the first thing I did was to check the screen refresh problem in OS 
X. That remains a problem. The screen does not refresh after many 
commands that affect the screen, such as set the loc of and 
writing to the screen. In the example:


on mouseUp
  put  into field display
  put Now is the time for all good men to come to the aid of their 
country. into tText

  repeat with i = 1 to the number of chars in tText
put char i of tText after field display
unlock screen
  end repeat
end mouseUp

The line unlock screen (or wait 0 milisec) is necessary in OS X to 
get a smooth banner display.


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


Re: Display problems remain in 2.6.1 using OS X

2005-10-26 Thread Jim Hurley

 Jim Hurley wrote:


 Just got around to downloading 2.6.1.

 Haven't had a chance yet to explore all the good bug fixes yet. 
 But, the first thing I did was to check the screen refresh problem 
 in OS X. That remains a problem. The screen does not refresh after
  many commands that affect the screen, such as set the loc of 

 and writing to the screen. In the example:

 on mouseUp
   put  into field display
   put Now is the time for all good men to come to the aid of their 
 country. into tText

   repeat with i = 1 to the number of chars in tText
 put char i of tText after field display
 unlock screen
   end repeat
 end mouseUp

 The line unlock screen (or wait 0 milisec) is necessary in OS X 
 to get a smooth banner display.



Hi Jim,

I tried this and it looked the same with or without the unlock 
screen.  Do you have another example that might demonstrate the

problem?



Hi Mark,

Yes. In the message box:

go stack url http://home.infostations.net/jhurley/DisplayProblemsOSX.rev;

It illustrates both the set pos  as well as the put char problem. 
Are you running OS X?


I brought this up  at the Monterey conference with Mark Waddingham 
and I sent him the stack above. He said he would see if he could come 
up with a fix.


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


Setting custom properties

2005-10-25 Thread Jim Hurley
I would like to be able to set a custom property to an evaluated 
string. In the following lines of script:



put apples  cr  oranges into tList
put myGroceryList  3 into tName
set the tName of this card to tList

It appears that Run Rev will assign tList to the custom property 
myGroceryList3. But how does it know that the name of the custom 
property is myGroceryList3 and not tName? Does it check to see 
whether tName has a value in the script?


Risky business.

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


Re: Setting custom properties

2005-10-25 Thread Jim Hurley


Message: 12
Date: Tue, 25 Oct 2005 06:26:47 -0700
From: Richard Gaskin [EMAIL PROTECTED]
Subject: Re: Setting custom properties
To: How to use Revolution use-revolution@lists.runrev.com
Message-ID: [EMAIL PROTECTED]
Content-Type: text/plain; charset=ISO-8859-1; format=flowed

Jim Hurley wrote:

 I would like to be able to set a custom property to an evaluated string.

  In the following lines of script:


 put apples  cr  oranges into tList
 put myGroceryList  3 into tName
 set the tName of this card to tList

 It appears that Run Rev will assign tList to the custom property
 myGroceryList3. But how does it know that the name of the custom
 property is myGroceryList3 and not tName? Does it check to see whether
 tName has a value in the script?


You've implicitely declared it by using it as a variable in the line
before.  If a token is in the local variable table it'll be used as such.

--
  Richard Gaskin
  Managing Editor, revJournal
  __



Richard,

Thanks. It is hard to image a more fundamental principle.

I see now that I have been using this fact all along without 
realizing it. For example in such cases as:


put myFIeld  i into tFieldName
put field tFieldName into myVariable

Ah, the dangers of learning only as much about a language as 
necessary to complete the task at hand.


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


Re: OT: Bush in Free Fall

2005-10-22 Thread Jim Hurley


Message: 13
Date: Sat, 22 Oct 2005 09:48:43 -0700
From: Mark Wieder [EMAIL PROTECTED]
Subject: Re: OT: Bush in Free Fall
To: How to use Revolution use-revolution@lists.runrev.com
Message-ID: [EMAIL PROTECTED]
Content-Type: text/plain; charset=us-ascii

Jim-

Friday, October 21, 2005, 5:51:36 PM, you wrote:


 something else. There is some complicated physics there.


Here's a paper on the free-fall physics behind the animation, although
it's still beyond me at the moment, although using Verlet integration
for molecular dynamics does sound appealing:

http://www.gpgstudy.com/gpgiki/GDC%202001%3A%20Advanced%20Character%20Physics

--
-Mark Wieder
 [EMAIL PROTECTED]



Mark,

I didn't look at the link carefully (actually I scrolled rapidly to 
the bottom of the window) but it may not deal with the specific 
problem faced by the falling Bush, not to be confused with the 
burning bush.


That animated character is physically  equivalent, I think, to a 
series of linked rigid rods. So imagine a set of linked rods and an 
impulse is applied to one of them--when it strikes a ball. You know 
the impulse (technically  the integral of the force over time) is 
normal in direction to the surface of the ball at the point of impact 
(and normal to the rod segment as well) and is of such  a value  that 
it brings the point of impact momentarily to rest--the rod 
momentarily rotates about the point of impact. From this one must 
work out how that impulse affects not just that rod but all linked 
rods. It is a nightmare physics problem. Even the manner in which the 
model slithers over the balls is a work or art and physics.


A  simpler problem would be a single falling rod with an angular 
velocity omega and striking a fixed peg. Determine the subsequent 
motion. Not a simple problem. But imaging a series of linked rods?


Someone has a lot of time on his or her hands.

But, thanks for bringing it up. Shows what a dedicated mind can accomplish.

Jim


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


Re: [ANN] StackRunner 1.0.3 available

2005-10-22 Thread Jim Hurley


Just a quick note to let you all know that version 1.0.3 of StackRunner has
been uploaded; this version fixes a bug where the 'closeStack' message
wasn't being sent to the last closing stack.

If this is the first time you've heard of StackRunner, StackRunner is a
simple player application that is similar to the DreamCard Player in that
it will play your MetaCard or Revolution stacks, but it is much simpler
and doesn't present any user-interface elements so it runs cleaner. It's
free, so you can distribute it with any kind of stack.

You can get more information and download it here:

  http://www.sonsothunder.com/devres/revolution/downloads/StackRunner.htm

Enjoy!

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




Ken,

Just a note to say how useful I found StackRunner recently. I was 
working on an application for a friend of mine. There was a lot of 
back and forth. But I only needed to update the file; no need to send 
a giant standalone.


Thank you so much for this.

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


Re: OT: Bush in Free Fall

2005-10-21 Thread Jim Hurley


Message: 18
Date: Fri, 21 Oct 2005 16:52:03 -0700
From: Mark Wieder [EMAIL PROTECTED]
Subject: OT: Bush in Free Fall
To: use-revolution@lists.runrev.com
Message-ID: [EMAIL PROTECTED]
Content-Type: text/plain; charset=us-ascii

All-

completely off topic
But it's Friday and this is way too much fun...

Here's a great flash animation with physics based on Pekka's rag doll.
Be sure to check out Pekka's site while you're at it (especially the
elephants). Warning: not when you have anything else to do for a
while...

http://www.yeeguy.com/freefall/
/completely

obligatory back-on-track content
 Makes me wonder how I would do something like this in runrev.
/obligatory

--
-Mark Wieder
 [EMAIL PROTECTED]



Mark,

That is a masterpiece. A ball falling through a collection of fixed 
balls is doable--not unlike Nine Ball. But this segmented body is 
something else. There is some complicated physics there.


Couldn't find the elephants.

Jim


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


Re: Math wizardry - revisited and corrected.

2005-10-17 Thread Jim Hurley


Message: 6
Date: Sun, 16 Oct 2005 23:09:18 -0400
From: [EMAIL PROTECTED]
Subject: Re: Math wizardry - revisited and corrected.
To: How to use Revolution use-revolution@lists.runrev.com
Message-ID: [EMAIL PROTECTED]
Content-Type: text/plain; charset=us-ascii


 So multiply by (180 / pi)


Alex,

I was able to get the function to work with your earlier suggestion 
multiply by (360/ pi), but using 180 makes it whack out (that's a 
technical term) no matter

what I try.  ;-)

Roger Eller [EMAIL PROTECTED]




Roger,

Alex is right. It should be 180/pi.

Perhaps the problem is how you  measure the angle. Remember that the 
y-axis points down in RR. Angle are measure CLOCKWISE from the 
horizontal.


Jim

PS If you want to test then then run this in the message box:

go stack  url  http://home.infostations.net/jhurley/angleTest.rev;
___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution


Did you get a sex change too?

2005-10-15 Thread Jim Hurley
Is it just me? revSpeechVoices(Male) yields the same speakers as 
reSpeechVoices(Female).


Mac OS 10.4.2  Run Rev  2.6

on mouseUp
  put revspeechvoices(Male) into tList
  repeat for each line tLine in tList
put tLine  cr after msg box
revsetSpeechVoice tLine
revSpeak I've got to stop using those hormones.
wait until  revIsSpeaking()  is false
  end repeat
end mouseUp

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


Re: Did you get a sex change too?

2005-10-15 Thread Jim Hurley


Message: 9
Date: Sat, 15 Oct 2005 17:10:18 +0200
From: Eric Chatonet [EMAIL PROTECTED]
Subject: Re: Did you get a sex change too?
To: How to use Revolution use-revolution@lists.runrev.com
Message-ID: [EMAIL PROTECTED]
Content-Type: text/plain; charset=ISO-8859-1; delsp=yes; format=flowed

Hi Jim,

Bugzilla #2764 (June 2005) entered by Sarah.
Bug noted as new but a quick test with older versions of Rev show
that this bug was present since the introduction of the
revSpeechVoices function (Rev 2.0).
Does not help at all :-(

Le 15 oct. 05 ý 16:48, Jim Hurley a Ècrit :



Thanks Eric. That's a long wait to fix something that would so easy to fixed.

But it would also be hard to think of a bug with a lower priority.

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


Re: Question on message handling

2005-10-13 Thread Jim Hurley


Message: 17
Date: Wed, 12 Oct 2005 17:26:20 -0500
From: Ken Ray [EMAIL PROTECTED]
Subject: Re: Question on message handling
To: Use Revolution List use-revolution@lists.runrev.com
Message-ID: [EMAIL PROTECTED]
Content-Type: text/plain;   charset=US-ASCII

On 10/12/05 2:22 PM, Jim Hurley [EMAIL PROTECTED] wrote:


 What  puzzles me is that the card apparently gets the keyDown message
 before the field does. That is exactly what I am looking for, but I
 don't quite  see why. If I'm typing in a field, why doesn't the
 field get the message before the card? Is that the priority that is
 set when the text is not locked, i.e. card first, field last?


No... in fact I created a simple test stack with a field with this script:

on keyDown
  put Field after msg
  pass keydown
end keyDown

and a card script that said:

on keyDown
  put Card after msg
  pass keydown
end keyDown

And when I clicked in the field, the message box read:

  FieldCard

So the field is definitely getting the message first (which is what I would
expect).


Ken Ray

Jacque and Ken,

Yes, I see. I'm afraid I expressed myself badly--and incorrectly.

I am working on a transcription stack, i.e. a stack which will speak 
an audio file while the user types what he or she hears into a field. 
There is no field script. The card script is:


on keyDown theKey

switch theKey
case /
  send mouseUP to button pause
  break
case \
  send mouseUP to button resume
  break
default
  pass keyDown
end switch

end keyDown

When the user types a / the speech pauses. When the user types  \ 
the speech resumes--actually it backs up a little bit and then 
resumes. The keyboard replaces the usual foot pedal in transcription 
hardware.


What I found surprising (and welcome) is that the back and forward 
slashes never appear in the field. The key stroke is never passed 
back to the field for display after it is caught by the card script. 
(It would be if there were a pass keyDown in the first two case 
statements.) So apparently the field gets the message first, then 
then card (as you both say) and then, if the key stroke is passed by 
the card script, it is passed back to the field display for viewing. 
I was wrong to speak of this last message as part of the conventional 
message passing path. Maybe display message? The keyDown message is 
never *displayed* unless it is passed through all of RR message 
handlers--display is  the last in line. And as Martha Stewart would 
say: It is a good thing.


Thanks,

Jim









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


Re: : Playing audio clips

2005-10-12 Thread Jim Hurley


Message: 9
Date: Wed, 12 Oct 2005 15:18:25 +0200
From: Eric Chatonet [EMAIL PROTECTED]
Subject: Re: : Playing audio clips
To: How to use Revolution use-revolution@lists.runrev.com
Message-ID: [EMAIL PROTECTED]
Content-Type: text/plain; charset=ISO-8859-1; delsp=yes; format=flowed

Hi Jim,

You might be interested in How to Monitor a QuickTime Player by
Script, a tutorial available through Tutorials Picker.
On my website or Rev Online (user: So Smart Software)


 This stack shows you how to monitor a QT player to play music (mp3
 included) and provide all the usual commands, and more, to the user.
 How to know if the right version of QT is installed, manage
 durations, progress, quick searches, sound level, loops, play-
 lists, etc.
 The main commands are embedded in a scripted group, which you can
 export into any project. This scripted group is able to monitor,
 not only sound files, but also the video files as well.
 Print function included.


Best Regards from Paris,

Eric Chatonet.

Le 12 oct. 05 ý 02:02, Jim Hurley a Ècrit :


 New problem:  I have a scrollbar which I would like to use to  show
 the progress of the player. I have tried the following:

 on update
   set the thumbposition of scrollbar duration to the currenttime
 of player myPlayer
   send update to me in 1 sec
 end update

 But the Send command momentarily interrupts the player and the
 speech is bumpy. Is there an asynchronous way to iterate the update

  without  using a send command?



Hi Eric,

Thanks for the heads up. Loved your stack.

I was puzzled that you weren't getting the static 
that I get when the thumbposition of the 
scrollbar is set with the update.


Turns out that my scrollbar has a scrollbarDrag 
handler which sets the currentTime of the player. 
(I want to be able to drag the thumb to any point 
along the bar. This allows me to choose the 
starting point with the slider.)


What I needed was a way to avoid the execution of 
the scrollbar handler when the thumbposition was 
moved by an external handler, but to allow the 
script when the thumb was dragged. That can be 
done with the same device one uses in a mouseMove 
handler. I added a mouseDown handler in the 
scrollbar which puts  a value into the variable 
myName and then exiting the scrollBarDrag handler 
if myName is empty.


Thanks again,

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


Question on message handling

2005-10-12 Thread Jim Hurley
I guess I can't get away with claiming that this is a beginners 
question. Been at it too long for that. But I  haven't worked much 
with fields and so this is an elementary question on that subject.


I have a field in which  the lockText is false so I can type into the  field.

I have a card handler to respond to keyDown messages--the default in 
the select script is pass keyDown.


What  puzzles me is that the card apparently gets the keyDown message 
before the field does. That is exactly what I am looking for, but I 
don't quite  see why. If I'm typing in a field, why doesn't the 
field get the message before the card? Is that the priority that is 
set when the text is not locked, i.e. card first, field last?


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


: Playing audio clips

2005-10-11 Thread Jim Hurley


Message: 1
Date: Mon, 10 Oct 2005 10:41:52 -0700
From: Mark Talluto [EMAIL PROTECTED]
Subject: Re: Playing audio clips
To: How to use Revolution use-revolution@lists.runrev.com
Message-ID: [EMAIL PROTECTED]
Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed


On Oct 10, 2005, at 8:23 AM, Jim Hurley wrote:

 As far as I can make out  from the documentation one can only  
 start (from the  beginning) and stop an audio clip. It is not 
 possible to pause,  resume or control the speed.



  Did I get this right?




Jim,

If you use a player control to handle the audio, you can do all of
the above.

Mark Talluto



Mark,

That is encouraging.

However I'm having trouble getting started. Apparently the sound file 
cannot  be an imported sound file but  a referenced file on disk.


So, I find I can start the play  with:

  Play /Users/jameshurley/Desktop/myAudio.wav

Now, where does the player come in? How do I get the player to 
control the play? How does the player pause, change volume or speed 
of this sound file?


Jim



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


Re: : Playing audio clips

2005-10-11 Thread Jim Hurley


Message: 13
Date: Tue, 11 Oct 2005 08:42:26 -0700
From: Scott Rossi [EMAIL PROTECTED]
Subject: Re: : Playing audio clips
To: How to use Revolution use-revolution@lists.runrev.com
Message-ID: [EMAIL PROTECTED]
Content-Type: text/plain; charset=US-ASCII

Recently, Jim Hurley  wrote:


 I'm having trouble getting started. Apparently the sound file
 cannot  be an imported sound file but  a referenced file on disk.

 So, I find I can start the play  with:

  Play /Users/jameshurley/Desktop/myAudio.wav

 Now, where does the player come in?


 set the fileName of player myPlayer to \
/Users/jameshurley/Desktop/myAudio.wav

To pause:
 set the paused of player myPlayer to true

To check player status:
 get the paused of player myPlayer



 How do I get the player to
 control the play? How does the player pause, change volume or speed
 of this sound file?


See player properties such as:
 duration (media length)
 currentTime (current player position)
 playRate (speed)
 playLoudness (volume)


Regards,

Scott Rossi
Creative Director
Tactile Media, Multimedia  Design
-


Thanks Scott. Just what I needed to get started.

New problem:  I have a scrollbar which I would like to use to  show 
the progress of the player. I have tried the following:


on update
  set the thumbposition of scrollbar duration to the currenttime of 
player myPlayer

  send update to me in 1 sec
end update

But the Send command momentarily interrupts the player and the 
speech is bumpy. Is there an asynchronous way to iterate the update 
without  using a send command?


Jim

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


Playing audio clips

2005-10-10 Thread Jim Hurley
As far as I can make out  from the documentation one can only  start 
(from the  beginning) and stop an audio clip. It is not possible to 
pause,  resume or control the speed.


Did I get this right?

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


Re: Can one pause revSpeak?

2005-09-29 Thread Jim Hurley




  As an alternative I have put  this handler into the field:


 on mouseUp
put the clickchunk into tChunk
set the tClickChunkStart of field 1  to word 2 of tChunk
revstopSpeech
 end mouseUp


 And stop speech by ckicking on the point where I wish the next speech
 to begin on resuming.


  And then resume speech from char  tClickChunkStart  to char -1 of field 1.




How about setting up a loop that reads a sentence then waits until
revIsSpeaking goes to false. After that, check for a key or mouseDown
or checkbox set and either go on to the next sentence or stop, while
remembering which sentence was next. Then a Resume button or
keystroke could start the loop again.

Cheers,
Sarah



Sarah,

That works. It has the advantage that the locktext of the field can 
be set to false, leaving the field open to editing.


The advantage of using  the clickChunk is that I have more freedom on 
where to resume speaking. No need to begin at the next sentence.


I will try both for a while to see which works best.

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


Re: Can one pause revSpeak?

2005-09-29 Thread Jim Hurley


Message: 3
Date: Wed, 28 Sep 2005 12:22:43 -0700
From: Phil Davis [EMAIL PROTECTED]
Subject: Re: Can one pause revSpeak?
To: How to use Revolution use-revolution@lists.runrev.com
Message-ID: [EMAIL PROTECTED]
Content-Type: text/plain; charset=ISO-8859-1; format=flowed

You could roll your own:

- at speech start, store the seconds in tStartSecs

- at speech pause, calc the [approximate] number of the
   last word spoken:
 put (revSpeechSpeed / 60) * (the seconds - tStartSecs) \
 into tPauseWord

- at speech resume, start at the resume point:
 revSpeak (word tPauseWord to -1 of tMyWordContainer)

Actual implementation will be a little more complicated than this,
because you will have to accumulate the speech duration times as you go,
and subtract that from tStartSecs each time you resume.

FWIW -
Phil Davis



Phil,

Thanks for the suggestion. I was unaware of RR's revSpeechSpeed property.

Unfortunately it is not very reliable. At a speed set at 150, rev 
might speak anywhere from 128 to 154.


As an alternative I have put  this handler into the field:

on mouseUp
  put the clickchunk into tChunk
  set the tClickChunkStart of field 1  to word 2 of tChunk
  revstopSpeech
end mouseUp


And stop speech by ckicking on the point where I wish the next speech 
to begin on resuming.


And then resume speech from char  tClickChunkStart  to char -1 of field 1.

Not exactly what I wanted, but  it will do.

Thanks again,

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


Re: Neural network stacks?

2005-09-28 Thread Jim Hurley


Message: 1
Date: Tue, 27 Sep 2005 10:26:30 -0700 (PDT)
From: Eric Engle [EMAIL PROTECTED]
Subject: Neural network stacks?
To: use-revolution@lists.runrev.com
Message-ID: [EMAIL PROTECTED]
Content-Type: text/plain; charset=iso-8859-1

Hi,

I'm starting to learn about neural networks and hoping some stacks are out
there somewhere. Any leads are appreciated!

__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around
http://mail.yahoo.com



Eric,

This has little to do with neural networks but is at least network-related.

From my web site(http://home.infostations.net/jhurley/):

In reading the book Linked by Albert-Laszlo Barabasi, I was 
startled by the statement: When you add enough links such that each 
node has an average of one link, a miracle happens: A unique giant 
cluster emerges, a linked network evolves. This is a reference to a 
theorem of Paul Erdos on the theory of random graphs. Take N nodes; 
add N links between nodes; chances are that all the nodes are linked 
to one another. This stack was my attempt to verify this theorem.
The Web is such a graph, a collection of web pages linked together. 
Other examples are the brain, a crystal, a body of cells, and group 
of acquaintances.


To  download the stack from my web site control click on the link 
network or in the message box run:


go stack url go stack url http://home.infostations.net/jhurley/Networks.rev;

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


Re: another yucky geometry question

2005-09-28 Thread Jim Hurley


Message: 7
Date: Tue, 27 Sep 2005 15:51:40 -0700
From: TJ Frame [EMAIL PROTECTED]
Subject: Re: another yucky geometry question
To: How to use Revolution use-revolution@lists.runrev.com
Message-ID: [EMAIL PROTECTED]
Content-Type: text/plain; charset=ISO-8859-1

Jim.. wow that is one amazingly useful function for my needs.. just played
around with it by hooking it up to mulitple sliders and its going to be
super useful for my project!
 PS: I dont know what type of system you are using, but on my computer the
function takes less that 1 millisecond even with the step 4 part removed. I
get nothing but 0 milliseconds when I run the function. I'm running
a 1.7ghz p4 with 2 1/2 gigs of Ram..
  - TJ




TJ,

Thanks. Glad it was useful. I did a little playing the drawEllipse 
handler myself. Things like the script below. It grows the ellipse as 
it moves it across the screen. One could also rotate the ellipse as 
it moves.


It would be nice if RR would allow one to set the angle of an 
ellipse. My function would then be obsolete. Has anybody requested 
this enhancement?


On the issue  of speed. My  system is not fast, a PowerBook G4, 
running at 1.67 GHz.  Are you sure you are putting the millisec into 
the start and end times? I'm envious.


on mouseUp
  put the millisec into tStartTime
  put 300 into x0
  put 300 into y0
  put 100 into a
  put  30 into b
  repeat with phi = 1 to 360 step 4
drawEllipse a,b,phi,x0,y0
wait 0 millisec
--The above line is ecessary to get a screen refresh in Mac OS X
--Wish Mark would fix this.
add 5 to x0
add 1 to b
  end repeat
  put the millisec - tStartTime
end mouseUp

on drawEllipse a,b,tAng,xLoc,yLoc
  repeat with aa = 1 to 360 step 4
put r(aa,tAng,a,b,) into r
put round(xLoc+ r*cos(pi/180*aa)),round(yLoc+r*sin(pi/180*aa))  
cr after tPoints

  end repeat
  set the points of grc ellipse2 to tPoints
end drawEllipse


function r angl,phi,a,b
  put cos(pi/180*(angl+phi)) into c
  put sin(pi/180*(angl+phi)) into s
  return sqrt(1/(c*c/a/a + s*s/b/b))-- Ellipse at angle phi
end r

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


Can one pause revSpeak?

2005-09-28 Thread Jim Hurley
I use Run Rev to read articles back to me. I find that it is a useful 
writing tool, both for purposes of style and finding typos. There is 
a big difference between the written and spoken word and it is 
helpful to have both at one's disposal.


I have a little stack for this purpose. Very  simple. Two buttons and 
a text field. The script for the start button is:


on mouseUp
  get the selectedText
  if it is  then get field 1
  revspeak it
end mouseUp

And the stop button is just revStopSpeech.

But as I listen, I find things I want to change. This means stopping 
speech, making the  change (in Word, not in the RR field) and then 
selecting the text from the stop point.


It would be nice if I had  Pause and Resume buttons which would 
allow me to pick up where I left off without  having to find the stop 
point and re-select the text.


Anyone know if a way to pause revSpeak and then pick up  where you left off?

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


Re: another yucky geometry question

2005-09-27 Thread Jim Hurley

TJ,


P.S. Over night thoughts:

If one wanted to extend the drawing of an ellipse bounded  by radial 
lines with origin at the vanishing point, the  function drawEllipse 
would be helpful.


The difficult part would be determining the values of a,b,tAng, xLoc 
and yLoc such that the ellipse is property sized, angled and 
positioned so that it lies tangent to the given radials.


Jim


on drawEllipse a,b,tAng,xLoc,yLoc

  repeat with aa = 1 to 360 step 4 --4 is a compromise: min jaggies 
in min time.

put r(aa,tAng,a,b,) into r
put round(xLoc+ r*cos(pi/180*aa)),round(yLoc+r*sin(pi/180*aa))  
cr after tPoints

  end repeat
  set the points of grc ellipse to tPoints

end drawEllipse


function r angl,phi,a,b

  put cos(pi/180*(angl+phi)) into c
  put sin(pi/180*(angl+phi)) into s
  return sqrt(1/(c*c/a/a + s*s/b/b))-- Ellipse at angle phi

end r

drawEllispe 100,40,30,300,400 will draw an ellipse with a = 100, b = 
40, at an angle of 30 degree and with a loc of 300,400



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


Re: another yucky geometry question

2005-09-27 Thread Jim Hurley


Message: 3
Date: Mon, 26 Sep 2005 18:53:36 -0700
From: TJ Frame [EMAIL PROTECTED]
Subject: Re: another yucky geometry question
To: How to use Revolution use-revolution@lists.runrev.com
Message-ID: [EMAIL PROTECTED]
Content-Type: text/plain; charset=ISO-8859-1

Thanks so much Jim, but alas, as this screenshot shows neither axis will
ever be parallel since this is a 2D perspectiev drawing utility. This second
image of the link is a screenshot shows a typical VP setup that might exist
and all the variations of ellipses that might result...
 http://www.tjframe.com/EllipseExample.htm
 But as I alluded to earlier, Perhaps this would be beyond the scope of
something I could implement. I know that 3D do ellipses every day, all day
long, so I had assumed it would be a straightfoward task. But I guess they
use matrix calculations to generate the points of the object rotated and
stuff. Perhaps I would need to have a 3D underpinning for the ellipse stuff
to work..
 For now I'll put that feature on hold.
 Thanks again guys,
 - TJ


TJ,

Using the drawEllipse handler it is not hard to draw an ellipse of 
any dimension, at any angle, at any location. It is fairly  quick, 
about 8 or 9 millisec. But, as I said, there would be a fair bit of 
calculation required to GET the proper loc, dimensions, and angle. 
You would need to expand on the calculation I used in the stack 
ellipseInAbox to make the ellipse tangent to the radial lines. A 
bit of work, but doable.


Jim

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


ANN: Info-Matic, a too to manage information

2005-09-27 Thread Jim Hurley


Message: 20
Date: Tue, 27 Sep 2005 10:05:50 -0600
From: Roger Guay [EMAIL PROTECTED]
Subject: ANN:  Info-Matic, a too to manage information
To: use-revolution@lists.runrev.com,
[EMAIL PROTECTED]
Message-ID: [EMAIL PROTECTED]
Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed

Hello all,

I would like to announce my humble offer of an information management 
tool I call Info-Matc.  Info-Matic is a tool that manages your 
collection of trivia, interesting facts, recipes, scripts and general 
information of almost any type.  This tool is easy to use with an 
index card (Info Card) and storage Basket metaphor.  Simply create 
Info Cards as you need them, and drag them to Basket categories of 
your choosing.


I am sharing this as a Rev stack for the time being, and it's 
available for free at the User Spaces of revOnline.  Look for Info-
Matic under RogerG or General category.  Give it a try, be sure to 
read the Help screen, and let me know what you think.


Cheers, Roger




Roger,

Nothing happens when I click on Show.

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


Re: another yucky geometry question

2005-09-26 Thread Jim Hurley


Message: 1
Date: Sun, 25 Sep 2005 22:22:17 -0700
From: TJ Frame [EMAIL PROTECTED]
Subject: another yucky geometry question
To: How to use Revolution use-revolution@lists.runrev.com
Message-ID: [EMAIL PROTECTED]
Content-Type: text/plain; charset=ISO-8859-1

Hi everyone,
 Does anyone know a good place to look for ( or know of any example stacks)
that might shed light on how to plot an ellipse inscribed within a 4 sided
polygon like in the examples I created here:
http://www.tjframe.com/EllipseExample.htm
 I can handle the polygon, as well as finding the midpoints of the lines,
the center of the polygon etc. ..just not sure about fitting that ellipse
inside it. Curse my math - resistant brain!
 Any pointers would be, as usual, greatly appreciated :)
  - TJ



TJ,

Tough problem. It would be difficult even to make it a well-defined 
problem, i.e. a problem with a unique solution.


Given an ellipse which fits inside a given quadrilateral, one would 
always rotate the ellipse a bit and fiddle with it a bit to find 
another. And only in a special case would the ellipse be tangent to 
the quadrilateral at the midpoints of the four sides.


Do you want to do this dynamically in your stack or just illustrate 
some examples? Would it help to fit bezier curves inside the 
quadrilaterals?


Jim

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


Re: another yucky geometry question

2005-09-26 Thread Jim Hurley


Message: 15
Date: Mon, 26 Sep 2005 13:47:41 -0700
From: TJ Frame [EMAIL PROTECTED]
Subject: Re: another yucky geometry question
To: How to use Revolution use-revolution@lists.runrev.com
Message-ID: [EMAIL PROTECTED]
Content-Type: text/plain; charset=ISO-8859-1

Thanks for your help guys, I didn't realize it was so tough a problem to
solve :(
 perhaps I'll have to rethink the way I'd like to implement them.


TJ,

I think I see what you are looking for: An ellipse which is tangent 
to the two radial lines and the two end lines. confined between the 
two end lines--also tangent to the ellipse.


The stack below calculates the point on the ellipse where the tangent 
to the ellipse is parallel to the  radial lines and then puts the 
ellipse there. I have confined myself to the case where the major 
axis of the ellipse is parallel to the x axis. It gets grubby 
otherwise. This was fun. I hate grubby.


In the message box:

   go stack url http://home.infostations.net/jhurley/EllipseInAbox.rev;

Hope this helps.

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


ANN: Word game tools

2005-09-18 Thread Jim Hurley
Been working on word puzzles and have come up with some things that 
others may find useful.


This stack will:

1) Produce all permutations of a given character set using the 
interweave algorithm. (These permutations get very big in a hurry. 
The number of permutation in the Run Rev license code. There are 40 
characters and therefore 40! permutations and 40! = 8.16 x 10^47. 
Don't tell Heather that I've been looking at the license code.)


2) Produce all words that can be formed from a character set, i.e. 
solves anagrams.


3) Includes an anagram word game--very crude.

4) Includes a cryptogram word game--it downloads four quotations 
daily from the Web and encrypts them for your decoding pleasure. It 
also includes a decoder utility.


In the message box: go stack url 
http://home.infostations.net/jhurley/WordTools.rev;


This is a 0.5 meg file--large dictionary--so be patient (2 or 3 
minutes) if you are on a 56K modem.


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


Re: [ANN] StackRunner 1.0.2

2005-09-09 Thread Jim Hurley


Message: 7
Date: Thu, 08 Sep 2005 14:24:06 -0500
From: Ken Ray [EMAIL PROTECTED]
Subject: [ANN] StackRunner 1.0.2
To: Use Revolution List use-revolution@lists.runrev.com,MetaCard
List metacard@lists.runrev.com
Message-ID: [EMAIL PROTECTED]
Content-Type: text/plain;   charset=US-ASCII

Based on input and suggestions, this new version of StackRunner allows you
to configure how you want SR to handle things when the last stack it opened
as been closed - you can quit it, or you can bring up a new Please select a
stack answer file dialog. This can be part of the config.srn file, or you
you let it take its default behavior.

For more info, please see:

http://www.sonsothunder.com/devres/revolution/downloads/StackRunner.htm

Have fun!

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



Ken,

Thanks for the Runner. I love the simplicity.

I have had no occasion to use DreamCard so I'm not familiar with its 
limitations. (I can see occasions when I would prefer DreamCard--or 
StackRunner--to building an app. It would be most helpful working 
with a user during the development stages. Updates would consist only 
of the new stack without the need to continually carry the baggage of 
the full application.)


But help me out a bit. StackRunner comes in at 3.6 megs, and 
DreamCard at 2.1 megs.


What are the differences and when would one choose StackRunner and 
when DreamCard?


Thanks again for all you do for the Rev community.

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


Re: [ANN] Web site re-launched

2005-09-09 Thread Jim Hurley


Message: 8
Date: Fri, 9 Sep 2005 08:05:54 +1000
From: Sarah Reichelt [EMAIL PROTECTED]
Subject: [ANN] Web site re-launched
To: How to use Revolution use-revolution@lists.runrev.com
Message-ID: [EMAIL PROTECTED]
Content-Type: text/plain; charset=ISO-8859-1

Hello All,

I have finally got around to a re-design of my Revolution web site
http://www.troz.net/Rev/ to make it easier to find things. I've also
added some new stacks, and hopefully there will be more to come in the
next few weeks as I get myself organised.

I have also changed to using Gmail for all Revolution list emails. I
find the threading really good and I like being able to read  reply
to the list from any computer. If anyone wants an invitation to join
Gmail, let me know off-list and I will be happy to send some out.

Have fun,
Sarah
[EMAIL PROTECTED]




Sarah,

Thanks for the re-design.

 I know I will have use for the Pending messages manager in 
debugging stacks with lots of messages floating around. It is good to 
know what messages are pending, not just when they are sent as with 
RR's message watcher.


Jim


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


Re: Little Diversion - Happy Trails

2005-09-07 Thread Jim Hurley


Message: 2
Date: Tue, 06 Sep 2005 10:59:38 -0700
From: Scott Rossi [EMAIL PROTECTED]
Subject: Little Diversion - Happy Trails
To: How to use Revolution use-revolution@lists.runrev.com
Message-ID: [EMAIL PROTECTED]
Content-Type: text/plain; charset=US-ASCII

I posted a little image experiment I found on my drive from a while ago.
Enter the following in your message box:

  go url http://www.tactilemedia.com/download/happy_trails.rev;

Regards,

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



Scott,

Mesmerizing, with duration time about 300.

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


ANN: Line shaper

2005-09-07 Thread Jim Hurley

I have always wondered about the feasibility of a shaper graphic tool.

By shaper tool I mean a circular graphic which may be used to nudge 
a graphic line to conform locally to the shaper. That is, as the 
circle moves against the line, the line conforms to the circular 
shape of the shaper.


Imagine a string lying of a flat surface. Slide a circular disk into 
the string. The string will be deformed to the shape of the disk. 
(Well, not quite. The length of the sting is fixed; the length of the 
Rev graphic line is not fixed. Instead the number of graphic  points 
is fixed. It might be interesting to try to keep the length of the 
graphic line fixed.)


This works by pushing the graphic points ahead of the shaper. (You 
can see this by making the Marker Points visible.)


This tool works poorly when the graphic points become widely 
separated. For most purposes, the bezier tools still work best for 
constructing lines with a complex shape. But some may find the shaper 
useful in some situations.


In the message box run the following:

go stack url http://home.infostations.net/jhurley/ShapeLine.rev;

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


Re: CamelCase

2005-08-29 Thread Jim Hurley


Message: 5
Date: Mon, 29 Aug 2005 13:09:20 +0200
From: david bovill [EMAIL PROTECTED]
Subject: CamelCase
To: How to use Revolution use-revolution@lists.runrev.com
Message-ID: [EMAIL PROTECTED]
Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed

What's the quickest way to find all the CamelCase words in some text
- anyone have a regular expression or script for this?




David,

Depending on the complexity of your text, you might find the 
following function useful:


function thereIsAnInteriorCapitalLetter tText  --Self referential name
  delete char 1 of tText
  delete char -1 of tText
  set the caseSensitive to true
  if toLower(tText)= tText then
return false
  else return true
end thereIsAnInteriorCapitalLetter

Jim

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


OT: Another NPR puzzle

2005-08-28 Thread Jim Hurley

Here is another NPR (National Public Radio) puzzle:

From listener Frank Morgan, a mathematician at Williams College. (He 
also has a puzzle page at mathchat.org.) Think of a word whose 
meaning you can make plural by adding an A at the start. Start with a 
very common singular noun, add the letter A at the beginning, and 
you'll make the meaning plural. What word is it?


Note that the meaning is made plural, not the word itself.

The straightforward approach is not very fruitful. Listing all words 
which can be derived by  pre-pending the letter a yields 559 words. 
Hard to find the word satisfying the conditions of the puzzle from so 
large a list.


The best I was able to do was a list of 103 words to choose from. (I 
realize that that statement is enigmatic.)


To save time it is imperative that the dictionary be converted to an 
array, i.e. for each word (tWord) in the dictionary:


put  true into dictArray[tWord]

The dictionary is  compressed in a custom variable--see the Get 
started button.


This is harder than the last NPR  puzzle. In the message box run:

   go stack url http://home.infostations.net/jhurley/NPRpuzzle.rev;

It is a large file (370k) so be patient.


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


OT: Search content of your Rev files

2005-08-24 Thread Jim Hurley
For those of you using OS X 3 and those using OS X 4 but have not 
been successful with Spotlight, there is an alternative called 
EasyFind, free and available at:


http://www.macupdate.com/info.php/id/11076

To search for Rev file content it is necessary to include (under the 
light switch icon) either the file extension (.rev) if there is one, 
or the type code or Rev: 'RSTK'  (Be sure to include the single quote 
at each end.) The later is safer. It will search all Rev files, 
extension or no.


EasyFind is much slower than Spotlight but MUCH more reliable.

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


OT: Computer Science in today's market

2005-08-23 Thread Jim Hurley
Thought some  of you might be interested in this article from the NYT 
on Computer Science as a major in today's world of technology and the 
problems with off-shoring of programming jobs.


TECHNOLOGY   | August 23, 2005
http://www.nytimes.com/2005/08/23/technology/23geeks.html?ex=1125460800en=6b61cc74c14ba4afei=5070emc=eta1ATechie, 
Absolutely, and More

By STEVE LOHR
For computer science students, expanding expertise beyond programming 
is crucial to future job security as technology jobs move to India 
and China.


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


Re: use-revolution Digest, Vol 23, Issue 66

2005-08-19 Thread Jim Hurley


Message: 17
Date: Fri, 19 Aug 2005 13:13:40 -0400
From: Jon [EMAIL PROTECTED]
Subject: resolution of Time in Rev
To: Revolution List use-revolution@lists.runrev.com
Message-ID: [EMAIL PROTECTED]
Content-Type: text/plain; charset=ISO-8859-1; format=flowed

I'm trying to schedule something to happen some time in the future.  Due
to some other complexities, I cannot just do a

send mouseUp to me in 1000 seconds

Rather, I have to wake up every 10 seconds and figure out whether it is
time to do the processing or not.  The current code is presented below.

The interesting thing is that, despite the claim that Rev times are in
seconds, and even in milliseconds, the values I'm seeing are in
increments of 60 seconds.  I flagged a line in the code below.  Rather
than seeing 60 and then 50 and then 40, etc, I instead see 60 6
times and then 0.  Am I doing something wrong?  Or, rather, what am I
doing wrong?

BTW: feel free to show me how I should have written this: it is hugely
awkward and could be done much easier in languages that I know better.

:)

Jon

on mouseup
   local mostRecentFTPTime
   -- is it time yet?
   convert the date  the time to dateItems
   subtract field TestFreq from item 5 of it
   convert it to seconds
   put item 1 of it into currTime
   if currTime  mostRecentFTPTime then
  -- show the user how long before next test
  set the text of field TimeToGo to mostRecentFTPTime - currTime 
 secs to go  --  this is the line I'm talking about
  send mouseUp to me in 10 seconds
  exit mouseUp
   end if


  --  do the FTP stuff here!

   convert the date  the time to seconds
   put it into mostRecentFTPTime
   send mouseUp to me in 10 seconds
end MouseUp




Jon,

The information in the variable mostRecentFTPTime is lost after 
mouseUp is run. To save that data you might want to consider a custom 
variable, for example: set the mostRecentFTPTime of me to it, and 
earlier: if currTime  the most mostRecentFTPTime of me then


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


Re: resolution of Time in Rev

2005-08-19 Thread Jim Hurley

Jon,

I should have pointed out in my previous response that the way to 
find these problems in the future is to use the RR debugger. If you 
set a break point at the  line:


if currTime  mostRecentFTPTime then...

and if you open the Variable watcher you  would see that the 
variable mostRecentFTPTime is empty on each  go around. You would 
then easily recognize the need for permanence, either using a global 
or custom variable.


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


OT: Super-computer studies aerodynamics of the potato chip

2005-08-19 Thread Jim Hurley

This from todays NYT:

Once the exclusive territory of nuclear weapons designers and code 
breaker, ultrafast computers are increasingly being used in every day 
product design. Procter  Gamble used a supercomputer to study the 
airflow over its Pringles potato chips to help stop them from 
fluttering off the company's assembly lines.


Today the potato chip, tomorrow the Shuttle.

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


Ask does not put empty into it when Cancel is clicked.

2005-08-18 Thread Jim Hurley

Is this a known change in 2.6?

The scrip below functioned as expected in Rev 2.5.  When the user 
click Cancel in response to the ask command the it variable was 
set to empty. Not so in 2.6.


In 2.6 the script behaves differently. When the user clicks Cancel, 
there is a error response. The ask command does not return empty to 
the it variable--I'm not sure what it is. It shows empty but 
charToNum  return the zero character.


From the Docs:

If the user cancels the dialog, the it variable is set to empty 
and the result function returns cancel.




on mouseUp
  ask What field to save?
  --User clicks Cancel
  if it is not empty then
--Debugger steps into this line even
--though Cancel was clicked.
put it into temp1 --Shows empty
put chartonum(it) into temp2 --Shows 0, i.e. zero
put the result into temp3--Shows empty but should be cancel
put field it into tContents --Error message
  else put field 1 into tContents
  ask file Put where?
  if it is not empty then
put file: it into tFileName
put tContents into url  tFileName
  else
beep
exit mouseUP
  end if
end mouseUp

There is a work-around. Test the the result not it, i.e. use: If 
the result is not empty.


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


  1   2   3   4   5   >