Re: [OT] iPhone anyone?

2007-07-13 Thread wouter


On 01 Jul 2007, at 07:42, Chipp Walters wrote:

-- snip --

  - Battery good for only 400 charges, then you have to return the  
phone
  to Apple (what do you do for a phone while it's getting a new  
battery

  replacement?


-- snip --

FYI  :   http://www.macworld.com/weblogs/macword/2007/07/ 
iphonebattery/index.php


Greetings,

Wouter
___
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


extra mousedown messages

2007-05-02 Thread Wouter

Hi All,

Having had some problems caused by extra messages generated in  
certain cases, I started hunting them down.

For this I used the following recipe:

- create a mainstack and add a push button and a field with locktext  
true.

- set the script of the card or the stack to:

on mousedown
  if the optionkey is down then
put 
exit to top
  end if
  put mousedown  the target  the millisecs   cr after msg
end mousedown

on mousedoubledown
  put mousedoubledown  the target  the millisecs   cr after msg
end mousedoubledown

- try performing a mousedubbledown and keep the mouse down
- then release the mouse button and observe what happens

Seemingly it gives the same results on Win32 and on MacOSX.
I'll give the results with a push button:

in rev 1.1:
mousedown button New Button 1 1178096016059
mousedoubledown button New Button 1 1178096016178
-- mouse released : no further messages

in rev 2.1:
mousedown button Button 1 1178096229057
mousedoubledown button Button 1 1178096229203
mousedoubledown card id 1002 1178096229208
-- mouse released : no further messages

in rev 2.5.1:
mousedown button Button 1178096730853
mousedoubledown button Button 1178096731000
mousedoubledown card id 1002 1178096731013
-- mouse released --
mousedown button Button 1178096731733

in rev 2.8.1
mousedown button Button 1178096881969
mousedoubledown button Button 1178096882131
mousedoubledown card id 1002 1178096882145
-- mouse released --
mousedown button Button 1178096883161

Question: is this considered normal behavior?

PS: this is not the only condition extra messages are generated.


TIA.
Greetings,
Wouter

___
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: TARGET bug..please check

2007-05-01 Thread wouter

Hi,

For what it is worth, as there is still a focus problem with the  
answer dialog box in rev 2.8.1 on OS X  (it still needs 2 clicks),
I added  a focus on line to the script after which it seems to work  
more or less normally here (in OS X), the selecting part that is.


on closeField
  if the text of the target is not empty and the text of the target  
is not a number then

beep
answer Please enter a number.
focus on the target  
select text of the target
  end if
end closeField

Greetings,
Wouter

On 01 May 2007, at 04:25, Chipp Walters wrote:


I've discovered what I believe is to be a significant bug in the
latest release version of 2.8 and would like to verify before I post
it.

The bug has to do with a simple target expression and has to do with
existing groups on a card. It's very easy to test, if you don't mind
please check it on your system and let me know what you find. Thanks
in advance.

put into the message box and hit return:

go URL http://www.gadgetplugins.com/chippstuff/TargetBUG.rev;

best,
Chipp


___
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: TARGET bug..please check

2007-05-01 Thread wouter


On 01 May 2007, at 22:07, Chipp Walters wrote:


Whoops! Spoke too fast.
Wouter, thanks for the 'focus on the target' but it doesn't work with
the following stack.
Check it out:

put in the message box and hit return.

go URL http://www.gadgetplugins.com/chippstuff/TargetBUG2.rev;

Turns out if there is a LIST field on a lower layer, the 'focus on the
target' just doesn't work.
I'll post to bugzilla.

-Chipp


Hi again,

That is why I used more or less.
The workaround I normally use to not let the updates by the engine  
screw up
the intentions of a script (because this case is no real exception),  
is to get behind those updates.

Something like this:

on closeField
  if the text of the target is not empty and the text of the target  
is not a number then

beep
put the id of the target into tTarId
answer Please enter a number.
--  the amount of millisecs may be related to processor speed
send epilogue  tTarId to me in 10 millisecs
  end if
end closeField

on epilogue x
  focus on control id x
  select text of control id x
end epilogue

ps: and in this particular case I would add an exitfield handler

Greetings,
Wouter
___
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: TARGET bug..please check

2007-05-01 Thread wouter


On 02 May 2007, at 04:06, Chipp Walters wrote:


Wouter,

Yep, I ended up doing something along the lines of what you and Ken
suggested. Though, why do you suggest adding an exitField handler?
Just in case?

-Chipp


Chipp,

Not really just in case.
Your second example stack will not have the modal functioning  
without an exitfield handler.
Once the dialog box is dismissed another field can be focussed (which  
was not the case in your first example stack).

In OS X that is, I don't have a winbox here to test.

on exitfield
   closefield
end exitfield

will force the re-evaluation from the closefield handler.

Greetings,
Wouter
___
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: Identifying an IP address

2007-04-06 Thread wouter

JB,

On 06 Apr 2007, at 11:06, jbv wrote:

-snip-



yes, I'm using Regex :

 put (\d{1,3}\.){3}\d{1,3} into myRegex
 get matchtext(myIP , myRegex)

but this one detects only 4 patterns of 1 to 3 digits separated
by dots, hence my original concern : it will also include non
valide IPs such as 999.999.999.999, as well as private IPs...



if you want to check an ip number without a port number attached try  
this:


put ^((\d|[01]?\d\d|2[0-4]\d|25[0-5])\.){3}(\d|[01]?\d\d|2[0-4]\d|25 
[0-5])$ into myRegex


Greetings,
Wouter
___
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: If the visible of the menubar is true?

2006-11-01 Thread wouter


On 01 Nov 2006, at 04:13, Ken Ray wrote:


On 10/31/06 9:01 PM, Ken Ray [EMAIL PROTECTED] wrote:

On 10/31/06 8:48 PM, Richard Gaskin [EMAIL PROTECTED]  
wrote:



wouter wrote:


On Mac OS X (didn't test in OS 9) you can use the following
to test for the visible of the menubar:

put the menubar is not hidden
or
put the menubar is hidden


hidden?

Wow.  Never would have guessed that one.

Is that token used for any other element in the language?

I wonder why visible is not used for the menubar as it is for
everything else...


Actually you *can* use it, like:

  put the menubar is visible
  put the menubar is not visible



actually this won't work correctly (my fault for not testing  
thoroughly (I confess))

try:
 menubar visible : put the menubar  is visible/hidden -- false
 menubar hidden: put the menubar  is visible/hidden -- false



But you *can't* use it this way:

  put the visible of the menubar
  put the visible of menubar


-snip-


Ken Ray



Greetings,
Wouter
___
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: If the visible of the menubar is true?

2006-10-31 Thread wouter

Hi,

On Mac OS X (didn't test in OS 9) you can use the following
to test for the visible of the menubar:

put the menubar is not hidden
or
put the menubar is hidden

Greetings,
Wouter


On 31 Oct 2006, at 21:05, David Bovill wrote:


How do you do that?
___
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


___
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] Re: Filthy Apples

2006-09-29 Thread Wouter
http://www.roughlydrafted.com/RD/Home/E83D58B3-10E0-4A9C-8847- 
BCE665EE235C.html

On 28 Sep 2006, at 21:05, [EMAIL PROTECTED] wrote:

http://daringfireball.net/linked/2006/september#tue-26-recycles


Gr W.
___
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: mouse scrolling wheel

2006-07-24 Thread Wouter

On 24 Jul 2006, at 11:18, Viktoras Didziulis wrote:

Some mouses come with a scrolling wheel. Is there any way to  
capture the

rotation of the wheel in Rev ?

All the best!
Viktoras


on rawkeyDown x
put true into tPass
switch x
case 65308 --scroll down
-- do something
-- put false into tPass -- if no further passing needed
break
case 65309 -- scroll up
-- do something
-- put false into tPass -- if no further passing needed
break
end switch
if tPass then pass rawKeyDown
end rawKeyDown

Greetings,
Wouter
___
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: Internal security of Rev?

2006-07-14 Thread Wouter


On 14 Jul 2006, at 09:25, Kay C Lan wrote:

- snip -


In the last financial year it was noted that the revenue figures were
up, better than expected. After a little analysis of the number the
reason revealed itself. Although 'users' had occasionally lost their
parallel dongles,  the USB dongles proved at lot easier to loose!

As my brother would say to some poor sap who would be trying to get a
new dongle without paying for a whole new license fee would say: Go
into Harry Winston's and tell them your wife lost her $80,000 diamond
ring and that you'd like a free replacement


As for giving a reason to someone to crack your software, this is an  
excellent one.

It resembles (or rather is) software hijacking.
I'm sure there are ways to identify people who lost their dongle
(for example: traces of banking in the act of the legal acquisition  
of the software),
instead of forcing them to pay again for the software and a new  
dongle combo.
And to complete the above comparison, I also would not buy a $80,000  
diamond if a dongle was needed for wearing it in the first place.


Greetings,
Wouter
___
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: stack for importing Fireworks documents to Rev

2006-06-07 Thread Wouter


On 07 Jun 2006, at 09:06, Jim Ault wrote:


On 6/6/06 10:53 PM, Josh Mellicker [EMAIL PROTECTED] wrote:


Here it is:

http://revcoders.org/import_fw.rev


 I am sure this was a lot of work.
Thanks for the example link, Josh, but I cannot download the file,  
Safari
only displays the text version of it, which is not the operating  
stack.



-snip-


Maybe you know the trick to getting this on OSX 10.4.6


To get a stack when safari is downloading the text version of it is:   
enter the url again with the option (alt) key down.


Greetings,
Wouter
___
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: Strange output of shellman xyz on OS X

2006-05-31 Thread Wouter

On 31 May 2006, at 12:52, Klaus Major wrote:


Hi Alex,


Klaus Major wrote:

Hi Bill,

Underscore. The boxes are backspace characters.


Aha, thanks :-)
Any hints on how to clean up this to display this nicely in a Rev  
field?

You do it based on the backspaces (numtochar(8))s.

Depends how nicely you need it.


VERY nice :-)


-snip-

Hi,
from an old project for what it is worth (will display the manpage as  
in the terminal):

(beware of the mail wraps!!!)

set the htmltext of fld somename to prepMan(raw manpage)

local lC
function prepMan pMan
  if the keys of lC =  then preplC
  put numtochar(8) into tx
  set the casesensitive to true
  put  into tChars
  put p into tList
  repeat for each char i in pMan
if i = cr then put numtochar(13) into i
if i = space then put numtochar(14) into i
if tChars[1] =  then -- may not be tx
  if i = tx then next repeat
  else
put i into tChars[1]
  end if
else
  if tChars[2] =  then -- must be tx
if i = tx then put i into tChars[2]
else
  put chartonum(tChars[1]) into a
  put lC[a] after tList
  put i into tChars[1]
end if
  else
if tChars[3] =  then -- may not be tx
  if i  tx then put i into tChars[3]
  else
put chartonum(tChars[1]) into a
put lC[a] after tList
put  into tChars
  end if
else
  if tChars[4] =  then -- must be tx for sequence
if i = tx then put i into tChars[4]
else
  if tChars[1] = tChars[3] then put blC[chartonum 
(tChars[3])]/b after tList
  else if tChars[1] = _ then put ulC[chartonum 
(tChars[3])]/u after tList
  else if tChars[1] = + and tChars[3] = o then put  
ulC[chartonum(tChars[3])]/u after tList

  else put lC[chartonum(tChars[3])] after tList
  put  into tChars
  put i into tChars[1]
end if
  else
if tChars[3] = i then put blC[chartonum(i)]/b  
into tTemp
if tChars[1] = _ then put u  tTemp  /u into  
tTemp

put tTemp after tList
put  into tChars
  end if
end if
  end if
end if
  end repeat
  return tList  /p
end prepMan

on preplC
  repeat with i = 33 to 255
put numtochar(i) into fld temp ### hidden field
put char 4 to -5 of the htmltext of fld temp into lC[i]
  end repeat
  put /p  cr  p into lC[13]  -- cr  more readable in  
the debugger

  put space into lC[14]
end preplC

Greetings,
Wouter
___
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: Now a TCP Question

2006-05-27 Thread wouter

On 27 May 2006, at 10:38, Jim Ault wrote:

-snip-

If anyone is interested, I can post a report here, otherwise I will  
not

waste the list bandwidth in this niche application of Rev.

The power and flexibility of Revolution has not ceased to amaze me.

Jim Ault
Las Vegas



-snip-

We/I are/am very interested how you will tackle the packet integrity,  
packet loss, packet order  on UDP connection -  server and client-wise.

Please spoil some bandwidth on this and keep it posted here.

TIA + greetings,
Wouter
___
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: Now a TCP Question

2006-05-27 Thread wouter

Thank you Alex for this explanation.

Greetings,
Wouter


On 27 May 2006, at 17:43, Alex Tweedly wrote:

-very big snip-



--
Alex Tweedly   http://www.tweedly.net


___
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: Mysterious Processor Use?

2006-04-21 Thread Wouter

Hi,

Did you use a player?
I observed that using a player to play a sound only once in version  
2.7.1-dp-4 pushes the cpu time to about 30% and keeps it there.


Greetings,
Wouter

On 21 Apr 2006, at 04:31, Scott Rossi wrote:


Recently, Stephen Barncard wrote:

I'm looking at the activity monitor on my system and it says  
Revolution is
using about 30% of the processor, yet there is no apparent  
activity taking

place (pendingmessages is empty).



Throbbing default button?


None that I've placed.  It's Rev 2.7 if that matters.

Thanks  Regards,

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

___
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


___
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: Removing password/passkey from stack

2006-03-27 Thread Wouter

On 27 Mar 2006, at 18:26, Robert Brenstein wrote:

-snip-

From the menu bar, all the File  Save options are dimmed, so I  
cannot save the stack

I cannot add a field or button to the stack
I cannot move the location of a control.


Did you check the cantmodify of stack myStack?
I should be false
Did you toplevel stack myStack?
Some styles prevent editing.


Pray tell, what am I doing wrong?

Burrton Woodruff
Ripple Software


-snip-


Robert



Greetings,
Wouter
___
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: MVC in Rev?

2006-03-24 Thread Wouter

On 24 Mar 2006, at 06:08, Mark Wieder wrote:


thierry-

Thursday, March 23, 2006, 3:08:56 AM, you wrote:


 http://atomicobject.com/media/files/PresenterFirst.pdf


...that file is damaged and cannot be repaired...



Not sure, it opens up nicely in Safari.



--
-Mark Wieder
 [EMAIL PROTECTED]



Greetings,
Wouter
___
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: Get a handler from a script

2006-03-22 Thread Wouter

Hi David,


On 22 Mar 2006, at 12:53, David Burgun wrote:


Hi,

Nice Script!

There is just one thing I don't understand?

What are the:

get  /*  i

Statements for?



/* this is a comment
as is this */function whatever
return something
end whatever

This is to force the tokenizing.
The script is parsed line by line.
The first line of the block comment will be eliminated by token 1 to  
- 1 of  i
But the first token of  the  second line of the block comment will be  
the first word -- as
By adding a /* in front of that line the first token will be  
function




Thanks a lot
All the Best
Dave



Greetings,
Wouter
___
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: Message Box ?

2006-03-22 Thread wouter

On 23 Mar 2006, at 00:25, thulme wrote:


openFile myfile.txt
put the result




I get:  Message execution error:
 Error description: Handler: can't find handler


Hi Thulme,

This means you should have a handler  on openFile 
or you can enter in the msg box:

open file myfile.txt

Greetings,
Wouter
___
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: Get a handler from a script

2006-03-21 Thread Wouter

on Sun Mar 19 16:12:57 CST 2006 Geoff Canyon wrote:


Unfortunately for anyone attempting this task, this is a perfectly
valid script:

/* this is a comment
as is this */on mouseUp
   answer yes
end mouseUp


This style of commenting shows rev's inability to parse for handler  
names there after.

Have a look at the handler list field of the revscripteditor.
Take a multi handler script and comment the second handler like  
mentioned by Geoff above.
On reopening the same script in the editor, only the first handler  
will show in the handler list field.


Greetings,
Wouter
___
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: Get a handler from a script

2006-03-21 Thread Wouter

on Sun Mar 19 16:12:57 CST 2006 Geoff Canyon wrote:


/* this is a comment
as is this */on mouseUp
   answer yes
end mouseUp



Another problem with this kind of commenting is shown in the  
following cases:


/* this is a comment
as is this */-function whatever
return something
end whatever

/* this is a comment
as is this */--function whatever
return something
end whatever

Both will compile without throwing an error.
Only the second one is a valid comment

Greetings,
Wouter

PS another little update (beware of the mail line wraps):

function retrieveActiveHandlers pScript
  put true into tFlag
  repeat for each line i in pScript
if char 1 to 2 of word 1 of i = /*  then
  put false into tFlag
else if tFlag and token 1 of i is among the items of  
on,function,setprop,getprop then  put token 1 to -1 of  i  cr  
after tList

else if tFlag = false then
  if (char 1 of word 1 of i is # or  char 1 of word 1 of i is  
- ) and */ is in i then

put true into tFlag
get  /* i
if tFlag and token 1 of it is among the items of  
on,function,setprop,getprop then

  put token 1 to -1 of  it  cr after tList
end if
  else
repeat for each token j in i
  if j is */  then
put true into tFlag
get  /* i
if tFlag and token 1 of it is among the items of  
on,function,setprop,getprop then

  put token 1 to -1 of  it  cr after tList
  exit repeat
end if
  end if
end repeat
  end if
end if --
  end repeat
  return tList
end retrieveActiveHandlers

___
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: Combined Events

2006-03-21 Thread Wouter

for example:

on returninfield
  mousedown
end returninfield

Greetings,
Wouter

On 21 Mar 2006, at 17:03, Jeff Honken wrote:



Is there any way to combine events so you don't have to have redundant
code.  I would like the same code to run on both the on  
returnInField

and on mouseDown events.  Jeff


___
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: Combined Events

2006-03-21 Thread Wouter

Hi Jeff,

This should work if the locktext and the traversalon of the field are  
true:


on returnInField
mousedown
end returnInField

on mouseDown
  answer Hello  cr  the millisecs
end mouseDown

W.

On 21 Mar 2006, at 17:39, Jeff Honken wrote:


Wouter,
  Thank you for the reply but I'm a little confused with your  
answer.  I
want the same code answer Hello to run in a field no matter if I  
click

on the field with the mouse or press the enter key in the field and I
don't want to:

on returnInField
answer Hello
end returnInField

on mouseDown
  answer Hello
end mouseDown


What I would like is something like this that will work:

on returnInField or mouseDown
answer Hello
end returnInField or mouseDown

___
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: Get a handler from a script

2006-03-20 Thread Wouter


On 20 Mar 2006, at 02:12, Geoff Canyon wrote:

I feel like the harbinger of doom here (with Alex as my able  
partner in doomsaying) but:


This would still be subject to failure if, anywhere in the script, / 
* or */ appeared _not_ as block comment delimiters, but as part of  
a string.


gc



-snip-

and what about this first draft ?:

on mouseUp
  put removeBlockComments(the script of me) into fld 1
end mouseUp

/* this is a comment
#as is this */function removeBlockComments pText   --toggle the #
put true into tFlag
repeat for each line i in pText
  if char 1 to 2 of word 1 of i = /*  then
put false into tFlag
  end if
  if tFlag and token 1 of i is among the items of  
on,function,setprop,getprop then put  i  cr after tList

  else if tFlag = false then
if char 1 of word 1 of i is # and */ is in i then
  put true into tFlag
  get  /* i
  if tFlag and token 1 of it is among the items of  
on,function,setprop,getprop then

put token 1 to -1 of  it  cr after tList
next repeat
  end if
end if
repeat for each token j in i
  if j is */  then
put true into tFlag
get  /* i
if tFlag and token 1 of it is among the items of  
on,function,setprop,getprop then

  put token 1 to -1 of  it  cr after tList
  exit repeat
end if
  end if
end repeat
  end if
end repeat
return tList
end removeBlockComments

greetings,
Wouter
___
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: Get a handler from a script

2006-03-20 Thread Wouter

A little update.
And beware of the mail wraps

On 20 Mar 2006, at 10:50, Wouter wrote:

-snip-


/* this is a comment
#as is this */function removeBlockComments pText   --toggle the #
put true into tFlag
repeat for each line i in pText
  if char 1 to 2 of word 1 of i = /*  then
put false into tFlag
  end if
if tFlag and token 1 of i is among the items of  
on,function,setprop,getprop then put token 1 to -1 of  i  cr after  
tList


  else if tFlag = false then
if char 1 of word 1 of i is # and */ is in i then
  put true into tFlag
  get  /* i
  if tFlag and token 1 of it is among the items of  
on,function,setprop,getprop then

put token 1 to -1 of  it  cr after tList
next repeat
  end if
end if
repeat for each token j in i
  if j is */  then
put true into tFlag
get  /* i
if tFlag and token 1 of it is among the items of  
on,function,setprop,getprop then

  put token 1 to -1 of  it  cr after tList
  exit repeat
end if
  end if
end repeat
  end if
end repeat
return tList
end removeBlockComments



Greetings,
Wouter


___
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: Get a handler from a script

2006-03-19 Thread wouter


On 19 Mar 2006, at 21:51, Mark Wieder wrote:

-snip-


Here's a line I learned from Jerry Daniels:

filter tScript with [ofsgOFSG][nueNUE][ ntNT]*


Will also keep lines which start with set and sen like in:
set the itemdelimiter to tab
send mouseup to me

or lines which start with a combination of those characters
like in:
   sendSomeCommand paramX
   suntanLotion skincomplex


-Mark Wieder
 [EMAIL PROTECTED]


Greetings,
Wouter
___
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: DRM for Images and Text in Stacks

2006-03-07 Thread Wouter

Hi Sivakatirswami,

On 07 Mar 2006, at 10:42, Sivakatirswami wrote:


Dream with me for a moment:


-snip-


Insights anyone?


A possibility to protect your images is to encrypt them using  a  
blowfish or another algo (included in the enterprise version) and put  
the result into fields or custom props (or whatever container of your  
choice). The code to deencrypt this pictures and place them in their  
respective image containers is kept in the password protected stack.

The necessary key to deencrypt when loading a encrypted pict stack:
  - may be burried somewhere in the stack (or somewhere else)
  - must be supplied (dialog box or internet connection)
The last system will need the most time to crack.
So there is no real need for a special plugin.



Sivakatirswami


Greetings,
Wouter
___
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] HOOT: Hacked Object Oriented Transcript

2006-02-28 Thread wouter

On 28 Feb 2006, at 03:55, Dick Kriesel wrote:

-snip-

A rugged id is a native long id stripped of any of group id  
clauses and

of stack clauses, intended for use within a single stack.

A rugged long id is a native long id stripped of any of group id
clauses, intended for use across multiple stacks.



Thank you for the definitions.


On 28 Feb 2006, at 11:21, Dick Kriesel wrote:


On 2/28/06 2:06 AM, Geoff Canyon [EMAIL PROTECTED] wrote:


getProp uRuggedID
   get the long id of the target
   if word 1 of it is card then return word 1 to 3 of it
   if card is among the words of it then return (word 1 to 3 of it
 word -7 to -4 of it)
   return word 1 to 3 of it
end uRuggedID

getProp uRuggedLongID
   get the long id of the target
   if word 1 of it is among the words of card stack then return it
   if card is among the words of it then return (word 1 to 3 of it
 word -7 to -1 of it)
   return (word 1 to 3 of it  word -3 to -1 of it)
end uRuggedLongID


What about a control on a card in a substack?


this could do (partly):

getprop uRuggedID
  get the long id of the target
  -- if word 1 of it is card then return word 1 to 3 of it
  if word 1 of it is among the words of card stack then return it
  if card is among the words of it then
put num of words in char 1 to offset(of card id,it) + 1 of it  
into tStart

return (word 1 to 3 of it  word tStart to tStart + 3 of it)
  end if
  return word 1 to 3 of it ###
end uRuggedID

getprop uRuggedLongID
  get the long id of the target
  if word 1 of it is among the words of card stack then return it
  if card is among the words of it then
put num of words in char 1 to offset(of card id,it) + 1 of it  
into tStart

return (word 1 to 3 of it  word tStart to -1 of it)
  end if
  return (word 1 to 3 of it  word -3 to -1 of it) ### !!!
end uRuggedLongID

###:  I'm not sure about the necessity of the last return statements  
in the getprop handlers.

 (I leave them out)
!!!: the last return statement of the uRuggedLongID still needs  
to be adapted if it must stay in,
but I cannot imagine on what kind of long id it would be applicable.  
So please jump in if you know.


Greetings,
Wouter
___
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] HOOT: Hacked Object Oriented Transcript

2006-02-28 Thread wouter


On 28 Feb 2006, at 15:27, wouter wrote:

-snip-

Some corrections:


getprop uRuggedID
  get the long id of the target
  if word 1 of it is  stack then return word 1 to 2 of it  ###  
in case it is a substack

  if word 1 of it is card then return word 1 to 3 of it

  if card is among the words of it then
put num of words in char 1 to offset(of card id,it) + 1 of it  
into tStart

return (word 1 to 3 of it  word tStart to tStart + 3 of it)
  end if

--  return word 1 to 3 of it ### this  wouldn't do in case of a substack

end uRuggedID

getprop uRuggedLongID
  get the long id of the target
  if word 1 of it is among the words of card stack then return it
  if card is among the words of it then
put num of words in char 1 to offset(of card id,it) + 1 of it  
into tStart

return (word 1 to 3 of it  word tStart to -1 of it)
  end if
--  return (word 1 to 3 of it  word -3 to -1 of it) 

end uRuggedLongID



Greetings,
Wouter

___
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] HOOT: Hacked Object Oriented Transcript

2006-02-27 Thread wouter


On 27 Feb 2006, at 23:06, Dick Kriesel wrote:
-snip-


...
set the uPropertyThatRefersToARevObject of the target \
to the uRuggedID of tRevObject
...

getProp uRuggedID
  put the long id of the target into tLongID
  if word 1 of tLongID is not stack then
-- note: stacks do not have rugged ids
put word 1 to 3 of tLongID into tRuggedID
put offset( of card id   quote,tLongID) into tOffset
if tOffset  0 then
  put char tOffset to offset(space,tLongID,tOffset) - 1 \
  of tLongID after tRuggedID
end if
  end if
  return tRuggedID
end uRuggedID

Comments?


Rugged id's are a good idea but this handler will not do the trick.
And it is difficult to deduce from this handler from where to where
or which parts of the long id is what you call the rugged id.



-- Dick



Greetings,
Wouter
___
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: Offscreen Screencapture? -- issues that affect image rendering

2006-02-03 Thread Wouter

May be this thread can shed some light on the problem:

http://lists.runrev.com/pipermail/use-revolution/2004-January/ 
028585.html


(follow upstream for history)

Greetings,
Wouter

On 03 Feb 2006, at 22:45, Richard Gaskin wrote:


Chipp Walters wrote:

Richard,
Are you using MC or RR? If MC, then can you try on RR? thx
Richard Gaskin wrote:

Crashes here with a kernel protection fault:

OS X 10.4.4
PowerBook G4 1Ghz



- snip -


--
 Richard Gaskin
 Fourth World Media Corporation

___
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: Offscreen Screencapture? -- issues that affect image rendering

2006-02-03 Thread Wouter

This will still crash in certain cases.
Because  a stack with its cantmodify set to true and which buffered  
state is not true, cannot be forced to update its screenbuffer.
The effectiveness of a screen buffer update can be seen in the  
difference between the pixmapID of a stack  and the windowID of a  
stack. If those numbers are the same the stack is NOT buffered and  
the handler will crash gloriously.


Greetings,
Wouter


On 04 Feb 2006, at 00:07, Richard Gaskin wrote:



Works great in your version.

I double-checked the differences between your code and the code on  
Ken's site, and I found that if I just move the line that restores  
the alwaysBuffer of the stack to after the export, it works:



on mouseUp
  put /Applications/MetaCard/_testers/export wd buffer.rev into  
tStack

  put /Users/richardgaskin/Desktop/stackimage.png into tPath
  put PNG into tType
  ExportCard tStack, tPath, tType
end mouseUp

on ExportCard pStackPath,pExportPath,pImageType
  -- pStackPath is the path to the stack whose card you want to export
  -- pExportPath is where you want the image to go
  -- pImageType is one of the three formats supported by the export
  --   command: paint, png or jpeg
  put the alwaysBuffer of stack pStackPath into tOldBuffer
  -- The next two lines force the current card image
  -- into the offscreen buffer
  set the alwaysBuffer of stack pStackPath to false
  set the alwaysBuffer of stack pStackPath to true
  create invisible image
  -- Here's the 'meat' of the handler:
  set the imagePixMapID of last image to \
 (the pixMapID of stack pStackPath)
  select last image
  --!NOT HERE  set the alwaysBuffer of stack pStackPath to tOldBuffer

  do export  pImageType  to file pExportPath
  delete last image

  -- HERE INSTEAD:
  set the alwaysBuffer of stack pStackPath to tOldBuffer

  choose browse tool
end ExportCard



--
 Richard Gaskin
 Fourth World Media Corporation


___
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: getExif

2006-01-09 Thread Wouter

Thanks for this stack UDI.
(TIFF in the future?)

Greetings,
Wouter



On 09 Jan 2006, at 19:20, UDI wrote:


Exif data reader. Not support TIFF.
All script is public domain. Have fun.

http://homepage.mac.com/udi/stack/getExif10.hqx

UDI
[EMAIL PROTECTED]
http://homepage.mac.com/udi/
___
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


___
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] .ds_store Messing Up ZIP

2006-01-03 Thread wouter
Or use CleanArchiver, which is freeware and can compress to the  
following formats:


gzip
bzip2
zip
DiskImage
Stuffit
StuffitX

Greetings,
Wouter

On 04 Jan 2006, at 02:21, Ton Kuypers wrote:

I use Stuffit to create SIT files for distribution to Macs and ZIP  
files for distribution to Windows users... And Stuffit has got an  
option NOT to copy these pesky hidden files...

Works perfect, can advice it to anyone!


Warm regards,


Ton Kuypers
Digital Media Partners bvba
Tel. +32 (0)477 / 739 530
Fax +32 (0)14 / 71 03 04
http://www.dmp-int.com



On 4-jan-06, at 01:14, Scott Rossi wrote:


I've been plagued by this enough that I thought I would ask...

For me, creating simple ZIP archives on Mac systems that contain a  
few files

is usually straightforward.  However, I often find that when the ZIP
archives starts to contain nested subfolders, I often wind up with  
invisible
.ds_store files that corrupt the archive when it comes time to  
decompress on
Windows systems.  The only recourse seems to be to move folders  
over to

Windows, delete any .ds_store files, and compress there.

Is there any Mac utility out there that allows one to poke around  
inside a
ZIP archive to delete these extraneous .ds_store files?  Or even  
better,
some way to tell Stuffit to ignore/delete these files in the first  
place?



___
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


___
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 Wouter

Hi Scott,

A very nice stack as usual.
But it showed a problem on my slowbook (titanium 400 mhz) driven by  
mac osx.

The start and end values of the scrollbars are from high to low.
This forces the engine to set the thumbsize to -0.
When the showvalue of the scrollbars is true (indicated by the gray  
line formed by the ticks)

 it will slow revolution down to an unresponsive condition.
On my rig the unaltered stack uses over 80 % of cpu time and it takes  
several seconds (10 - 15) for each frame to show.
The remedy is to reverse the start and endvalues of the scrollbars  
(from low to high) or turn off the showvalue.

Let it snow, let it snow, let it snow...

Greetings,
W.

On 15 Dec 2005, at 13:18, Scott Rossi wrote:

-snip-



Here's one way.  Execute the following in your message box (not a Web
browser):

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


-snip-


There is some kind of intermittent bug that causes a random  
triangle to
appear every once in a while -- not sure where this comes from.  At  
first it

was annoying but it has now started to resemble lightning for me. :-)


to stop the lightning:

in the runFlurry handler comment out the following line:

 if tShift then
  repeat for each line L in tPoints
put L after tempSet
add -H to item 2 of line -1 of tempSet #if L   then
put cr after tempSet
  end repeat
  --delete last char of tempSet   comment out
  put tempSet into tPoints
end if



Happy Holidays.

Scott Rossi

___
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 Wouter


On 15 Dec 2005, at 18:17, Scott Rossi wrote:

-snip-


Good to know, thanks.  What version of Rev is this?


RR 2.1.6
Tested for this problem (slowdown by thumbsize 0 or start - end value  
descending order) down to RR 2.1

All problematic on slower macs (depending also on the graphics card).

-snip-


Thanks for the fix -- it's been added to the posted stack.

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

Do the modifications make it work correctly on your side?


Yes, works fine




Best Regards,

Scott Rossi


Happy snowing,
Wouter

___
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: More on arrays

2005-12-06 Thread Wouter

Hi David,

To base64Encode someArray first combine someArray.

Greetings,
W.

On 06 Dec 2005, at 16:22, David Bovill wrote:


Seem to remember that an array was binary data...

- but base64Encode(someArray) doesn't give you anything?

Anyway to get at the value of an array to dump / send it somewhere?  
That is without looping over everything as in previous post?


___
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: Documented Cursor Bug...Please try.

2005-12-01 Thread Wouter

Hi,

Same config as Ton Kuypers same results.
On closing the stack no field messages are sent.
Only a suspendstack message can be trapped, usable for a workaround.

Greetings,
WA

On 01 Dec 2005, at 10:14, Ton Kuypers wrote:


Problem confirmed.
MAC OS 10.4.3  Powerbook G4
Last Rev IDE and engine

Hope this one gets fixed or their will be a workaround... I have  
this problem when a user enters name and password in a login stack  
and hits enter to continue... very annoying...



Ton Kuypers
Digital Media Partners bvba
Tel. +32 (0)477 / 739 530
Fax +32 (0)14 / 71 03 04
http://www.dmp-int.com

-snip-
___
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: Documented Cursor Bug...Please try.

2005-12-01 Thread Wouter


On 01 Dec 2005, at 11:03, Wouter wrote:


Hi,

Same config as Ton Kuypers same results.
On closing the stack no field messages are sent.


errata: exitfield is sent.


Greetings,
WA
___
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: SHA-1 algorithm in xTalk?

2005-11-22 Thread Wouter

On 21 Nov 2005, at 17:40, David Bovill wrote:

The SSL libraries that RunRev uses should be able to do this - and  
I would have thought considerably faster than a native and possibly  
less secure Transcript implementation - no?


Which is easy to do with shell() and openssl.
Shao Sean will offer a pure transcript version of SHA-1 in a short time.
Meanwhile one can experiment with the openssl version:
(this is a mac version working on OSX 10.4.3 rev 2.6.1,
never tested on other OS versions/platforms,
please upload the adaptations and good luck)

- for hash of a file:

on mouseUp
  answer file choose file for hash
  if it   then
replace space with \space in it
put OSSL(it) into fld 1
  end if
end mouseUp

function OSSL pPath
 return word -1 of shell(openssl dgst -sha1  pPath)
end OSSL

- for hash of a password or other string(s):

on mouseUp
  put OSSL(fld 1) into fld 2
end mouseUp

function OSSL pText
  put the tempName.tmp into tPath
  put pText into url (file:tPath)
  ## adapt time  according to rig (may be not necessary)
  wait 0 with messages
  return word -1 of shell(openssl dgst -sha1 tPath)
end OSSL

Other hashes are available -- man pages sha1
Option to sign a file by adding a flag -- man pages sha1
Other services of openssl -- man pages openssl


On 21 Nov 2005, at 17:35, Alessandro Manotti wrote:


Sorry if I introduce myself in this posts.
Please note that md5 is no more reliable! Since it was officially  
cracked.


Even Sha-0 was cracked, but it is far incomplete/primitive then  
sha-1,

which is the only reliable hash system to verify digital signature,
software integrity, etc...


SHA-1 has been compromised too.
http://www.schneier.com/blog/archives/2005/02/sha1_broken.html
http://www.rsasecurity.com/rsalabs/node.asp?id=2927
etc.

Greetings,
Wouter
___
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: Filter Command

2005-11-22 Thread Wouter


On 21 Nov 2005, at 20:29, Gregory Lypny wrote:

-snip-

	This seems to works fine for all my companies except for TSE 100  
Index Participation Fund Units.  I'm getting a lot of hits that  
contain TSE (Toronto Stock Exchange) in the headline but not the  
rest of the name.  This does not happen with other long names or  
names that have a common proper noun (e.g., Canada Bread gives me  
four hits all mentioning Canada Bread and none mentioning Canada or  
Bread alone).


Any thoughts?


Have a look at the chartonum of each char in the strings of the  
company names to make sure there are no special chars used.
Like for example hard spaces, which alter the string of a word or  
words if in between.
Filter command goes haywire if a null character (numtochar(0))  is  
in a text (origin could be certain wordprocessors, databases or rev  
itself)


Greetings,
Wouter
___
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


problem with grouped field

2005-11-14 Thread Wouter

Hi all,

I encountered some problems with grouped fields with RR 2.6.1 (but  
also in former versions) on OS X 10.4.1


1.  problem with scroll of group starting at 32779, field disappears  
(at 32778 it still shows)), scroll is reset at zero.

But clicking where the field is supposed to be reveals some lines.
2.  problem with height of field in group if65535.
The height of the field is reset to zero and starts growing again  
when more lines are added.


Recipe:
ingredients:
- 1 field (no vScroll)  in a group (with vScroll)
- 2 buttons
- 2 scripts, one for each button:

on mouseUp
  put  into fld 1
  repeat with i = 1 to 3200
put i  cr after tList
  end repeat
  put tList into fld 1
  set the height of fld 1 to the formattedheight of fld 1
  set the rect of grp 1 to 10,10,138,bottom of this cd - 50
  put 32760 into a ### approximation of start of problem
  repeat
add 1 to a
set the scroll of grp 1 to a
put the scroll of grp 1 into b
put a  cr  b
if a  b then exit repeat
wait 100 millisecs with messages
if the commandkey is down or the controlkey is down then exit  
repeat

  end repeat
end mouseUp

on mouseUp
  put  into fld 1
  repeat with i = 1 to 65400 div the effective textheight of fld 1
put i  cr after tList
  end repeat
  put tList into fld 1
  set the height of fld 1 to the formattedheight of fld 1
  set the rect of grp 1 to 10,10,138,bottom of this cd - 50
  repeat
add 1 to i
put i  cr after fld 1
put the formattedheight of fld 1 into a
set the height of fld 1 to a
put the height of fld 1 into b
set the rect of grp 1 to 10,10,138,bottom of this cd - 50
put  i  cr  a  cr  b
lock screen
unlock screen
if a  b then exit repeat
if  the commandkey is down or the controlkey is down then exit  
repeat

  end repeat
end mouseUp

beware of mail line wraps

I wanted to ask if someone could confirm this and if this is also the  
case on other platforms.

TIA,

Wouter
___
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: Finding non-common elements in two arrays

2005-11-09 Thread Wouter

Hi again,

A little update on the intersectSpecial function
-- a bit speedier and 3 results in 1 array

function intersectSpecial pListA,pListB,@pR
  if char -1 of pListA is not cr then put cr after pListA
  replace cr with tab  1  cr in pListA
  split pListA with cr and tab
  repeat for each line i in pListB
add 2 to pListA[i]
  end repeat
  repeat for each line i in the keys of pListA
put i  cr after pR[pListA[i]]
  end repeat
  return the keys of pR  
end intersectSpecial

on mouseUp
  put the millisecs into zap
  get intersectSpecial(fld 1,fld 2,a)
  put the millisecs - zap
  if it then
put * Common in both:  cr  a[3] after tList
put * Unique in list A:  cr  a[1] after tList
put * Unique in list B:  cr  a[2] after tList
put tList into fld 3
  else put it into fld 3
end mouseUp


Greetings,
Wouter



On 07 Nov 2005, at 01:05, Buster wrote:


function intersectSpecial pList1,pList2,pMode
  repeat for each line i in pList1
add 1 to a[i]
  end repeat
  repeat for each line i in pList2
add 2 to a[i]
  end repeat
  combine a with cr and tab
### elements only in pList1 -- 1
### elements only in pList2 -- 2
### elements in both lists -- 3
  if pMode = bothCommon then put *tab3 into tFilter
  else  if pMode = uniqueA then put *tab1 into tFilter
  else if pMode = uniqueB then put *tab2 into tFilter
  else if pMode = bothUnique then put *tab1,* tab2 into  
tFilter

  repeat for each item tFilterString in tFilter
put a into b
filter b with tFilterString
replace char 2 to -1 of tFilterString with  in b
put b  cr after tList
  end repeat
  return tList
end intersectSpecial

on mouseUp
  put the millisecs into zap
  put intersectSpecial(fld 1,fld 2,bothUnique) into fld 3
  put the millisecs - zap
end mouseUp

May be not a real speed monster but not bad either
(takes  500 millisecs for 2 fields with  25000 lines on an iMac  
G5 1.8 gHz)


Greetings,
Wouter

___
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: how much info fits in a field?

2005-11-02 Thread Wouter

Hi,

Have a look in the docs - topics with filter limits

(using a field with these amounts can make it/rev quite unwieldy)

Greetings,
Wouter



On 31 Oct 2005, at 22:00, Andre Garzia wrote:


Folks,

I am using a field to record TCP Flow on a given port on my system  
by redirecting tcpflow app using appleEvents which makes much  
easier to debug CGI apps since all traffic is inside a nice field,  
the problem is, how much info can I dump into a field, I am loggin  
all traffic, so after couple hours browsing, I might have tons of  
megs, so what is the maximum ammount a field can handle before I  
need to dump the log to a file?


Cheers
andre
___
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



___
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: AW: AW: How trim: Bug in RegExp engine

2005-10-25 Thread Wouter

On 25 Oct 2005, at 23:39, Thomas Fischer wrote:

-snip-

3. It seems that regular expressions are to be avoided in time  
sensitive parts of the script anyway. Playing around a little bit I  
found that the RegExp solution I suggested took far more time than  
any other solution (by about a factor of 10 compared with the  
fastest solution). Probably this should be optimized in an updated  
version. It seems that regular expressions in Perl are by a factor  
6 faster (and again 8 times faster on my PC laptop).
On the other hand, this shows that those cumbersome repeat loops  
are surprisingly fast.

The fastest is:

  while char 1 of testString is space
delete char 1 of testString
  end repeat

taking about 1.8 microseconds per round (11 ticks for 10  
repeats), and with a string whiteSpace = tab  return a loop with

  while char 1 of testString is in whiteSpace
takes about twice as long.

  word 1 to -1 of testString
removing whitespace at the front and the end simultaneously is only  
a little slower, while using token

  token 1 to -1 of testString
takes surprisingly three times as long as using word.


These timing tests are not completely fair because:

  while char 1 of testString is space  -  removes only space from  
front if any

delete char 1 of testString
  end repeat

word 1 to -1 of testString   - removes tabs, spaces and returns from  
front and back of string if any
token 1 to -1 of testString  - removes tabs, spaces, hard spaces,  
and returns from front and back of string if any


You compare time it takes for frontal removal of space if any with  
time it takes for frontal and back removal of tab and space if any or  
tab, space and hard space (semicolon and return) if any.
To make it more fair, the time testing handlers should be equalized  
on the removal of tabs, spaces and hard spaces from front and back of  
a string.


On the other hand this gives an indication of which way to use in  
what case.


Greetings,
Wouter

PS
for token 1 to -1 of testString - watch out for semicolon as it will  
be treated as a whitespace or itemdelimiter for token.
In the docs is stated that (semicolon), space, return, and tab are  
the itemdelimiters for token.
As hard spaces are also removed this listing is not complete and hard  
space should be added.


For me it seems kind of weird to the consider (semicolon), space,  
(hardspace), return, and tab as itemdelimiters for token, because  
they are removed as being whitespaces and are not really acting as an  
itemdelimiter.
On the other hand tokens themselves are more acting like a special  
kind of itemdelimiter.

___
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: Constellation

2005-10-21 Thread Wouter

Hi,
Some interesting articles about outliners can be found at:

http://www.atpm.com/10.12/atpo.shtml
http://www.atpm.com/11.02/atpo.shtml
http://www.atpm.com/11.03/atpo.shtml
http://www.atpm.com/11.04/atpo.shtml
http://www.atpm.com/11.06/atpo.shtml
http://www.atpm.com/11.08/atpo.shtml
http://www.atpm.com/11.10/atpo.shtml
etc...

Greetings,
Wouter

On 21 Oct 2005, at 21:43, Lynch, Jonathan wrote:


What is an outliner?

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Andre
Garzia
Sent: Friday, October 21, 2005 3:33 PM
To: How to use Revolution
Subject: Re: Constellation


On Oct 21, 2005, at 4:44 PM, Dan Shafer wrote:



It is a fundamental Truth of the Universe (when you reach my
advanced stage of life you can even afford to pontificate now and
again) that everything takes longer than you think it will even
when you take into account that everything takes longer than you
think it will.




I have told you my theory that if every project takes longer than
imagined than you just go stacking them like domino tiles and hope
that when you finish a easy one they will all be solved in chain
reaction! :-)


jokes apart, I think the best approach to get something done is
1) write a spec, something to guide you, like what problem you're
trying to solve (thats an important question), how should your app
behaves.
2) Adopt modular paradigm like model-view-controller, something to
split GUI from code so that your code will be portable and  
maintainable.

3) Follow deadlines, even if you don't have one, go and create
artificial one with punishments like: if I pass 10 of october without
an alpha version of my new superduper rev game I shall be honor bound
to drink a cup of orange juice with 3 spoons of salt
4) Always research, chances are someone created something similar to
what you're trying to do, see how they did it, learn from others. For
example, I love outliners and am trying to build a little one for
personal use in Rev, I just downloaded everything from MORE to
OmniOutliner and checked... decided I need to learn more :-)

at least this is what my workflow looks... and yes, it still takes
longer than planned.

andre
___
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

___
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




___
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: Constellation's Great, But the Rev IDE Doesn't Suck

2005-10-20 Thread Wouter

Hi Ken,

Yes that is true, I couldn't test it on panther by lack of it.
 But should have asked around before mailing, sorry for the fuzz.

Greetings,
Wouter

On 20 Oct 2005, at 10:31, Ken Ray wrote:

- snip -



Meanwhile on Mac OS X one can use shell:

put  shell(system_profiler -xml SPDisplaysDataType) into
tXMLDisplayData

and parse this pList to extract the necessary information.



Actually I think this may only be on Tiger - I'm sitting here on  
Panther an

I don't have that data type...


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


___
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: Constellation's Great, But the Rev IDE Doesn't Suck

2005-10-19 Thread Wouter


On 18 Oct 2005, at 19:54, Richard Gaskin wrote:


David Burgun wrote:

You can't seem to get any information as to how many monitors are  
attached, or how big the Desktop is, this affects production  
software too. I was actually thinking of writing an external  
command to handle multiple monitors, the thing that has been  
putting me off is that I'd have to write it for Windows too, and I  
have no experience of programming at that level under Windows.




Please consider adding your votes to this excellent suggestion from  
Ben Rubinstein:


http://support.runrev.com/bugdatabase/show_bug.cgi?id=193



Meanwhile on Mac OS X one can use shell:

put  shell(system_profiler -xml SPDisplaysDataType) into  
tXMLDisplayData


and parse this pList to extract the necessary information.

Greetings,
Wouter
___
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


num of bgs versus num of grps

2005-10-12 Thread Wouter

Hi All,

As there is a lot to do about background groups may be this is the  
right time to ask about a completely undocumented feature (at least I  
cannot find any reference to it (and I know this is not a reference  
either :-))


 put the number of backgrounds  is different from (though the docs  
state group and background as equivalent)put the number of groups 


put the number of groups : will report the total number of groups  
on the current card (and not in the complete stack if it is a  
multicard stack)


put the number of backgrounds : will  report the number of groups  
to be found at cardlevel of a complete stack (one or multicard stack).


in a 1 card stack:
  -  If there are several groups  it will report the number of  
groups, whether the backgroundbehavior is set or not
  -  if there is a group in a group in a ...   it will be  
counted as 1 group

in a multicard stack:
  -  it will report the total number of groups at cardlevel in that  
stack
3 groups on each of 2 cards without backgroundbehavior set  
to true will be reported as 6 groups
  -  if the backgroundproperty of a group is set to true it will be  
counted only once
 3 groups on each of 2 cards with  backgroundbehavior of 1  
group set to true will be reported as 5 groups


Can anyone confirm this?
TIA
Greetings,
Wouter
___
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: importing an image from a window that is offscreen

2005-10-12 Thread Wouter

Hi,

Yes you can.
Use and adapt the scripts of this thread:
http://lists.runrev.com/pipermail/use-revolution/2004-January/ 
028585.html


Greetings,
Wouter



On 12 Oct 2005, at 17:53, Lynch, Jonathan wrote:


Is there any way to use the import snapshot command to take an image
from a stack that is located to the right or left of the screen?


Right now, when I try it, it does not work. Basically, it seems  
that it
does not draw anything that is offscreen, and thus cannot take a  
picture

of it. Can I force it do so?

___
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




___
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: Speed optimisation

2005-10-05 Thread Wouter

Hi,

May be this will do?
 (just to give an idea, can be tweaked)

function newTime oldTime,addedSec
  set the twelvehourtime to false
  convert oldTime to seconds
  add addedSec to oldTime
  convert oldTime to long time
  if length(oldTime) = 8 then return oldTime
  else return 0  oldTime
end newTime


Greetings,
Wouter


On 05 Oct 2005, at 08:58, Rob Beynon wrote:


Dear Colleagues,

I have a function that takes a time in this format

hh:mm:ss.s

and to which I add a variable number of seconds, then output the
updated time in the same format. hh can be greater than 24!

Here's the function. Problem is, it seems slow (I need to do this call
about 150,000 times each file I process). I would appreciate any
insights into making this function faster

function newTime oldTime,addedSec
put the replacetext(oldTime,:, ) into splitTime
put the first word of splitTime into h
put the second word of splitTime into m
put the third word of splitTime into s
put s + addedSec into newSec
put newSec mod 60 into remainSec
put (newsec-remainSec)/60 into addedMin
put m + addedMin into newMin
put newMin mod 60 into remainMin
put (newMin-remainMin)/60 into addedHr
put h + addedHr into newHr
if length(remainSec) = 1 then put 0  remainSec into remainSec
if length(remainMin) = 1 then put 0  remainMin into remainMin
if length(newHr) = 1 then put 0  newHr into newHr
put newHr  :  remainMin  :  remainSec into newTime
return newTime
end newTime

--  
All best wishes,

Rob

(Created at 07:55 on 05/10/2005)


___
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



___
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's mdimport ?

2005-09-16 Thread Wouter

Hi,

A bit OT but  a very simple way to turn spotlight off or rather  
prevent it from searching (and updating its database by mdimport) :

 - in the systemprefs -- spotlight -- Privacy
 - drag/add the volume(s), folders or files you don't want spotlight  
to search to that list


This is reversible very easily.

Greetings,
Wouter



On 16 Sep 2005, at 05:02, Sarah Reichelt wrote:

Can anyone tell me what mdimport is?  I'm using a Mac with OS X  
and a
utility called Activity Monitor to monitor my CPU usage, and  
mdimport
very often is in the 90% +  range.  What is this that is soaking  
up  my

CPU usage??



I think it's related to Spotlight.  The spike is probably while it's
indexing.



Yes, it's Meta Data Import and is Spotlight doing it's indexing. I
haven't had any trouble with it but one of my colleagues has. Getting
more RAM helped (as it always does) but I think it might have been
because he had some constantly changing folders containing thousands
of text files.




Whether you use Spotlight or not, I know of no way to turn it off.

Welcome to Tiger.



Here is a shareware utility to turn Spotlight off  on
http://www.fixamacsoftware.com/software/spot/index.html but if you
are comfortable using Terminal, you can do it yourself
http://rixstep.com/2/20050528,00.html although this description
doesn't tell you how to turn it back on again if you change your mind!

Cheers,
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




___
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: Problem with Sort command

2005-08-05 Thread Wouter

may be this will help:

http://lists.runrev.com/pipermail/use-revolution/2003-March/013809.html

Greetings,
Wouter


On 05 Aug 2005, at 19:46, Luis L. Rodríguez Oro wrote:


Hello

The problem is(in my opinion):

in transcript: árbol  boca --  mistake
in other languages: árbol  boca

the problem have repercussions on(Example):
Sort lines of field Glosario

if the text of field Glosario is:
cuando
caminemos
te
daré
un
beso
bajo
él
árbol
hasta_sacarte_un
óvulo
ñato

the command sort return: --ERR
bajo
beso
caminemos
cuando
daré
hasta_sacarte_un
te
un
árbol
él
ñato
#65523;óvulo


When really should return:
árbol
bajo
beso
caminemos
cuando
daré
él
hasta_sacarte_un
ñato
óvulo
te
un

The correct is: A  Á  a  á   N  n  Ñ  ñ 
... O  Ó  o  ó 

I hope that your understand my limited English. If the
mistake is my, please say me!!

-
Revolution Email List in Espanish at:
http://es.groups.yahoo.com/revolution_es/

-
 Lic. Luis Rodríguez Oro
 Programador I N S T E D
-



__
Renovamos el Correo Yahoo!
Nuevos servicios, más seguridad
http://correo.yahoo.es
___
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



___
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 10 former Re: OS X 10.4 vs. 10.3 incompatibility

2005-08-04 Thread Wouter
The grey bar occurs if the number of ticks (divisions) is so high  
they cannot be drawn separately.

One of the possibilities to cause this is the thumbsize = 0.
But there are other possibilities, look for extreme settings, like   
in the end value  in relation with  a small thumbsize.


Greetings,
Wouter


On 03 Aug 2005, at 03:32, John Vokey wrote:

Nope.  Thumbsize is 11.  One other strange change: a grey bar  
occurs a few pixels below the slider that doesn't appear with any  
previous version of OS X.


On 2-Aug-05, at 6:32 PM, [EMAIL PROTECTED]  
wrote:


___
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: OS X 10.4 vs. 10.3 incompatibility

2005-08-02 Thread Wouter

Is it possible the thumbsize of the slider is 0?
This tends to slow down rev enormously in Tiger (may be also in older  
OS but can't test it anymore)

Setting it to 1 resolves this problem.

Greetings,
Wouter

On 02 Aug 2005, at 23:55, John Vokey wrote:

I have encountered a strange system incompatibility.  Stacks that  
ran/run fine under Mac OS X 10.3.x, produce the following peculiar  
behaviour under 10.4.2 (whether using the MC or RR IDE).  I have a  
slider in a group that also contains a default (throbbing) button,  
which is to be clicked when the slider is in the position the user  
wants.  All is fine under 10.3.x (i.e., the button throbs and the  
slider tracks the mouse as the user slides it back and forth);  
under 10.4.2, the button s-l-o-w-l-y throbs (i.e., you can see each  
step of the throb animation), and the slider no longer keeps up  
with the mouse (i.e., it lags by a lot).  It is like the whole  
system has been slowed down by a factor of 2 or 3 (i.e., 100 or a  
1000-fold).  Yet, other default buttons throb correctly.  (I have  
no other sliders in these stacks).  It is clearly not my code  
(indeed, I have used this group successfully since at least MC 2.2,  
and probably before, and on all other versions of OS X).


I receive the list in digest mode, so please respond directly to me  
if you have any insights.




--
- JRV
There are 10 kinds of people:  those who understand binary, and  
those who don't


___
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: revDeleteFolder and Lessons Learned..

2005-07-08 Thread Wouter

Hi all,

Why patch revDeleteFolder with revDeleteFolderXXX?

Why not patch this backscript in a different way?
Like adding a param (and adapting the handler) :

 on revDeleteFolder pSrcFolder pWithoutWarning

which only will run in stealth mode if the pWithoutWarning is  
explecitely set to true.
(of course you must refrain from turning it on the first time you use  
it during development)

Older apps will still be able to use it, but only in warning mode.

Greetings,
Wouter



On 08 Jul 2005, at 12:03, Chipp Walters wrote:


Hi Dave,

Well, since I passed revDeleteFolder a single / and it tried to  
delete (w/out being able to be interrupted) the *entire* hard disk,  
I would say it's less dangerous to 'roll your own'. I would expect  
revDeleteFolder to take as an argument a valid path, including  
drive letter. For instance I would expect:


revDeleteFolder C:/

to delete the C drive. I don't know why just / does it and I'm  
afraid to test it with a null, especially since it can't be  
interrupted. Anything you roll on your own can be interrupted with  
a control-period.


The non-interruptibility of the command is a huge issue, IMO, and  
one I'm not willing to take any more chances on. I haven't looked  
at the code, but as Xavier mentioned, it seems like it should be an  
engine level issue, not a shell call. You are certainly welcome to  
use it to your hearts content-- I won't be. Once burned, twice shy.


best,

Chipp

Dave Cragg wrote:


But I'm not entirely clear of the lesson to be learned. Is the   
problem really with revDeleteFolder, or with the nature of script   
locals?
If we don't use revDeleteFolder, but we want to delete a folder,  
then  we have to roll our own routines. This can be plenty  
dangerous too.





So do we warn people not to use revDeleteFolder, and leave them  
to  their own potentially dangerous devices. Or simply warn people  
to be  *extremely* careful when deleting folders and check they  
are in fact  deleting the intended folder.




___
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: recOnline Viewer

2005-07-08 Thread Wouter


On 08 Jul 2005, at 14:39, David Burgun wrote:


Hi All,

Is there anyway to stop the revOnline Viewer window from popping up  
everytime I launch RunRev? It is sooo annoying!


It wouldn't be too bad, if there were not so many bugs in the IDE  
that make it necessary to relaunch RunRev. I really can't see the  
point of popping up this window EVERY time you launch rev, anyone  
else agree?


I MUCH better thing to do IMHO would be to open the Application  
Browser on the last stack used. Now that would be useful.


At the very least I reckon the display of the revOnline window  
should be a Preference.


It is.




Just my 5 cents worth
All the Best
Dave



Greetings,
Wouter
___
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: weird influence of the gridsize and the grid on the drawing of squares by script

2005-06-30 Thread Wouter

Thanks Jeanne,

I agree with and appreciate your answer.
I wish this had been mentioned on the drag command page too.

Greetings,
Wouter


On 30 Jun 2005, at 05:02, Jeanne A. E. DeVoto wrote:


At 8:45 PM +0200 6/29/2005, Wouter wrote:

After reinvestigating bug 2683 for which Mark Waddingham asked a  
recipe,  the weird influence of the gridsize and the grid on the  
drawing of squares by script surfaced. Will it become an  
undocumented feature or is this a bug?  Anyway I didn't know  
until now.

1 new stack and 1 button with the following script will show:



Wouter, I don't think this is a bug although the doc for grid could  
be clearer. The drag command is supposed to emulate drawing with  
the mouse, so it should respect the grid.

--
jeanne a. e. devoto ~ [EMAIL PROTECTED]
http://www.jaedworks.com

___
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


weird influence of the gridsize and the grid on the drawing of squares by script

2005-06-29 Thread Wouter

Hi all,

After reinvestigating bug 2683 for which Mark Waddingham asked a  
recipe,  the weird influence of the gridsize and the grid on the  
drawing of squares by script surfaced. Will it become an  
undocumented feature or is this a bug?  Anyway I didn't know until  
now.

1 new stack and 1 button with the following script will show:

on mouseUp
  put gridsize into  tOldgridsize
  put the grid into tOldgrid
  set the grid to true  ### Mark Schonewille for this detail
  if there is no img test then create img test
  set the rect of img test to 0,0,400,400
  set gridsize to 1
  creategrid 50,50
  set gridsize to 2
  creategrid 160,50
  set gridsize to 3
  creategrid 50,160
  set gridsize to 4
  creategrid 160,160
  set gridsize to 6
  creategrid 50,270
  set gridsize to 10
  creategrid 160,270
  set gridsize to  tOldgridsize
  set the grid to tOldgrid
end mouseUp

on createGrid x,y  ### topleft of grid
  choose the rectangle tool
  set the filled to true
  set the brushcolor to 255,255,255
  set the pencolor to 0,0,0
  put 10 into tCol   ### number of columns
  put 10 into tRow   ### number of rows
  put 10 into tSq### tSq = size of square
  put 1 into tCY
  repeat tRow
put (y + (tCY * tSq) - tSq) into tY
put 1 into tCX
repeat tCol
  put (x + (tCX * tSq) - tSq) into tX
  drag from tX,tY to tX + tSq ,tY + tSq
  add 1 to tCX
end repeat
add 1 to tCY
  end repeat
  choose browser tool
end createGrid

So when drawing by script, the gridsize and/or the grid should be  
taken care of.
May be the influence of those settings have a bigger scope (not  
tested yet).


Greetings,
Wouter
___
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: How to put a dash in front of a menu item

2005-06-27 Thread Wouter

Hi Claudi,

Putting a space in front of the dash (or any other character) could  
solve your problem, if you can live with a space in front of the dash  
that is.


Greetings,
Wouter

On 26 Jun 2005, at 21:55, Claudi Cornaz wrote:


Hi all

Still working/improving my demo of a textMenu. It's almost ready.
I can now  also increase/decrease textsizes. Lighten/darken
is just a snap away (it's the same as increase/decrease
with a slight twist) and the menu displayscorrectly all attributes.

There is just one thing I'd like to add to it: putting a dash in  
front of a menu(item).


Is there a way I can achieve this?

This way the user could see if a selection has mixed attributes
or if it's all the same.  The way I found in the documentation, and
after some tests (like putting a \ in front of the - which does'n't
give quite the desired effect. ) it doesn't work.

As far as I discovered we can put a checkMark or a diamond in front of
a menu but not a dash. I hope I am wrong, am I?

In case we indeed, can't put a dash in front of a menu, wouldn't this
be a usefull enhanchement? Should I, in a yet to figure out way,  
post this

as a request?

All best wishes
Claudi

___
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



___
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: repeat for each in reverse order ?

2005-06-27 Thread Wouter

Hi,

Using the following to reverse the order of lines of a field  
containing 525605  chars in 14194 lines



reversing by:

on mouseUp
  put fld 1 into x
  put the long seconds into zap
  repeat for each line i in x
put icr before tList
  end repeat
  put the long seconds - zap
  put tList into fld 1
end mouseUp

takes  60 seconds on a slowbook (G4 400 mhz)


reversing by:

on mouseUp
  put fld 1 into x
  put the long seconds into zap
  split x by return
  get the keys of x
  sort it numeric descending
  repeat for each line i in it
put x[i]cr after tList
  end repeat
  put the long seconds - zap
  put tList into fld 1
end mouseUp

yields around 0.413007 seconds on a slowbook (G4 400 mhz)
(which is not too bad)

The amount of chars and lines has a big influence on the speed in the  
first handler,

while in the second handler it has not.

Greetings,
Wouter

On 27 Jun 2005, at 14:40, Dennis Brown wrote:

The repeat for each only goes in forward sequential order starting  
at the beginning, except for arrays where the order is indeterminate.


I have requested a sequential access enhancement to allow for  
constructing this type of looping in a more flexible way (like  
parallel instantiation, starting at an arbitrary point, and reverse  
order), to make it possible to wander all over your data  
sequentially with the speed of the repeat for each method.   
However, it would be most useful with some improved string  
delimiter handling.  Bugzilla # 2773


Having a reverse order repeat for each might be up to twice as slow  
as the forward version depending on how it is implemented, because  
it has to go backwards to the previous delimiter then forward to  
pick up the data, though it could pick up the data in reverse order  
on the way back.  However, even twice as slow would be much faster  
than any other method.


Dennis

___
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: cascade menus

2005-06-14 Thread Wouter

Hi John,

The behavior you see for your cascade button is because of the  
autoarm property.
Turn it off by script, as the inspector is not showing it (at least I  
cannot find it in the 2.6 inspector, may be others know where it is  
located).
Instead of the way you use the menuhistory you also could use the  
param of the menupick handler (which contains the label of the the  
tab clicked):


on menuPick tWhich
 go tWhich
 set the label of me to Cascade  tWhich
end menuPick


Greetings,
Wouter





On 14 Jun 2005, at 10:15, John Ridge wrote:

I know from an earlier thread that there is an issue over the  
implementation
of the cascade style (it's really intended for use in nested menus,  
so its
standalone behaviour is non-standard - you must  mouseDown  
*outside* the

menu text before you can select a menu item).

But I have an experimental stack in which it won't even do this  
correctly.
I've uploaded it to RevOnline as Tab menu (user jmr). I'd be  
grateful to
anyone who can tell me what is going wrong here. Unless, of course,  
it works

perfectly on your platform! Mine is Mac OS9.
--


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



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


Re: cascade menus

2005-06-14 Thread Wouter

Hi John,

I had another look at your stack and the cascade button in question.
It must have sustained some shape-shifting for its properties to be  
set that way.


To have the cascade button work as you like, you should:
- turn autoarm on
- turn traversalOn off 

And the property inspector is lousy in this aspect (too).
Better use one of the widgets available or make your own.

Greetings,
Wouter


On 14 Jun 2005, at 18:55, John Ridge wrote:


on 14/6/05 9:54 am,  Wouter wrote :

Hi John,

The behavior you see for your cascade button is because of the
autoarm property.

***

Thanks, Wouter. Mind you, I'm still puzzled by the other stack in  
which it

seems to work with autoArm set to true. What I want is a button that
displays its menu as the mouse rolls over it - i.e. autoArm true. With
autoArm false, the cascade turns into a humble dropdown or popup.

And, as you rightly ask - why doesn't the Property Inspector give  
us a hint

about this? OK - so many properties, so little space in the PI window.
Sigh...
--


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



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


Re: cascade menus

2005-06-14 Thread Wouter

Also have a look at Bug 1338.

At2004-06-26 19:51 ---
--   it was changed  to enhancement

In 2.6 still as buggy as ever.

But if you really need cascade style buttons they can be simulated  
very easily.


Greetings,
Wouter

On 14 Jun 2005, at 10:15, John Ridge wrote:

I know from an earlier thread that there is an issue over the  
implementation
of the cascade style (it's really intended for use in nested menus,  
so its
standalone behaviour is non-standard - you must  mouseDown  
*outside* the

menu text before you can select a menu item).

But I have an experimental stack in which it won't even do this  
correctly.
I've uploaded it to RevOnline as Tab menu (user jmr). I'd be  
grateful to
anyone who can tell me what is going wrong here. Unless, of course,  
it works

perfectly on your platform! Mine is Mac OS9.
--



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


Re: Bouncy Updated for 2.6

2005-06-07 Thread Wouter


On 07 Jun 2005, at 09:36, Geoff Canyon wrote:

I've updated the Bouncy stack with the Revolution graphic for 2.6.  
It now happily bounces around the screen with a deep mask. The  
engine handles it very nicely (disclaimer: handles it nicely on my  
1ghz PowerBook. Please let me know how it behaves on older hardware).




Wooow!
Even on a slowbook (titanium 400mhz with an underpowered graphics  
card) it bounces very nicely (up to 3 clones).


snip



Regards,

Geoff Canyon
Inspired Logic


Tnx.

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


Re: using split to build multi-dimensional arrays ?

2005-06-07 Thread Wouter


On 07 Jun 2005, at 13:44, jbv wrote:


Hi list,

When I run the following script :

  put a,b,c,d,e into L
  repeat with j=1 to 2
repeat with i=1 to 5
  put item i of L into W[j,i]
end repeat
  end repeat
  combine W using cr and comma
  put W

I get this :
1,1,a
1,2,b
1,3,c
1,4,d
1,5,e
2,1,a
2,2,b
2,3,c
2,4,d
2,5,e


--
but when I add the 3 following lines :

put W into W1
split W1 by cr and comma
put W1[2,5]

I get empty...

Does that mean that split can't be used to build
2 dimensional arrays ?

Thanks,
JB


Better use a different char to combine the array if you want to split  
it later back into an array.

You used the comma  already as an itemdelimiter.

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


Re: the ScreenRect

2005-06-07 Thread Wouter

Hi,

There are more problems with second screens than the screenrect,  see  
bug 2426 (mousecolor, dropper tool not picking up color on second  
screen).

Which is still a bug in rev 2.6.

Greetings,
Wouter


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


Re: sort question

2005-06-03 Thread Wouter

Hi Jack,

You could do for example:

on mouseUp
  get field 1
  sort it
  set the itemdelimiter to .
  sort lines of it numeric ascending by item 1 of each
  put it into fld 2
end mouseUp

Greetings,
Wouter

On 03 Jun 2005, at 18:45, [EMAIL PROTECTED] wrote:


 Greetings,

 I need a field to sort numerically and when I try it I get the  
result below. I checked the docs and experimented with the  
numberformat without success. Help!


jack



1.101-
10.101-
10.201-
10.301.1-
10.351-
10.401-
10.501-
11.101.1-
11.151-
2.101-
2.301-
20.101-
3.101-
4.101-
4.991-
5.101.1-
5.151-
5.201-
5.301-
5.351.1-
5.401-
5.451-
5.501-
5.651-
5.701-
6.101.1-
6.201.1-
6.301-
6.401.1-
7.101-
7.151.1-
7.201.1-
7.251-
7.401-
7.501.1-
8.101-
8.301-
9.101.1-
9.351-
___
use-revolution mailing list
use-revolution@lists.runrev.com
http://lists.runrev.com/mailman/listinfo/use-revolution



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


Re: sort question

2005-06-03 Thread Wouter


On 03 Jun 2005, at 20:09, Jim Ault wrote:


Greetings, jack


snip



on sortFldSource
  put fld source into tSource  --lines to sort
  sort lines of tSource numeric by numberConvert(each)
  put tSource into fld destination  --output for your review
end sortFldSource

function numberConvert pStrToConvert
  if pStrToConvert is  then
return 
  else
set itemdel to  .
if the last char of pStrToConvert is - then
  put the last char of pStrToConvert into tSign
  delete the last char of pStrToConvert
end if
put item 1 of pStrToConvert into tIntPart
put item 2 of pStrToConvert into tDecPart1
if the number of items in pStrToConvert  2 then
  put item 3 of pStrToConvert into tDecPart2
else
  put  into tDecPart2
end if
put tSign  tIntPart  .  tDecPart1  tDecPart2 into tReply
return tReply
  end if
end numberConvert

Thanks to jeanne a. e. devoto for this (each) form of the sort  
lines of

command.

Jim Ault
Las Vegas

On 6/3/05 9:45 AM, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote:


Hi Jim,

I don't know on your computer but on my mac this handler gives the  
following result for Jack's list:


10.101-
11.151-
4.101-
5.101.1-
20.101-
11.101.1-
10.501-
10.401-
10.351-
10.301.1-
10.201-
9.351-
9.101.1-
8.301-
8.101-
7.501.1-
7.401-
7.251-
7.201.1-
7.151.1-
7.101-
6.401.1-
6.301-
6.201.1-
6.101.1-
5.701-
5.651-
5.501-
5.451-
5.401-
5.351.1-
5.301-
5.201-
5.151-
4.991-
3.101-
2.301-
2.101-
1.101-

To make it more universal (no matter leading or trailing - and +) one  
could change it to:


on mouseUp
  get field 1
  put numsort(it,ascending) into fld 2
end mouseUp

function numSort pList,pDirection
  set the itemdelimiter to .
  repeat for each line i in pList
put i into x
if char -1 of word 1 of i is in -+ then put char -1 of word 1  
of i  char 1 to -2 of word 1 of i into x
if the num of items in x  2 then put item 1 to 2 of x  item 3  
of x into x

put i into numArray[x]
  end repeat
  put the keys of numArray into y
  if pDirection = ascending then sort lines of y numeric ascending
  else sort lines of y numeric descending
  repeat for each line i in y
put numArray[i]  cr after tList
  end repeat
  return tList
end numSort

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


Re: Speed of XML vs SQLite

2005-05-23 Thread Wouter

Hi,

For what it is worth, have a look at this:

http://www.15seconds.com/issue/010410.htm
(don't forget the first part)

and at Mark Brownell's handlers and techniques as an option for rev's  
functions.


Greetings,
Wouter

On 23 May 2005, at 14:57, Levi Kendall wrote:


Hi all,

   I'm considering using XML for building a database but my concern is
that for data retrieval it might become very slow as more and more
data is added.  Would using functions such as revXMLMatchingNode be as
slow as doing a full text search of the xml or would it be at least
comparable to performing a lookup in an actual database?  Another
speed concern would be finding a node with multiple matching
attributes.  Is this a good idea or would I be better off using
something like SQLite?

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



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


Re: Anyone using Tiger Yet?

2005-05-03 Thread Wouter
Hi,
Only a small problem.
On all my macs running Tiger, the triangles/arrows indicating a  
submenu in the revmenubar and in popup menus (like the one used in  
the inspector) do not show, though the submenus work.
Anybody seen the same?

Greetings,
Wouter
On 03 May 2005, at 10:34, Chris Carroll-Davis wrote:
Hello all.
Not seen any problems with Rev yet, but the driver for my wireless  
card is now broken and Photoshop won't open a dragged or double- 
clicked file.

Other than that ok.  Anyone else got any reports?
Chris
On 2 May 2005, at 06:34, Roger Guay wrote:

Been using it for 2 days . . . no problems yet.  And, I love it!
On May 1, 2005, at 9:00 AM, use-revolution- 
[EMAIL PROTECTED] wrote:


Message: 9
Date: Sun, 1 May 2005 08:24:50 -0500
From: Burrton Wodruff [EMAIL PROTECTED]
Subject: Anyone using Tiger Yet?
To: use-revolution@lists.runrev.com
Message-ID: [EMAIL PROTECTED]
Content-Type: text/plain; charset=US-ASCII; format=flowed
Hi Folk,
Anyone using Tiger with Rev yet? Any problems?
Burt Woodruff
RippleSoft

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

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


Re: Making Revolution faster with really big arrays

2005-04-29 Thread Wouter
On 28 Apr 2005, at 17:59, Dennis Brown wrote:

Frank,
This is a simplified algorithm that I think would best translate 
directly between Transcript and PostgreSQL for a time trial.  Just 
make sure the PostgreSQL code is an item by item algorithm also.

Thanks,
Dennis
Transcript output on my machine:  1,000,000 Element Sum = 50050 
Elapsed Time = 11.467659 seconds.

on mouseUp
  global gTestArray
  if number of lines of the keys of gTestArray is not 100 then 
--already done the init
put empty into gTestArray --start with an empty a variable
repeat with x = 1 to 1000
  repeat with y = 1 to 1000
put x into gTestArray[x,y]
  end repeat
end repeat
  end if
  --
  put the long seconds into st
  Method6
  get the long seconds
  put  Elapsed Time =(it - st)seconds. after msg
end mouseUp

on Method6 -- Add elements using keyed arrays
  global gTestArray
  put 0 into total
  repeat with x = 1 to 1000
repeat with y = 1 to 1000
  add gTestArray[x,y] to total
end repeat
  end repeat
  put 1,000,000 Element Sum = total
end Method6
--
Hi,
On my slowbook (400 mhz G4)  Method6 takes around 27 - 28 seconds.
In this case all values are added. So if the handler is changed 
accordingly:

on Method6 -- Add elements using keyed arrays
  global gTestArray
  put 0 into total
  get the keys of gTestArray
  repeat for each line i in it
  add gTestArray[i] to total
end repeat
  put 1,000,000 Element Sum = total
end Method6
It only takes between 5 - 6 seconds (on my slowbook)
Greetings,
Wouter
___
use-revolution mailing list
use-revolution@lists.runrev.com
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: Making Revolution faster with really big arrays

2005-04-29 Thread Wouter
On 28 Apr 2005, at 17:59, Dennis Brown wrote:

Frank,
This is a simplified algorithm that I think would best translate 
directly between Transcript and PostgreSQL for a time trial.  Just 
make sure the PostgreSQL code is an item by item algorithm also.

Thanks,
Dennis
Transcript output on my machine:  1,000,000 Element Sum = 50050 
Elapsed Time = 11.467659 seconds.

on mouseUp
  global gTestArray
  if number of lines of the keys of gTestArray is not 100 then 
--already done the init
put empty into gTestArray --start with an empty a variable
repeat with x = 1 to 1000
  repeat with y = 1 to 1000
put x into gTestArray[x,y]
  end repeat
end repeat
  end if
  --
  put the long seconds into st
  Method6
  get the long seconds
  put  Elapsed Time =(it - st)seconds. after msg
end mouseUp

on Method6 -- Add elements using keyed arrays
  global gTestArray
  put 0 into total
  repeat with x = 1 to 1000
repeat with y = 1 to 1000
  add gTestArray[x,y] to total
end repeat
  end repeat
  put 1,000,000 Element Sum = total
end Method6
--
Hi again with a little addition,
The initialization of the test array takes about 36 seconds.
Following version does the same in much shorter time:
on mouseUp
  put the long seconds into zap
  --if number of lines of the keys of gTestArray is not 100 then 
--already done the init
  put empty into gTestArray --start with an empty a variable
  repeat with i = 1 to 1000
put icomma after x
  end repeat
  repeat 1000
put x after gTestArray
  end repeat
  split gTestArray by comma
  put the long seconds - zap
  --end if
  put the long seconds into st
  Method6
  get the long seconds
  put  Elapsed Time =(it - st)seconds. after msg
end mouseUp

In this case the initialization takes about 10 seconds on the slowbook
___
use-revolution mailing list
use-revolution@lists.runrev.com
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: Constraining the pointer

2005-04-22 Thread Wouter
On 22 Apr 2005, at 11:53, David Glasgow wrote:
Revlistas,
This is a fairly lengthy preamble, so be patient.
I have an assessment that may be used with people with significant 
motor skills problems.  At a point when they have to use a rating 
scale I constrain the pointer so it can't 'fall' of the scale.   I 
know this is contrary to the HIG gospel, but it works very well.   As 
soon as they have made a legitimate rating, the pointer is released.  
I suspect they don't even notice what happens, because of course they 
don't *want* to move off the scale, it just sometimes happens with a 
muscular jerk or difficulty stopping a purposeful move one way or the 
other.

Anyway, the build using 1.1.1 worked fine on Win  Mac classic.  I 
downloaded the latest Rev, and tried a build of the assessment stack.  
I was disappointed with how many things broke, including the first 
effort at an OSX build.

Among the many glitches, I found that the constraining script resulted 
in horribly jerky and delayed mouse movements.  The scale is unusable 
on OSX (10.3.8 - or maybe 7) but fine in classic and win.  Is this an 
OS X thang?  Well obviously it is, but is it at the Rev or OS end?

The script is below:  Yes it is a hack, but it works OK.  (By way of 
explanation the field 'container' is contiguous with the scale  the 
+4 and - 4 are just my way of adjusting the margin of error around the 
scale.

Any suggestions as to what might be happening would be gratefully 
received - or any alternative suggestions as to how to obtain the same 
effect

if within (field container,mouseloc()) = false
then
  get the mouseloc
  switch
  case item 2 of the mouseloc  the bottom of field container
put (the bottom of field container -4) into item 2 of it
break
  case item 2 of the mouseloc  the top of field container
put (the top of field container +4)into item 2 of it
  end switch
  switch
  case item 1 of the mouseloc  the left of field container
put (the left of field container + 4) into item 1 of it
break
  case item 1 of the mouseloc  the right of field container
put (the right of field container- 4) into item 1 of it
  end switch
  put (item 1 of the topleft of this stack) + (item 1 of it) into 
item 1 of it
  put (item 2 of the topleft of this stack) + (item 2 of it) into 
item 2 of it

  set the screenmouseloc to it
end if
Best Wishes,
David Glasgow
Hi David,
I don't know in which kind of control structure you used the code above,
but I changed it a bit and put it inside a mousemove handler.
The code seems to work without jerks or delayed mousemovements or extra 
overhead:

on mousemove x,y
  get rect of fld container
  if x,y is not within it then
if xitem 1 of it  then put (item 1 of it + 4) into tX --left 
of field container
else if  xitem 3 of it  then put (item 3 of it - 4) into tX 
--right of field container
else put x into tX
if yitem 4 of it   then put (item 4 of it  - 4) into  tY  
--bottom of field container
else if y   item 2 of it  then put (item 2 of it  + 4) into tY 
--top of field container
else put y into tY
put (left of this stack) + tX into item 1 of tLoc
put (top of this stack) + tY into item 2 of tLoc
set the screenmouseloc to tLoc
  end if
end mousemove

Hope this works for you.
Greetings,
Wouter
___
use-revolution mailing list
use-revolution@lists.runrev.com
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: Constraining the pointer

2005-04-22 Thread Wouter
On 23 Apr 2005, at 00:57, [EMAIL PROTECTED] wrote:
   I don't believe that mega-IF statement is truly necessary. Try this
instead:
on mouseMove X,Y
  put the rect of fld container into Fred
  put min (item 3 of Fred - 4, max (item 1 of Fred + 4, X)) into X
  put min (item 4 of Fred - 4, max (item 2 of Fred + 4, Y)) into Y
  set the screenMouseLoc to (X,Y)
end mouseMove
   If the mouseLoc is within the specified rectangle, the mouse's X 
co-ord
will be less than item 3 of the rect, and greater than item 1 of the 
rect. Thus,
max (item 1 of rect, the mouse X) will always result in a number *at 
least*
as large as that item 1, and min (item 3 of rect, the mouse Y) will 
always
result in a number *no greater than* that item 3. Plug the results of 
the max into
a min (sorry about how that sounds, but you get the idea, right?), and 
you
end up with a number that *must* be somewhere between item 1 of the 
rect and
item 3 of the rect.
   Something similar applies to the mouse's Y co-ord, and items 2 and 
4 of
the rect.

   Hope this helps...
Yeah it is a nice idea.
But to make it work fluently you'll have to add at least 1 if statement 
and adjust the screenmouseloc coordinates by adding the left and top of 
the stack to x,y respectively. Otherwise you'll end up with a 
constrain out of the card by jump off the left side, which people 
with significant motor skills problems won't  really appreciate. 
Without the if statement the x,y coordinates will be set continuously 
which makes it very slow and jerky, at least on my slowbook.

on mouseMove X,Y
put the rect of fld container into Fred
if x,y is not within Fred then
  put  min (item 3 of Fred - 4, max (item 1 of Fred + 4, X)) into X
  put  min (item 4 of Fred - 4, max (item 2 of Fred + 4, Y)) into Y
  set the screenMouseLoc to (left of this stack +X,top of this 
stack + Y)
end if
end mouseMove

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


Re: RegEx Replace Text -- strip leading and trailing spaces

2005-04-14 Thread Wouter
On 14 Apr 2005, at 01:49, Ken Ray wrote:
On 4/13/05 2:47 PM, Trevor DeVore [EMAIL PROTECTED] wrote:
get matchText(pString, (?s)^[ \t\r\n]+(.*?)[ \t\r\n]+$, tReturnVal)
This will strip leading and trailing whitespace from a multiline
string.  But given that you say that word 1 to -1 is that much faster 
I
am going to switch to that.  Those of us still trying to break away
from our previous languages like to complicate things on occasion ;)
Unfortunately neither your nor the word 1 to -1 solution will take 
into
account hard spaces (non-breaking spaces) that could be part of the
whitespace on either side of the string. So to fix that, you would 
need to
use:

  get matchText(pWhat, (?s)^\s+(.*?)\s+$, tReturnVal)
I agree that the word 1 to -1 solution will do what you want 95+% of 
the
time, but just wanted to make sure that everyone knew there was at 
least one
'hole' in that approach in case anyone cared. ;-)

Ken Ray
Sons of Thunder Software
Web site: http://www.sonsothunder.com/
Email: [EMAIL PROTECTED]
Wow, lots of things happen when sleeping :-).
The matchtext version is s much slower (about 30x which makes it 
for me a no no in an extended repeat loop).

The hard space if any, can be dealt with in a one time replacement by a 
soft space in the container to parse, out of the repeat loop.
(is the non breaking space  numtochar(16)?  On the mac this is mostly 
represented by a non-space character for most fonts (rectangle or down 
arrow, etc) in rev/mc)

Once it is replaced the following is faster than the regex to strip 
only the leading spaces.
Much faster when used inline in a repeat loop ( 10x faster than the 
regex replacetext version), less when administered by a function 
(around 4x faster):

put word 1 to -1 of pString into x
replace x with , in pString
put x  item 2 of pString into strippedString (or return x  item 2 of 
pString for the function )

You could put this into a oneliner but this makes it  about 2x slower 
than the above:

return word 1 to -1 of pString  item 2 of (replacetext(pString,word 1 
to -1 of pString,,))

but still at least more than 2x faster than the regex replacetext  
version.

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


Re: RegEx Replace Text -- strip leading and trailing spaces

2005-04-14 Thread Wouter
Thanks Eric
Regards,
Wouter
On 14 Apr 2005, at 10:54, Eric Chatonet wrote:
Hi Wouter,
Le 14 avr. 05, à 10:52, Wouter a écrit :
The hard space if any, can be dealt with in a one time replacement by 
a soft space in the container to parse, out of the repeat loop.
(is the non breaking space  numtochar(16)?  On the mac this is mostly 
represented by a non-space character for most fonts (rectangle or 
down arrow, etc) in rev/mc)
Hard space is numToChar(202)
My ASCII Picker (free utility on my web site) might help you.
Amicalement,
Eric Chatonet.
___
use-revolution mailing list
use-revolution@lists.runrev.com
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: Message Sending Problems

2005-04-14 Thread Wouter
On 14 Apr 2005, at 11:48, David Burgun wrote:
But this results in the following error:
Object: value is not a boolean
Object: Arrows
Line: do myDoText
Hint: 1
I have checked the text in myDoText and it's fine and reads:
send Increment 1 to graphic G-1027
I don't understand why I am getting this error? Any ideas anyone?
change:
put send Increment 1  myType   the cPropTargetObjectName of me 
into myDoText

to
put send  quote Increment 1  quote  myType   the 
cPropTargetObjectName of me into myDoText

(there is a space in Increment 1 so rev tries to evaluate as a 
boolean)

Also how can I get the type of an object? Is there a property for it? 
I can't seem to find one!

put word 1 of the name of control num  into tObjName   or
put word 1 of the name of the Target  into tObjName
etc.
Greetings,
Wouter
___
use-revolution mailing list
use-revolution@lists.runrev.com
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: RegEx Replace Text -- strip leading and trailing spaces

2005-04-13 Thread Wouter
And what about a one line non regex solution like: put word 1 to -1 of 
x into x?
(I know, not as elegant and impressive as a true regex ;-)

Gr W.
On 13 Apr 2005, at 12:14, Matt Denton wrote:
G'day all
Regular Expression syntax in ReplaceText is driving me a bit loopy 
right now, I was hoping someone out there could work out what I'm 
doing wrong...

I want a single RegEx expression using ReplaceText to strip out 
leading and tailing spaces, leaving any spaces in the middle 
untouched.

I've got it working in 2 lines of code, but I'm SURE I can do it in 
one.  (I've spent an hour trying to reduce this to one line... I know, 
why not go for a swim or something more constructive with my time...)

This works:
put replaceText(tSomeText, ^ +,empty) into tFirstPass
put replaceText(tFirstPass,  +$,empty) into tSecondPass
But when I try and combine:
put replaceText(tSomeText, ^ ?| +$,empty) into tOnePass
I can't get it to work!!  I've tried many variations and the logic 
SEEMS to be right... obviously not.

Anyone?  I'll award the winner with a jar of Vegemite from Australia.
Cheers
M@
Matt Denton
___
use-revolution mailing list
use-revolution@lists.runrev.com
http://lists.runrev.com/mailman/listinfo/use-revolution
___
use-revolution mailing list
use-revolution@lists.runrev.com
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: RegEx Replace Text -- strip leading and trailing spaces

2005-04-13 Thread Wouter
On 13 Apr 2005, at 18:09, Trevor DeVore wrote:
On Apr 13, 2005, at 3:14 AM, Matt Denton wrote:
G'day all
Regular Expression syntax in ReplaceText is driving me a bit loopy 
right now, I was hoping someone out there could work out what I'm 
doing wrong...

I want a single RegEx expression using ReplaceText to strip out 
leading and tailing spaces, leaving any spaces in the middle 
untouched.
Matt,
I use this regex to strip whitespace:
get replaceText(pString, ^[ \t\r\n]+|[ \t\r\n]+$, )
--
Trevor DeVore
Blue Mango Multimedia
[EMAIL PROTECTED]
No offence, but this won't strip whitespaces at both ends of a string 
in one pass.
And it is about ten times slower for one pass than: get word 1 to -1 of 
pString
(which does strip leading and ending whitespaces in one pass, but true 
it is no regex).

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


Re: RegEx Replace Text -- strip leading and trailing spaces

2005-04-13 Thread Wouter
On 13 Apr 2005, at 21:47, Trevor DeVore wrote:
snip

Is there a way to do ltrim (trim whitespace on left of string) in 
plain transcript?  Right now I just use:

function str_lTrim pString
get replaceText(pString, ^[ \t\r\n]+, )
return it
end str_lTrim
--
Trevor DeVore
Blue Mango Multimedia
[EMAIL PROTECTED]
In plain transcript one could do:
function str_lTrim pString
return char 1 to -2 of word 1 to -1 of (it  x)
end str_lTrim
But  it is about 2 times slower than the regex solution in this case.
So the choice is obvious :-)
Wouter
___
use-revolution mailing list
use-revolution@lists.runrev.com
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: How to get the difference between two lists?

2005-04-05 Thread Wouter
On 04 Apr 2005, at 05:44, Dar Scott wrote:
On Apr 3, 2005, at 9:04 PM, Ken Ray wrote:
I can of course do a repeat loop through the small list and remove 
those
items from the comprehensive list, but I'm wondering if there's a 
faster way
to do this.
Some wild ideas:
1.  Convert the smaller list into a regex and use replaceText().
snip
It would have been nice if the filter function was fully regex 
compatible then Dar's idea of turning it into a regex statement could 
produce something like a one-liner.

For the proposed example with the current state of the filter function 
it needs 2 lines (not counting the lines for the preparation of the 
regex)3

filter tOrigList without  [56]
filter tOrigList without  1[18]
Gr W.
___
use-revolution mailing list
use-revolution@lists.runrev.com
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: How to get the difference between two lists?

2005-04-05 Thread Wouter
Could you compile a oneliner regex that worked in rev's filter function?
completely amazed,
W.
On 05 Apr 2005, at 18:58, Dar Scott wrote:
On Apr 5, 2005, at 7:40 AM, Wouter wrote:
It would have been nice if the filter function was fully regex 
compatible then Dar's idea of turning it into a regex statement could 
produce something like a one-liner.

I tried it and it was a oneliner.
It was awfully slow.  It took six seconds (IIRC) for a thousand and 
couldn't compile the regex for 10,000.

There have been several times when I tried using the replaceText() 
function and was surprised at how slow it was.  I may be thinking 
about it wrong.

Dar
--
**
DSC (Dar Scott Consulting  Dar's Lab)
http://www.swcp.com/dsc/
Programming Services and Software
**
___
use-revolution mailing list
use-revolution@lists.runrev.com
http://lists.runrev.com/mailman/listinfo/use-revolution
___
use-revolution mailing list
use-revolution@lists.runrev.com
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: How to get the difference between two lists?

2005-04-05 Thread Wouter
On 05 Apr 2005, at 20:03, Dar Scott wrote:
snip
// filter version
function shortListDar5 pL, pEx
  filter pL without replaceText(pEx,\n,|)
  return pL
end shortListDar5
Dar

This was the reason I was lamenting that  rev's filter command is not 
fully regex compatible.
Your replaceText part returns a | delimited list. But the  | (or)  
does not work in the filter command.
Not as in filter x without 5|6|11|18 nor as in filter  x without 
[56]|1[18].
The  | seems even to be ignored between [ ] brackets.

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


Re: sorting by date senile?

2005-03-09 Thread Wouter
On 09 Mar 2005, at 15:45, [EMAIL PROTECTED] wrote:
Hi everyone,
Im trying to sort a list of dates - nothing hard right?
  set itemdelimiter to tab
   sort lines of fld dateIndex datetime descending by item 1 of each
The dates are in item 1 - no prob.
The dates are tested with month before or after... (all days are set 
to 1)

But what I get is this! (or backwards!) - never mind the 2nd, 3rd
columns...
01/10/1932  173310  2
01/10/1908  173310  2
01/09/1908  9523814 2
01/06/1908  419840  1
01/01/2004  2415830 11
01/05/2003  6293645 115
01/01/2000  5664075122  42593
01/12/1999  6476478340  39207
01/12/1998  3215445 1245
Is this a bug? I tested this in MC first and thought this was an old 
but
but after testing it in RR 2.5 and get the same wacky result!

cheers
Xavier
Hi Xav,
This is probably due to the dates  1970.
Dates from 1970 on up to 2032 will sort correctly by your syntax.
You will have to do some math, but you are good at that ;-)
Gr W.
___
use-revolution mailing list
use-revolution@lists.runrev.com
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: sorting by date senile?

2005-03-09 Thread Wouter
Hi,
The centurycutoff  system works from 1902 up. If you have  earlier 
dates you will have to use another system.

The reason is dates are calculated with the seconds.
Gr W.
On 09 Mar 2005, at 17:04, [EMAIL PROTECTED] wrote:
Klaus,
Awesome!
But this doesn't solve a problem with the conversion of dates to 
dateitems
prior to 1970s! I'll bugzilla that I think!

Shouldn't the centurycutoff be defaulted to 00? I would seem more
logical...
regards,
Xavier
On 09.03.2005 17:00:56 use-revolution-bounces wrote:
Try this one:
...
set the centurycutoff to 00
sort lines of fld dateIndex datetime descending by item 1 of each
...
Works here for me:
01/06/1908 xyz...
01/09/1908
01/10/1908
01/10/1932
01/12/1998
01/12/1999
01/01/2000
01/05/2003
01/01/2004
Is this a bug?
I am afraid this is a feature (of some sort...) ;-)
Danke Klaus! Good going!
Now im much less confused - but still scared of this feature!
cheers
Xavier
-
Visit us at http://www.clearstream.com
IMPORTANT MESSAGEInternet communications are not secure and 
therefore
Clearstream International does not accept legal responsibility for the
contents of this message.The information contained in this e-mail 
is
confidential and may be legally privileged. It is intended solely for 
the
addressee. If you are not the intended recipient, any disclosure,
copying,
distribution or any action taken or omitted to be taken in reliance on
it,
is prohibited and may be unlawful. Any views expressed in this e-mail 
are
those of the individual sender, except where the sender specifically
states
them to be the views of Clearstream International or of any of its
affiliates or subsidiaries.END OF DISCLAIMER
___
use-revolution mailing list
use-revolution@lists.runrev.com
http://lists.runrev.com/mailman/listinfo/use-revolution
___
use-revolution mailing list
use-revolution@lists.runrev.com
http://lists.runrev.com/mailman/listinfo/use-revolution
___
use-revolution mailing list
use-revolution@lists.runrev.com
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: more rawkeydown problems

2005-03-07 Thread Wouter
On 06 Mar 2005, at 20:04, J. Landman Gay wrote:
snip
I'm not sure it is a bug, it is just the differences between operating 
systems. The Rev engine just passes on the key codes that the 
operating system sends. If you have the MC IDE, see the Character 
Chooser in the MetaCard Tools menu for examples of these 
differences. Sometimes you can use the macToISO and ISOtoMac functions 
to translate between the character sets, but I don't think those 
functions work with non-ascii keystrokes.

--
Jacqueline Landman Gay | [EMAIL PROTECTED]
HyperActive Software   | http://www.hyperactivesw.com
On 07 Mar 2005, at 00:23, Sarah Reichelt wrote:
snip
While differences between keyboards  operating systems are annoying, 
the keys you are checking are mostly available using other messages. 
In NumLock is on, the numeric keys generate arrowKey messages and if 
NumLock is on, the number can be read directly in a keyDown or keyUp 
handler.

Cheers,
Sarah
Thank you Jacqueline, Sarah and Tobi for your responses.
The rev rawkeydown handler reports a kind of mixed raw keys values: 
ascii code and raw code in the range between 65000 - 65999.
Seeing Tobi's little app. (tnx Tobi) I'm inclined to think the values 
of the rawkeydown handler in rev in the region above 65000 are due to 
rev's own system of administering values to keys (but i'll be wrong ;-)
So I'm not sure this is due only to differences between operating 
systems and by this not a bug.

If the help key is giving a value of 268762986 on mac os x, I 
consider this not a correct value though it is unique for the help key 
on mac os x.
The same for the `key in american qwerty keyboard layout, it should 
give the ascii value and not a zero.
And so on...

Sarah you said:
 In NumLock is on, the numeric keys generate arrowKey messages and if 
NumLock is on, the number can be read directly in a keyDown or keyUp 
handler

On win yes but not on mac os x.
The numlockkey doesn't affect the value of the numerical keys on the 
numerical keypad in mac os x.
And there is no numLockKey function we could use to poll the numLockKey 
condition like there is a capsLockKey function.
(and the keyboard is not broken as the numlockkey works in win vpc)

Revolution, being a crossplatform RAD, should make keyboard input as 
uniform as possible between platforms regarding it's own application 
and offshoots.
But I'll refrain from bugzilla-ing until further notice.

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


more rawkeydown problems

2005-03-06 Thread Wouter
Hi All,
If crossplatform uniformness is not your piece of cake then please 
don't read this mail.
But for those who really need to process keyboard input here are some 
more keyboard anomalies to check.

All values are from a rawkeydown handler.
- the key straight under the escape key (qwerty `/ ~  or  §/±  or 
something else depending on which qwerty you use) will give a 0 value 
on mac os x
when an american qwerty keyboard layout is chosen but not with another 
keyboard layout.
- help key on mac os x gives value 268762986 instead of 65379 (win vpc)
- the numlock key on mac osx x enters a char in the field when focused 
and  editable: numtochar(27)
- the values of the numeric keyboard on mac differ from these of win !!!
  On mac os x the value without numLock is the same as with numLock, 
not on win vpc.
  On win vpc side there are also some anomalies (see below).

### numerical keyboard
 65429  ### 7 mac os x
 65463  ### 7 - numlock win vpc
 65360  ### 7 + numlock win vpc
 65430  ### 4 mac os x
 65460  ### 4 - numlock win vpc
 65361  ### 4 + numlock win vpc
 65431  ### 8 mac os x
 65464  ### 8 - numlock win vpc
 65362  ### 8 + numlock win vpc
 65432  ### 6 mac os x
 65462  ### 6 - numlock win vpc
 65363  ### 6 + numlock win vpc
 65433  ### 2 mac os x
 65458  ### 2 - numlock win vpc
 65364  ### 2 + numlock win vpc
 65434  ### 9 mac os x
 65465  ### 9 - numlock win vpc
 65365  ### 9 + numlock win vpc
 65435  ### 3 mac os x
 65459  ### 3 - numlock win vpc
 65366  ### 3 + numlock win vpc
 65436  ### 1 mac os x
 65457  ### 1 - numlock win vpc
 65367  ### 1 + numlock win vpc
 65437  ### 5 mac os x
 65461  ### 5 - numlock win vpc
 65461  ### 5 + numlock win  vpc !!! no change
 65438  ### 0 mac os x
 65456  ### 0 - numlock win
 65379  ### 0 + numlock win
 65439  ### . mac os x
 65454  ### . - numlock win
 65535  ### . + numlock win  !!! value of deletekey on mac !!!
 65493  ### = mac os x
61  ### = win vpc  the chartonum value
 other keys of the  numerical keyboard are the same
These are tests on a apple usb keyboard. May be there will also be 
differences on laptop keyboards.
If someone can test and confirm the above then this can be bugzilla'ed.

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


Re: 2 little questions

2005-03-04 Thread Wouter
This is what I needed.
Thank you very much Ken
Gr W.

On 04 Mar 2005, at 01:21, Ken Ray wrote:
On 3/3/05 5:24 PM, Wouter [EMAIL PROTECTED] wrote:
On 03 Mar 2005, at 22:01, Ken Ray wrote:
What I meant was:  commandkey is the applekey on mac, equivalent on
windows is the windows key or startkey?
Well, I guess it depends on keyboards. Both of my keyboards are 
Logitech
wireless keyboards that have three keys to the left of the space bar,
labelled:

  Ctrl
  Start/Alt/Option
  Alt/(apple symbol)/(cloverleaf symbol)
Yes, I know, the two alts not withstanding, these generate the 
following
keys (note that in Windows they are generated automatically; in Mac 
the raw
keycodes for the modifier keys aren't generated until you type another 
key
and you get the raw keyCode for *that* key instead):

Windows
--
  Ctrl -- (65507) / controlKey is 'down'
  Start/Alt/Option -- (65388) / no modifier keys are down
  Alt/(apple symbol)/(cloverleaf symbol) -- (65513) / optionKey is 
'down'

Mac

  Ctrl -- controlKey is 'down'
  Start/Alt/Option -- optionKey is 'down'
  Alt/(apple symbol)/(cloverleaf symbol) -- commandKey is 'down'
HTH,
Ken Ray
Sons of Thunder Software
Web site: http://www.sonsothunder.com/
Email: [EMAIL PROTECTED]
___
use-revolution mailing list
use-revolution@lists.runrev.com
http://lists.runrev.com/mailman/listinfo/use-revolution
___
use-revolution mailing list
use-revolution@lists.runrev.com
http://lists.runrev.com/mailman/listinfo/use-revolution


2 little questions

2005-03-03 Thread Wouter
Hi All,
Two little questions:
1. in the transcript dictionary is stated:
   - on unix and windows systems, the commandkey function returns the 
same value as the controlkey function.
This can be verified in VPC.
But which is the value returned by the equivalent of the commandkey on 
the mac in windows?
(because of the special assignment of the commandkey on the mac, this 
cannot be retrieved in VPC)

2. noticing a difference in behavior of buttons between platforms (one 
more :-):
  - a button with the traversalon set to true (default condition) will 
take the focus out of a field when activated by mouse in windows, but 
not so on mac.
Which is correct behavior and which is preferable?

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


Re: 2 little questions

2005-03-03 Thread Wouter
On 03 Mar 2005, at 22:01, Ken Ray wrote:
On 3/3/05 3:44 AM, Wouter [EMAIL PROTECTED] wrote:
Hi All,
Two little questions:
1. in the transcript dictionary is stated:
- on unix and windows systems, the commandkey function returns the
same value as the controlkey function.
This can be verified in VPC.
But which is the value returned by the equivalent of the commandkey on
the mac in windows?
If you're talking about the key that is marked as the commandKey on a 
Mac
keyboard, this is actually the alt or option key in Windows, and 
returns
that the optionKey is down.
What I meant was:  commandkey is the applekey on mac, equivalent on 
windows is the windows key or startkey?
And which value has this key in a rawkeydown handler?65xxx or empty?

Thanks Ken for your response.
Gr W.
___
use-revolution mailing list
use-revolution@lists.runrev.com
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: unlimited undo's for text fields

2005-02-28 Thread Wouter
J. Landman Gay
Sat, 26 Feb 2005 20:06:30 -0800
On 2/26/05 2:07 PM, Dar Scott wrote:
snip
 Can't do it on a Mac. The OS doesn't send any messages for the shift 
key and command key unless they are paired with an alpha-numeric 
keypress. Windows OS does. Rev has no way of knowing when the user 
depresses the shift key alone.


Weird because most games (red faction, jedi knight, unreal, quake, 
etc... ) on the mac succeed in this, why can't rev?

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


Re: unlimited undo's for text fields

2005-02-28 Thread Wouter
Yeah, but Dar's bug entry is also pointing to some other illogical 
behavior in the way rawkeydown is working even on the Win32 platform.
Though rawkeydown is triggered by any of the modifier keys on Win32, 
you still have to poll for their keydown condition if combined with any 
other key. Which indeed is not very efficient.
It would be nice to have a more uniform behavior across platforms of 
these basic commands

And a polling loop on modifierkeys in rev-talk does sound like an 
unnecessary overload if it can be done more efficiently by the engine 
itself.

Gr,
Wouter
On 28 Feb 2005, at 15:44, Paul wrote:
I think Dar is right in that a message is not sent when a modifier key 
is pressed on the Mac, but one can check to see if a modifier key is 
down.

[EMAIL PROTECTED] wrote:
J. Landman Gay
Sat, 26 Feb 2005 20:06:30 -0800
On 2/26/05 2:07 PM, Dar Scott wrote:

snip
 Can't do it on a Mac. The OS doesn't send any messages for the 
shift key and command key unless they are paired with an 
alpha-numeric keypress. Windows OS does. Rev has no way of knowing 
when the user depresses the shift key alone.


Weird because most games (red faction, jedi knight, unreal, quake, 
etc... ) on the mac succeed in this, why can't rev?

Greetings,
Wouter


They do it by polling, i.e. they sit in a tight loop watching the 
keymap (an internal Mac data structure that has the status of all the 
keys on the keyboard).

FYI, there was a decision made, a long time ago (circa 1983), that the 
Mac event system would not report shift, option, command or control 
key downs to applications.  The only way to determine if those keys 
are down is via polling, which can be done in Revolution by using an 
idle handler...

on idle
if the shiftkey is down then
... do something
end if
end idle
-- Frank

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


Re: unlimited undo's for text fields

2005-02-26 Thread Wouter
Message: 21
Date: Fri, 25 Feb 2005 06:21:52 -0800 (PST)
From: Alejandro Tejada [EMAIL PROTECTED]
Subject: Re: unlimited undo's for text fields
To: use-revolution@lists.runrev.com
Message-ID: [EMAIL PROTECTED]
Content-Type: text/plain; charset=us-ascii
Hi Wouter,
Your unlimited undo code is impressive.
Later, when your time permits,
Could you comment about how this code works?
In Windows, this line calls an error
message:
put word 1 to 7 of the long id of it into tFName
Keep up your good work! :-)
al
Hi Al,
One of the things that caused the error you mentioned is  the not so 
uniform transplatform behaviour of commands like rawkeydown in this 
case.
A little test showed a big difference between mac and win32 platform.
The modifier keys, the shift and capslock keys are not triggering a 
rawkeydown message on the mac-side. But they do on the win32 platform.
If the people at RR could make this behavior more uniform between 
platforms it would enhance crossplatformity
Hopefully they will consider Dar Scott bug 1434 when doing this 
eventually.
(will repost the code when this problem is solved)

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


Re: unlimited undo's for text fields

2005-02-25 Thread Wouter

On 25 Feb 2005, at 05:40, MisterX wrote:
Good job!
I'll definitely test this later!
Does it work also in Script editors?
cheers
Xavier

snip
Hi Xav,
Depends on how you organize your code.
If this has to work on all editable fields, refine the code and insert 
it into the frontscripts.
But I couldn't test it on the other platforms yet. Let me know if it 
works.

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


test

2005-02-24 Thread Wouter
Please disregard this message.
And if you can read this, thank you Heather.
Gr W.
___
use-revolution mailing list
use-revolution@lists.runrev.com
http://lists.runrev.com/mailman/listinfo/use-revolution


unlimited undo's for text fields

2005-02-24 Thread Wouter
Hi All,
For those who like unlimited undo's (or is it ram limited undo's?) an 
undo framework starter for text in fields.
This script can be placed in a stackscript and will act on all 
(editable) fields.
Drag dropping text from one field to the other is supported.
It is functional and tested on OS X. But for the other platforms I 
don't know yet.
Adapt as necessary and beware of the mail wraps!

global gHistory
local lSC,lData
on rawkeydown x
  writeHistory x
  pass rawkeydown
end rawkeydown
on dragstart
  put the selectedchunk into lSC
  pass dragstart
end dragstart
on dragend
  put the dragData[text] into lData
  send checkdragdata to me in 20 millisecs
  pass dragend
end dragend
on checkdragdata
  put the selectedchunk into tSC
  get word -2 to -1 of lSC
  put word 1 to 7 of the long id of it into tFNameOrig
  get word -2 to -1 of tSC
  put word 1 to 7 of the long id of it into tFNameDest
  if tFNameOrig = tFNameDest and not (word 2 of tSC  word 4 of tSC) 
then
  put d,lSC,tSC,hexadize(lData)  cr after gHistory[tFNameDest]
  else if tFNameOrig  tFNameDest then
delete word 3 to 4 of lSC
put x,lSC,hexadize(lData)  cr after gHistory[tFNameOrig]
put v,tSC,hexadize(lData)  cr after gHistory[tFNameDest]
  end if
  put  into lSC
  put  into lData
end checkdragdata

### first item indicates the action
### w = write
### v = paste
### x = cut
### b = backspace
### d = dragplaced
on writeHistory x
  put the selectedchunk into tSC
  get word -2 to -1 of tSC
  put word 1 to 7 of the long id of it into tFName
  if the commandkey is down then
switch x
case 122  ### z
  reverseHistory
  break
case 118  ### v
  put clipboardData[text] into x
  put v,tSC,hexadize(x)  cr after gHistory[tFName]
  break
case 120  ###   x
  put the value of tSC into x
  if x   then
delete word 3 to 4 of tSC
put x,tSC,hexadize(x)  cr after gHistory[tFName]
  end if
  break
end switch
  else
switch x
case 65421 ### enter in field
case 65307 ### escape key
case 65308 ### scrollwheel up and down
case 65309
case 65361 ### arrowkeys
case 65363
case 65362
case 65364
  -- do nothing
  break
case 65288  ### backspace
  if word 4 of tSC  0 then
if word 2 of tSC  word 4 of tSC then
  get the value of tSC
  delete word 3 to 4 of tsC
else if word 2 of tSC  word 4 of tSC then
  delete word 2 to 3 of tSC
  get the value of tsC
end if
put hexadize(it) into x
put b,tSC,x  cr after gHistory[tFName]  ## b = backspace
  end if
  break
case 65293  ### return in field
  delete word 3 to 4 of tSC
  put w,tSC,hexadize(return)  cr after gHistory[tFName]
  break
default
  delete word 3 to 4 of tSC
  put w,tSC,hexadize(numtochar(x))  cr after gHistory[tFName]
  break
end switch
  end if
end writeHistory
on reverseHistory
  put word 1 to 7 of the the focusedobject into tFName
  if gHistory[tFName] =  then
beep
exit reverseHistory
  end if
  get line -1 of gHistory[tFName]
  delete line - 1 of gHistory[tFName]
  switch item 1 of it
  case b
put dehexadize(last item of it) into x
if x = return then put cr into x
else if x = space then put space into x
else if x = tab then put tab into x
else
  replace quote with quote  quote  quote in x
  replace cr with quotecr quote in x
  put quote  x  quote into x
end if
do put   x   before  item 2 of it
break
  case w
do delete  item 2 of it
break
  case v
put dehexadize(last item of it) into x
put the num of chars in x into y
put word 2 of item 2 of it + y - 1 into word 4 of item 2 of it
do  delete   item 2 of it
break
  case x
put dehexadize(last item of it) into x
if x = return then put cr into x
else if x = space then put space into x
else if x = tab then put tab into x
else
  replace quote with quote  quote  quote in x
  replace cr with quotecr quote in x
  put quote  x  quote into x
end if
do  put  x  before   item 2 of it
break
  case d
put dehexadize(last item of it) into x
if last char of x = cr then add 1 to word 4 of item 3 of it
if the num of lines in x  1 then delete last char of x
if x = return then put cr into x
else if x = space then put space into x
else if x = tab then put tab into x
else
  replace quote with quote  quote  quote in x
  replace cr with quotecr quote in x
  put quote  x  quote into x
end if
do delete  item 3 of it
delete word 3 to 4 of item 2 of it
do  put  x  before   item 2 of it
break
  end switch
end reverseHistory
### Big Endian BinaryDecode ###
function hexadize sx
  get binarydecode(H*, sx, x1)
  return x1
end hexadize
### Big Endian Binary Encode ###
function deHexadize sx
  replace space with  in sx
  try
get binaryEncode(H*, sx, x1)
  catch errornum

2.5 RC 1

2004-08-27 Thread Wouter
Hi,
The changes to and speeding up of the docs in the the 2.5RC1 --  
excellent -- !!!
Overall security of password protected stacks  -- much improved -- 

Congrats.
WA
___
use-revolution mailing list
[EMAIL PROTECTED]
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: 2.5 Release Candidate 1 - Player Freeze?

2004-08-27 Thread Wouter
Re: 2.5 Release Candidate 1 - Player Freeze?
From: Ken Ray
 Subject: Re: 2.5 Release Candidate 1 - Player Freeze?
 Date: Fri, 27 Aug 2004 17:39:33 -0700
On 8/27/04 7:26 PM, Wouter [EMAIL PROTECTED] wrote:
 True the player hangs when inside the Rev folder.
 If one drags a stack on the app icon after the clock cursor has 
changed
 to pointer it will open in the player though the home stack won't 
hide.
 But the player works like a charm when outside the rev folder and
 started with a stack.

This just shouldn't be... how many people are going to see another app 
in
the Rev folder and 2x-click it to see what it does? Answer: Lots. And 
they
shouldn't be greeted with a hanging application. It should at least say
something like Move this out of the Rev folder before launching, 
although
for the life of me I can't understand why it doesn't work in the Rev 
folder
but does outside of it.
Correct.
But Rev  is not really *hanging*.
You still can drag stacks on the player icon and they will be loaded.
Only minor change in script will resolve this in the final candidate I 
am sure.
That's why they should still accept bugzilla reports or read the list 
thoroughly.

Ken Ray
Sons of Thunder Software
Web site: http://www.sonsothunder.com/
Email: [EMAIL PROTECTED]
WA
___
use-revolution mailing list
[EMAIL PROTECTED]
http://lists.runrev.com/mailman/listinfo/use-revolution


  1   2   3   >