Re: Plain text or Unicodetext?

2005-10-31 Thread ron barber

Hi Marcus,

Thanks for the suggestion. Kenji Kojima also replied to me privately 
with the same idea.


It seems to be an effective way of checking, even if it involves an 
extra step of putting the text into a fld first.


Thanks
Ron

On Oct 30, 2005, at 11:28 PM, Marcus van Houdt wrote:


Hello,

At present there is no way to directly check the encoding of the text 
entered in a field, however, you can detect it indirectly by checking 
the htmlText property of the field.
If plain text is entered there will be no lang attribute present in 
the font tag, however, if there is any unicode present in the field 
there will be a lang attribute for the font tag present.
You can try this out easily by typing a line of plain text in a field 
and then typing a line of unicode text before doing put the htmlText 
of field name you gave field in the message box, you will notice 
there is only a lang tag present for the unicode text.


If you wish to determine whether text returned from a dialog is 
unicode or plain text, you will need to check the htmlText property of 
the field used in the dialog box to enter the text.



Regards,


Marcus



Hi,

Is there a way to determine if the text returned from a dialog is 
ascii text or unicodedtext? I tried working with the chartonum, 
useunicode and baseconvert functions to no avail.


I tried converting and comparing uniencoded versions with the 
original text and no go. I have tried what I know so I turn to the 
list.


Thanks
Ron

___
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


Ask/answer dialog question

2005-10-31 Thread ron barber

Hi,

The docs say that styled text is a possibility in ask and answer 
dialogs. I have tried


ask the htmltext of field myfield with myFile

but it shows the html encodings rather than the formatted text. I get 
the same thing with ask file and the answer dialogs. Is there a way to 
get styled text in the ask/answer wd without making my own windows?


Thanks
Ron

___
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: Ask/answer dialog question

2005-10-31 Thread Eric Chatonet

Hi Rob,

Answer dialogs support styled text (html) but ask dialogs do not.
You might be interested in 2 tutorials:  How to Display and Manage  
Ask Dialogs and How to Display and Manage Answer Dialogs both  
available from Tutorials Picker.
Tutorials Picker is available from my website (Revolution  Plugins)  
or Rev Online (user: So Smart Software)


Best Regards from Paris,
Eric Chatonet.

Le 31 oct. 05 à 11:48, ron barber a écrit :


Hi,

The docs say that styled text is a possibility in ask and answer  
dialogs. I have tried


ask the htmltext of field myfield with myFile

but it shows the html encodings rather than the formatted text. I  
get the same thing with ask file and the answer dialogs. Is there a  
way to get styled text in the ask/answer wd without making my own  
windows?


Thanks
Ron



So Smart Software

For institutions, companies and associations
Built-to-order applications: management, multimedia, internet, etc.
Windows, Mac OS and Linux... With the French touch

Free plugins and tutorials on my website

Web sitehttp://www.sosmartsoftware.com/
Email[EMAIL PROTECTED]/
Phone33 (0)1 43 31 77 62
Mobile33 (0)6 20 74 50 86


___
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: Ask/answer dialog question -docs

2005-10-31 Thread ron barber

Hi Eric,

Thanks for the response, I'll look at your tutorials but the docs for 
the ask dialog state:


The ability to provide formatted text for the prompt was introduced in 
version 2.0.


so I was looking for the way to use that.

Thanks
Ron


On Oct 31, 2005, at 7:54 PM, Eric Chatonet wrote:


Hi Rob,

Answer dialogs support styled text (html) but ask dialogs do not.
You might be interested in 2 tutorials:  How to Display and Manage 
Ask Dialogs and How to Display and Manage Answer Dialogs both 
available from Tutorials Picker.
Tutorials Picker is available from my website (Revolution  Plugins) 
or Rev Online (user: So Smart Software)


Best Regards from Paris,
Eric Chatonet.

Le 31 oct. 05 à 11:48, ron barber a écrit :


Hi,

The docs say that styled text is a possibility in ask and answer 
dialogs. I have tried


ask the htmltext of field myfield with myFile

but it shows the html encodings rather than the formatted text. I get 
the same thing with ask file and the answer dialogs. Is there a way 
to get styled text in the ask/answer wd without making my own 
windows?


Thanks
Ron



So Smart Software

For institutions, companies and associations
Built-to-order applications: management, multimedia, internet, etc.
Windows, Mac OS and Linux... With the French touch

Free plugins and tutorials on my website

Web sitehttp://www.sosmartsoftware.com/
Email[EMAIL PROTECTED]/
Phone33 (0)1 43 31 77 62
Mobile33 (0)6 20 74 50 86


___
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: Ask/answer dialog question -docs

2005-10-31 Thread Eric Chatonet

Hi Ron,

You are right.
But it's an error in the docs:
Probably, a quick copy/paste from the answer entry ;-)

Le 31 oct. 05 à 11:58, ron barber a écrit :


Hi Eric,

Thanks for the response, I'll look at your tutorials but the docs  
for the ask dialog state:


The ability to provide formatted text for the prompt was  
introduced in version 2.0.


so I was looking for the way to use that.

Thanks
Ron


On Oct 31, 2005, at 7:54 PM, Eric Chatonet wrote:



Hi Rob,

Answer dialogs support styled text (html) but ask dialogs do not.
You might be interested in 2 tutorials:  How to Display and  
Manage Ask Dialogs and How to Display and Manage Answer Dialogs  
both available from Tutorials Picker.
Tutorials Picker is available from my website (Revolution   
Plugins) or Rev Online (user: So Smart Software)


Best Regards from Paris,
Eric Chatonet.

Le 31 oct. 05 à 11:48, ron barber a écrit :



Hi,

The docs say that styled text is a possibility in ask and answer  
dialogs. I have tried


ask the htmltext of field myfield with myFile

but it shows the html encodings rather than the formatted text. I  
get the same thing with ask file and the answer dialogs. Is there  
a way to get styled text in the ask/answer wd without making my  
own windows?


Thanks
Ron




So Smart Software

For institutions, companies and associations
Built-to-order applications: management, multimedia, internet, etc.
Windows, Mac OS and Linux... With the French touch

Free plugins and tutorials on my website

Web sitehttp://www.sosmartsoftware.com/
Email[EMAIL PROTECTED]/
Phone33 (0)1 43 31 77 62
Mobile33 (0)6 20 74 50 86


___
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


Regex to remove all tags from a web page

2005-10-31 Thread Eric Chatonet

Hi all,

I searched the list archive and the net for a regex that would allow  
to retrieve the meaningful text from any web page, stripping all html  
tags, extra code, etc. but I did not find something really  
convincing :-(

Any help would be much appreciated :-)

PS. I don't want to use set the htmlText/get text using a field:  
this way crashes Rev unpredictably when doing batch processing.


Best Regards from Paris,

Eric Chatonet.

So Smart Software

For institutions, companies and associations
Built-to-order applications: management, multimedia, internet, etc.
Windows, Mac OS and Linux... With the French touch

Free plugins and tutorials on my website

Web sitehttp://www.sosmartsoftware.com/
Email[EMAIL PROTECTED]/
Phone33 (0)1 43 31 77 62
Mobile33 (0)6 20 74 50 86


___
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: Regex to remove all tags from a web page

2005-10-31 Thread Alex Tweedly

Eric Chatonet wrote:


Hi all,

I searched the list archive and the net for a regex that would allow  
to retrieve the meaningful text from any web page, stripping all html  
tags, extra code, etc. but I did not find something really  convincing 
:-(

Any help would be much appreciated :-)

PS. I don't want to use set the htmlText/get text using a field:  
this way crashes Rev unpredictably when doing batch processing.



I suspect this will be not really convincing :-)

Just removing tags should be


put  [^]* into tRex
   
put replacetext(fld in, tRex, ) into fld out


That assumes the html has no  or  , and is generally well-formed.

That seems too simple - so it can't be convincing :-)


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



--
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.1.361 / Virus Database: 267.12.6/151 - Release Date: 28/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


Re: Regex to remove all tags from a web page

2005-10-31 Thread Eric Chatonet

Hi Alex,

Thanks a lot.
That's a first good step since the out text is about 20/30% of the in  
text :-)
HTML tags are stripped but extra code (php,java, etc.) of course  
remains.

Any ideas for these ones?

Le 31 oct. 05 à 13:00, Alex Tweedly a écrit :


Eric Chatonet wrote:



Hi all,

I searched the list archive and the net for a regex that would  
allow  to retrieve the meaningful text from any web page,  
stripping all html  tags, extra code, etc. but I did not find  
something really  convincing :-(

Any help would be much appreciated :-)

PS. I don't want to use set the htmlText/get text using a  
field:  this way crashes Rev unpredictably when doing batch  
processing.




I suspect this will be not really convincing :-)

Just removing tags should be


put  [^]* into tRex
put replacetext(fld in, tRex, ) into fld out


That assumes the html has no  or  , and is generally well- 
formed.

That seems too simple - so it can't be convincing :-)

Alex Tweedly   http://www.tweedly.net


Best Regards from Paris,

Eric Chatonet.

So Smart Software

For institutions, companies and associations
Built-to-order applications: management, multimedia, internet, etc.
Windows, Mac OS and Linux... With the French touch

Free plugins and tutorials on my website

Web sitehttp://www.sosmartsoftware.com/
Email[EMAIL PROTECTED]/
Phone33 (0)1 43 31 77 62
Mobile33 (0)6 20 74 50 86


___
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: Regex to remove all tags from a web page

2005-10-31 Thread Alex Tweedly

Eric Chatonet wrote:


Hi Alex,

Thanks a lot.
That's a first good step since the out text is about 20/30% of the in  
text :-)
HTML tags are stripped but extra code (php,java, etc.) of course  
remains.

Any ideas for these ones?


In the samples I tried, it strips out php code  - it's all enclosed in 
?php ..
That may be just the naive way I did the PHP, I only tried against my 
own code.


Can you send an example of what it doesn't do ?
(send it direct to me off-list if that's preferable)


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



--
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.1.361 / Virus Database: 267.12.6/151 - Release Date: 28/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


Re: Regex to remove all tags from a web page

2005-10-31 Thread xavier . bury
Hi Alex

Since i've had crashes with regex with big files, and since it can't 
handle line breaks which
happen only too often within html code, i used offsets(). 

When i wrote the discreteBrowser, it was the ONLY reliable method to get 
the html tidy or
out... 

put 0 into a
repeat
  put offset(, txt, a) into a
  if a  1 then exit repeat
  put offset(,txt,a+1) into b
  delete char a to b of txt
end repeat

or something like that. It's quick and infallible... 

cheers
Xavier
http://monsieurx.com/taoo


[EMAIL PROTECTED] wrote on 31/10/2005 12:19:43:

 Hi all,
 
 I searched the list archive and the net for a regex that would allow 
 to retrieve the meaningful text from any web page, stripping all html 
 tags, extra code, etc. but I did not find something really 
 convincing :-(
 Any help would be much appreciated :-)
 
 PS. I don't want to use set the htmlText/get text using a field: 
 this way crashes Rev unpredictably when doing batch processing.
 
 Best Regards from Paris,
 
 Eric Chatonet.
 
 So Smart Software
 
 For institutions, companies and associations
 Built-to-order applications: management, multimedia, internet, etc.
 Windows, Mac OS and Linux... With the French touch
 
 Free plugins and tutorials on my website
 
 Web sitehttp://www.sosmartsoftware.com/
 Email[EMAIL PROTECTED]/
 Phone33 (0)1 43 31 77 62
 Mobile33 (0)6 20 74 50 86
 
 
 ___
 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



-
To make communications with Clearstream easier, Clearstream has
recently changed the email address format to conform with industry
standards. The new format is '[EMAIL PROTECTED]'.

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

IMPORTANT MESSAGE

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

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

END OF DISCLAIMER
___
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


Window Default Size

2005-10-31 Thread AbilityForms
Hi Everyone,

How do I change the default size of the inspector, error  script windows? 
I'm on Mac OSX.

Joe
Orlando, Florida
___
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: Regex to remove all tags from a web page

2005-10-31 Thread Alex Tweedly

[EMAIL PROTECTED] wrote:


Hi Alex

Since i've had crashes with regex with big files, and since it can't 
handle line breaks which
happen only too often within html code, i used offsets(). 

 

I haven't seen any crashes with Regex - but of course that doesn't mean 
they can't happen :-)


But the regex I sent certainly does work with line breaks.

When i wrote the discreteBrowser, it was the ONLY reliable method to get 
the html tidy or
out... 


put 0 into a
repeat
 put offset(, txt, a) into a
 if a  1 then exit repeat
 put offset(,txt,a+1) into b
 delete char a to b of txt
end repeat

or something like that. It's quick and infallible... 

 

Actually, it's not infallible. It would fail on Eric's code for the same 
reason my first try did. He has javascript code which can contain  or 
, so the regex exits half-way through the comment that contains the 
javascript source code.


Easy to fix in your offset scheme (and probably easy to fix in regex as 
well, but I don't know how to do it yet).

Time to read some more about regex ...


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



--
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.1.361 / Virus Database: 267.12.6/151 - Release Date: 28/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


Re: Regex to remove all tags from a web page

2005-10-31 Thread xavier . bury
Alex


The trick i used in my discrete browser was to treat scripts and 
styles first.

String anything between those two tags and you're a lot safer. Eventually 
if you need those back, keep them out of the tag stripping operation and 
put them back after.

Then deal with the html structure...

cheers
Xavier


[EMAIL PROTECTED] wrote on 31/10/2005 15:33:44:

 [EMAIL PROTECTED] wrote:
 
 Hi Alex
 
 Since i've had crashes with regex with big files, and since it can't 
 handle line breaks which
 happen only too often within html code, i used offsets(). 
 
  
 
 I haven't seen any crashes with Regex - but of course that doesn't mean 
 they can't happen :-)
 
 But the regex I sent certainly does work with line breaks.
 
 When i wrote the discreteBrowser, it was the ONLY reliable method to 
get 
 the html tidy or
 out... 
 
 put 0 into a
 repeat
   put offset(, txt, a) into a
   if a  1 then exit repeat
   put offset(,txt,a+1) into b
   delete char a to b of txt
 end repeat
 
 or something like that. It's quick and infallible... 
 
  
 
 Actually, it's not infallible. It would fail on Eric's code for the same 

 reason my first try did. He has javascript code which can contain  or 

 , so the regex exits half-way through the comment that contains the 

 javascript source code.
 
 Easy to fix in your offset scheme (and probably easy to fix in regex as 
 well, but I don't know how to do it yet).
 Time to read some more about regex ...
 
 
 -- 
 Alex Tweedly   http://www.tweedly.net
 
 
 
 -- 
 No virus found in this outgoing message.
 Checked by AVG Free Edition.
 Version: 7.1.361 / Virus Database: 267.12.6/151 - Release Date: 
28/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



-
To make communications with Clearstream easier, Clearstream has
recently changed the email address format to conform with industry
standards. The new format is '[EMAIL PROTECTED]'.

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

IMPORTANT MESSAGE

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

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

END OF DISCLAIMER
___
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


Strang cursor behaviour after a drag event...

2005-10-31 Thread Jan Sælid
Hi

I have two fields. In the first one I have placed an empty On dragEnd event 
because I don't want the user to change the field only drag.

In the second one I have an Acceptdrop event together with an On dragDrop 
event because I want to check the dragdata before I place it in the field.

Something like this:

In script of Field 1:

On dragEnd
-- nothing in here
end dragEnd

In script of field 2:

on dragEnter
   set the acceptDrop to true
end dragEnter

on dragDrop
   --- check the dragdata
   --- place it in the field if it is allowed
end dragDrop


Now here is the strange behaviour:

After the text is dragged and placed into the second field. The cursor behaves 
in a reversed order. When entering a field the cursor becomes an arrow. 
When entering a button the cursor becomes an iBeam. The opposite of normal 
behaviour I would say. This happens only in the event of dragging from field 1 
to field 2.
I have tried to create two new fields with no script in them. And dragging 
between these two do not make the same strange behaviour.

Have my computer got a fever? what is happening?


J.S
___
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: Strang cursor behaviour after a drag event...

2005-10-31 Thread Eric Chatonet

Hi Jan,

This happens sometimes in the IDE.
Try to add a handler like the following into an appropriate object  
(field, card, etc. depending if you lock the cursor by yourself  
elsewhere):


on mouseMove
  unlock cursor
end mouseMove

Hope this helps.
Best Regards from Paris,

Eric Chatonet.

Le 31 oct. 05 à 18:28, Jan Sælid a écrit :


Hi

I have two fields. In the first one I have placed an empty On  
dragEnd event because I don't want the user to change the field  
only drag.


In the second one I have an Acceptdrop event together with an On  
dragDrop event because I want to check the dragdata before I place  
it in the field.


Something like this:

In script of Field 1:

On dragEnd
-- nothing in here
end dragEnd

In script of field 2:

on dragEnter
   set the acceptDrop to true
end dragEnter

on dragDrop
   --- check the dragdata
   --- place it in the field if it is allowed
end dragDrop


Now here is the strange behaviour:

After the text is dragged and placed into the second field. The  
cursor behaves in a reversed order. When entering a field the  
cursor becomes an arrow.
When entering a button the cursor becomes an iBeam. The opposite of  
normal behaviour I would say. This happens only in the event of  
dragging from field 1 to field 2.
I have tried to create two new fields with no script in them. And  
dragging between these two do not make the same strange behaviour.


Have my computer got a fever? what is happening?



So Smart Software

For institutions, companies and associations
Built-to-order applications: management, multimedia, internet, etc.
Windows, Mac OS and Linux... With the French touch

Free plugins and tutorials on my website

Web sitehttp://www.sosmartsoftware.com/
Email[EMAIL PROTECTED]/
Phone33 (0)1 43 31 77 62
Mobile33 (0)6 20 74 50 86


___
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: Strang cursor behaviour after a drag event...

2005-10-31 Thread Jan Sælid

Great

Thanks Eric

Problem solved.

- Original Message - 
From: Eric Chatonet [EMAIL PROTECTED]

To: How to use Revolution use-revolution@lists.runrev.com
Sent: Monday, October 31, 2005 6:36 PM
Subject: Re: Strang cursor behaviour after a drag event...


Hi Jan,

This happens sometimes in the IDE.
Try to add a handler like the following into an appropriate object
(field, card, etc. depending if you lock the cursor by yourself
elsewhere):

on mouseMove
  unlock cursor
end mouseMove

Hope this helps.
Best Regards from Paris,

Eric Chatonet.

Le 31 oct. 05 à 18:28, Jan Sælid a écrit :


Hi

I have two fields. In the first one I have placed an empty On  dragEnd 
event because I don't want the user to change the field  only drag.


In the second one I have an Acceptdrop event together with an On 
dragDrop event because I want to check the dragdata before I place  it in 
the field.


Something like this:

In script of Field 1:

On dragEnd
-- nothing in here
end dragEnd

In script of field 2:

on dragEnter
   set the acceptDrop to true
end dragEnter

on dragDrop
   --- check the dragdata
   --- place it in the field if it is allowed
end dragDrop


Now here is the strange behaviour:

After the text is dragged and placed into the second field. The  cursor 
behaves in a reversed order. When entering a field the  cursor becomes an 
arrow.
When entering a button the cursor becomes an iBeam. The opposite of 
normal behaviour I would say. This happens only in the event of  dragging 
from field 1 to field 2.
I have tried to create two new fields with no script in them. And 
dragging between these two do not make the same strange behaviour.


Have my computer got a fever? what is happening?



So Smart Software

For institutions, companies and associations
Built-to-order applications: management, multimedia, internet, etc.
Windows, Mac OS and Linux... With the French touch

Free plugins and tutorials on my website

Web sitehttp://www.sosmartsoftware.com/
Email[EMAIL PROTECTED]/
Phone33 (0)1 43 31 77 62
Mobile33 (0)6 20 74 50 86


___
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: ANN: new free altPlugin: altMenuStack

2005-10-31 Thread Kevin Miller
On 29/10/05 3:04 am, J. Landman Gay [EMAIL PROTECTED] wrote:

 Yes, it's a fact you can't debug stacks with 'rev' in the name prefix
 anymore using the Rev IDE.
 
 I just made a stack called revtest.rev with a test handler in the card
 script. I could set a breakpoint and the debugger caught it. I could
 step through the code. Maybe the problem is fixed?

You have to put true into gREVDevelopment to enable the development
environment debugging features.  This only works in 2.6.1.  We do not
support this mode, so use at your own risk.

Kind regards,

Kevin

Kevin Miller ~ [EMAIL PROTECTED] ~ http://www.runrev.com/
Runtime Revolution - User-Centric Development Tools

___
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: new free altPlugin: altMenuStack

2005-10-31 Thread MisterX
Kevin,

Welcome back to the resourceful people's monstrous mailist you created!

We miss you and your invaluable tips! More Rev insights we need! ;)

cheers
Xavier

 -Original Message-
 From: [EMAIL PROTECTED] 
 [mailto:[EMAIL PROTECTED] On Behalf Of 
 Kevin Miller
 Sent: Monday, October 31, 2005 6:51 PM
 To: How to use Revolution
 Subject: Re: ANN: new free altPlugin: altMenuStack
 
 On 29/10/05 3:04 am, J. Landman Gay 
 [EMAIL PROTECTED] wrote:
 
  Yes, it's a fact you can't debug stacks with 'rev' in the 
 name prefix 
  anymore using the Rev IDE.
  
  I just made a stack called revtest.rev with a test handler in the 
  card script. I could set a breakpoint and the debugger caught it. I 
  could step through the code. Maybe the problem is fixed?
 
 You have to put true into gREVDevelopment to enable the 
 development environment debugging features.  This only works 
 in 2.6.1.  We do not support this mode, so use at your own risk.
 
 Kind regards,
 
 Kevin
 
 Kevin Miller ~ [EMAIL PROTECTED] ~ http://www.runrev.com/ 
 Runtime Revolution - User-Centric Development Tools
 
 ___
 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: ANN: new free altPlugin: altMenuStack

2005-10-31 Thread Eric Chatonet

Hi Kevin,

All of us who develop plugins and utilities for the Rev IDE will gain  
much time with this new feature.

You did it since you needed it. We needed it too :-)
Thanks.

Best Regards from Paris,

Eric Chatonet.

Le 31 oct. 05 à 18:51, Kevin Miller a écrit :

On 29/10/05 3:04 am, J. Landman Gay [EMAIL PROTECTED]  
wrote:



Yes, it's a fact you can't debug stacks with 'rev' in the name  
prefix

anymore using the Rev IDE.



I just made a stack called revtest.rev with a test handler in  
the card

script. I could set a breakpoint and the debugger caught it. I could
step through the code. Maybe the problem is fixed?



You have to put true into gREVDevelopment to enable the development
environment debugging features.  This only works in 2.6.1.  We do not
support this mode, so use at your own risk.

Kind regards,

Kevin

Kevin Miller ~ [EMAIL PROTECTED] ~ http://www.runrev.com/
Runtime Revolution - User-Centric Development Tools



So Smart Software

For institutions, companies and associations
Built-to-order applications: management, multimedia, internet, etc.
Windows, Mac OS and Linux... With the French touch

Free plugins and tutorials on my website

Web sitehttp://www.sosmartsoftware.com/
Email[EMAIL PROTECTED]/
Phone33 (0)1 43 31 77 62
Mobile33 (0)6 20 74 50 86


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


Re: ANN: Simple Pendulum Simulation

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


Cheers, Roger


On Oct 31, 2005, at 2:32 AM, [EMAIL PROTECTED]  
wrote:



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

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


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

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

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

Jim


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


Problem with editable field -

2005-10-31 Thread William de Smet

Thanks for the advice Troy,

I've made a new data stack and linked it to the mainstack.
After creating the standalone application it still works and that's  
what I needed.
However now I've got two visible files under Windows: one .exe file  
and one .rev file.

Mac OSX just shows one file.

Chipp embeds his library substacks but he problably doesn't need to  
update and save, like I do.
After reading the suggestions I believe there is no way to put it all  
in one file, is there?
How can I make the distribution under WIndows more friendly. Do I  
need to make or use an installer?

Until now I distributed a single .exe file.

Any suggestions?

William de Smet



___
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


Scripting conference stack uploaded - debugging

2005-10-31 Thread J. Landman Gay
The scripting conference stack on Debugging is now available for 
download at:


http://support.runrev.com/scriptingconferences/

Due to a scheduling conflict, we did not have a chat for this session, 
so the stack is final as uploaded (that is, no log will be added.) This 
is a wonderfully presented overview of the debugger by Jerry Daniels. If 
you have ever heard Jerry present in public you will recognize his 
humorous style immediately. If you have never heard him in person, you 
are in for a treat. Who would imagine that a definition of the trace 
command could be so amusing? If you've been afraid to investigate the 
debugger so far, download and fear no more.


--
Jacqueline Landman Gay | [EMAIL PROTECTED]
HyperActive Software   | http://www.hyperactivesw.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


Re: Problem with editable field -

2005-10-31 Thread Chipp Walters



William de Smet wrote:

Chipp embeds his library substacks but he problably doesn't need to  
update and save, like I do.


I save data either in binary files (stacks) or xml/text files. I 
typically let the user choose where to save the file in the typical 
document/application framework.


After reading the suggestions I believe there is no way to put it all  
in one file, is there?


If you use a splashscreen stack (search this list for splashscreen), you 
can have your mainstack downloaded from the web and editable-- though I 
don't recommend ever saving data with interface.


How can I make the distribution under WIndows more friendly. Do I  need 
to make or use an installer?


Check out Monte's InstallGadget at www.sweattechnologies.com

It's super simple.

___
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 editable field -

2005-10-31 Thread Troy Rollins


On Oct 31, 2005, at 4:52 PM, William de Smet wrote:

Chipp embeds his library substacks but he problably doesn't need to 
update and save, like I do.
After reading the suggestions I believe there is no way to put it all 
in one file, is there?
How can I make the distribution under WIndows more friendly. Do I need 
to make or use an installer?

Until now I distributed a single .exe file.


Hi,

No, there really is no way to have a single file, which is an 
executable, and still save the data. You'll need to save it somewhere. 
Often, this can be stored in a preferences file in one of the special 
folders.


Chipp's suggestion's are also good ones. In my own projects, I usually 
have a resource folder alongside my executable, and place any required 
data stacks within it. If it is something where they might want to 
share files, then using standard get file dialogs are useful to 
determine where the user might want to save things.


Finally, if distribution simplicity is the key, consider this... simply 
have a template substack that is contained within your main stack. When 
the main stack is run, check for the existence of your data stack, if 
it doesn't yet exist, have your executable create it from the template. 
This lets you have the single file distribution, but a savable data 
stack after the user runs the app.



--
Troy
RPSystems, Ltd.
http://www.rpsystems.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


counting runs

2005-10-31 Thread Jason Tangen

Hello,

I'm trying to solve a seemingly simple problem and I could use some  
help. A coin flip will come out Heads or Tails and will produce,  
for example, the following series for 20 flips:


T,T,H,T,T,H,H,H,T,T,H,T,H,H,H,T,H,T,H,T

I need to count up the number events for a particular run.  For example,

Heads x 3 = 2
Heads x 2 = 0
Heads x 1 = 4
Tails x 1 = 4
Tails x 2 = 3
Tails x 3 = 0

I need to account for runs up to 60 (rather than 3 above) for  
hundreds of flips (rather than 20 above).


I've been using a very clumsy multiple if-then solution to date, but  
this quickly becomes difficult with many runs.


Can someone point me in the right direction?

Cheers,
Jason
___
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: counting runs

2005-10-31 Thread Alex Tweedly

Jason Tangen wrote:


Hello,

I'm trying to solve a seemingly simple problem and I could use some  
help. A coin flip will come out Heads or Tails and will produce,  
for example, the following series for 20 flips:


T,T,H,T,T,H,H,H,T,T,H,T,H,H,H,T,H,T,H,T

I need to count up the number events for a particular run.  For example,

Heads x 3 = 2
Heads x 2 = 0
Heads x 1 = 4
Tails x 1 = 4
Tails x 2 = 3
Tails x 3 = 0

I need to account for runs up to 60 (rather than 3 above) for  
hundreds of flips (rather than 20 above).


I've been using a very clumsy multiple if-then solution to date, but  
this quickly becomes difficult with many runs.


Can someone point me in the right direction?



something like


local myVar, MyData, MyArray, I, tRunLen, tRunType
   
put fld Field into MyData

put 0 into tRunLen
put  into tRunType

repeat for each item I in myData

if I  tRunType then
if tRunType   then
add 1 to MyArray[tRunType, tRunLen]
end if
put I into tRunType
put 1 into tRunLen
else
add 1 to tRunLen
end if
end repeat
if tRunLen  0 then
add 1 to MyArray[tRunType, tRunLen]
end if

put the keys of MyArray into temp

sort temp
put temp into msg



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



--
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.1.361 / Virus Database: 267.12.6/151 - Release Date: 28/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


Date conversions in summer time

2005-10-31 Thread Monte Goulding

Hi

Just wondering if anyone else has seen date conversions adding an extra hour 
each time you convert?


Cheers

--

Monte Goulding  BCompSci
Sweat Technologies  BAppSci (Hons)

InstallGadget - How to create an installer in 10 seconds
Download now from: http://www.sweattechnologies.com/InstallGadget 


___
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: Regex to remove all tags from a web page

2005-10-31 Thread Jim Ault
Eric Chatonet wrote:

 I searched the list archive and the net for a regex that would allow
 to retrieve the meaningful text from any web page, stripping all html
 tags, extra code, etc. but I did not find something really  convincing
 :-(
 Any help would be much appreciated :-)

I have cast a few 'data mining' scripts with regex, but tailor them for more
than just removing tags.  Are you also trying to format strings (text,
paragraphs) or data (tables, labeled values)?

Specifics are important.  One example is that a page of accounting data that
has been working great for 3.5 months, now has a glitch since the authors
changed the web page format.

tip: Check to see if /HTML is in the text, which means that the download
was complete, whenever it occurred.
top: Convert all returns to  so that now there is only one line
between ^ and $ (since returns mean nothing in html, why deal with empties
and multiple empties?)

One step you should try to incorporate is a 'back check'... does the result
have enough/too many characters, does it contain  or , are key words
present/absent.

tip: Replacing some tags with a tab char means that you can copy/paste the
block into a spreadsheet and see where the columns are and excess to be
trimmed.

Send a page or two my way and I will see if something I have conjured will
work for you.  I'll just toss it in my caldron and see what bubbles to the
top. /Halloween ref

Jim Ault
Las Vegas




___
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


Valentina Office Server 2.1 Announced

2005-10-31 Thread Lynn Fredricks
Valentina Office Server 2.1 Announced

NEW BUSINESS READY DATABASE SERVER GAINS PHP WEB SCRIPTING, INDUSTRY
STANDARD INTERFACES

October 31, 2005. Beaverton, Oregon.  Paradigma Software, Inc announces
Valentina 2.1 Office Server, a major update to the company's fast and robust
database server.

Valentina 2.1 Office Server will add a special client module for interfacing
with the PHP scripting language. This Valentina PHP client module includes
the following features:

PHP 4+ Scripting Support. Valentina 2.1 will have a PHP interface that is
closely modeled after industry standard PHP APIs, allowing users of other
database servers to rapidly port their PHP applications as easily as doing a
find/replace with a VAL_ prefix. This will allow easy porting from mySQL
AB's mySQL.

PEAR API Support. Inclusion of a PEAR compatible class. PEAR is a structured
code library, set of packaging standards and extension module broadly
accepted for interfacing PHP and databases.

AdoDB Support. A data abstraction layer used by database solution providers
to interface with a broad range of enterprise class database servers and
technologies.

Valentina 2.1 Office Server incorporates the incredibly fast and robust
Valentina 2 database engine. Other features include fast abstraction links,
Unicode UTF-16 native format, Valentina XML import/export data and schema,
SQL '92, simultaneous data exchange with read-only media, record level locks
and 448 bit encryption.

Office Server includes developer client modules for accessing server data
from applications made with popular development tools on Windows and
Macintosh, including Runtime Revolution's Revolution rapid application
development tool. Runtime Revolution provides a fast and productive
environment to build front ends for Valentina Office Server based solutions.

Each copy of Valentina 2 Office Server includes a copy of Valentina Studio
Admin Edition, the database management tool.

Valentina 2 Office Server pricing begins at $299 (with substantial discounts
to Valentina Developer Network members) and is available on Windows and
MacOS X.

For more information, visit  the Paradigma Software at
http://www.paradigmasoft.com or its authorized European distributors.

About Paradigma Software, Inc

Founded in 1998, Beaverton, Oregon-based Paradigma Software, Inc is the
leading provider of incredibly fast and robust database solutions for
business and development. Valentina 2 technology powers solutions as diverse
as graphics applications from major Japanese electronics companies to
solutions supporting US public schools. Paradigma Software solutions are
available for every major development environment on the Windows and
Macintosh platforms.

For additional information, visit the Paradigma Software website at
http://www.paradigmasoft.com.

Contact

Paradigma Software
Ph. (503) 574-2776
http://www.paradigmasoft.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


Re: ANN: Simple Pendulum Simulation

2005-10-31 Thread Jim Hurley


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


Cheers, Roger




Roger,

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


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


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

where psi is the angular displacement of the pendulum.

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


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

and go to the last card.

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


Polar coordinates are particularly  useful in the pendulum problem

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


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


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

where A is the angular amplitude in radians.

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


Re: Valentina Office Server 2.1 Announced

2005-10-31 Thread Chipp Walters

Congratulations on the new announced product! It looks like a winner. :-)

-Chipp

Lynn Fredricks wrote:

Valentina Office Server 2.1 Announced

NEW BUSINESS READY DATABASE SERVER GAINS PHP WEB SCRIPTING, INDUSTRY
STANDARD INTERFACES

October 31, 2005. Beaverton, Oregon.  Paradigma Software, Inc announces
Valentina 2.1 Office Server, a major update to the company's fast and robust
database server.

Valentina 2.1 Office Server will add a special client module for interfacing
with the PHP scripting language. This Valentina PHP client module includes
the following features:

PHP 4+ Scripting Support. Valentina 2.1 will have a PHP interface that is
closely modeled after industry standard PHP APIs, allowing users of other
database servers to rapidly port their PHP applications as easily as doing a
find/replace with a VAL_ prefix. This will allow easy porting from mySQL
AB's mySQL.

PEAR API Support. Inclusion of a PEAR compatible class. PEAR is a structured
code library, set of packaging standards and extension module broadly
accepted for interfacing PHP and databases.

AdoDB Support. A data abstraction layer used by database solution providers
to interface with a broad range of enterprise class database servers and
technologies.

Valentina 2.1 Office Server incorporates the incredibly fast and robust
Valentina 2 database engine. Other features include fast abstraction links,
Unicode UTF-16 native format, Valentina XML import/export data and schema,
SQL '92, simultaneous data exchange with read-only media, record level locks
and 448 bit encryption.

Office Server includes developer client modules for accessing server data
from applications made with popular development tools on Windows and
Macintosh, including Runtime Revolution's Revolution rapid application
development tool. Runtime Revolution provides a fast and productive
environment to build front ends for Valentina Office Server based solutions.

Each copy of Valentina 2 Office Server includes a copy of Valentina Studio
Admin Edition, the database management tool.

Valentina 2 Office Server pricing begins at $299 (with substantial discounts
to Valentina Developer Network members) and is available on Windows and
MacOS X.

For more information, visit  the Paradigma Software at
http://www.paradigmasoft.com or its authorized European distributors.

About Paradigma Software, Inc

Founded in 1998, Beaverton, Oregon-based Paradigma Software, Inc is the
leading provider of incredibly fast and robust database solutions for
business and development. Valentina 2 technology powers solutions as diverse
as graphics applications from major Japanese electronics companies to
solutions supporting US public schools. Paradigma Software solutions are
available for every major development environment on the Windows and
Macintosh platforms.

For additional information, visit the Paradigma Software website at
http://www.paradigmasoft.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


Re: counting runs

2005-10-31 Thread N Cueto
Hi,

Below is my suggestion. It allows the
number of flips and coin sides to be
varied, and can tally events of un-
limited length.

Cheers,
Nicolas Cueto


on mouseUp
  
  -- PREP THE VARIABLES
  put 100 into tNumberOfFlips
  put HT into tCoin
  put the number of characters in tCoin into tRandSeed
  put empty into tThePreviousToss
  put empty into tTheRun
  put empty into tTheSeries
  
  -- START FLIPPING THE COIN
  repeat with i = 1 to tNumberOfFlips
put char (random(tRandSeed)) of tCoin into tTheCurrentToss
if tTheCurrentToss  tThePreviousToss then 
  -- THE RUN IS BROKEN
  put tTheRun  cr after tTheSeries
  put tTheCurrentToss into tTheRun
else 
  -- THE RUN CONTINUES
  put tTheCurrentToss after tTheRun
end if
put tTheCurrentToss into tThePreviousToss
  end repeat
  delete the last char of tTheSeries
  sort lines of tTheSeries
  delete line 1 of tTheSeries
  
  -- COUNT THE NUMBER OF EVENTS FOR EACH PARTICULAR RUN
  put empty into tThePreviousLine
  put 1 into tEventCount
  put empty into tFinalEventCounts
  repeat for each line tTheCurrentLine in tTheSeries
if tTheCurrentLine  tThePreviousLine then
  -- A NEW EVENT
  put Event count for run-type   tThePreviousLine  \
  :   tEventCount  cr after tFinalEventCounts
  put 1 into tEventCount
else
  -- THE PREVIOUS EVENT CONTINUES
  add 1 to tEventCount
end if
put tTheCurrentLine into tThePreviousLine
  end repeat
  delete line 1 of tFinalEventCounts
  put tFinalEventCounts into field fResult

end mouseUp
___
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: counting runs

2005-10-31 Thread Mark Smith

This should also work:



on mouseUp
  repeat 1
put  any item of H,T after flipList -- just to generate a  
sample list

  end repeat

  put flipList into headsList -- make a copy to work on
  replace T with cr in headsList -- split runs of heads into lines
  filter headsList without empty -- get rid of empty lines
  repeat for each line L in headsList
add 1 to resArray[Heads,length(L)]
  end repeat


  --do same for tails
  put flipList into tailsList -- make a copy to work on
  replace H with cr in tailsList
  filter tailsList without empty
  repeat for each line L in tailsList
add 1 to resArray[Tails,length(L)]
  end repeat


  put the keys of resArray into kList
  sort lines of kList numeric by item 2 of each
  repeat for each line L in kList
put L into desc
replace comma with x in desc
put desc  resArray[L]  cr after rList
  end repeat
  put rList
end mouseUp

if the Hs  Ts are separated by commas to start with, just 'replace  
comma with empty in flipList'.




Mark

On 1 Nov 2005, at 00:22, Jason Tangen wrote:


Hello,

I'm trying to solve a seemingly simple problem and I could use some  
help. A coin flip will come out Heads or Tails and will  
produce, for example, the following series for 20 flips:


T,T,H,T,T,H,H,H,T,T,H,T,H,H,H,T,H,T,H,T

I need to count up the number events for a particular run.  For  
example,


Heads x 3 = 2
Heads x 2 = 0
Heads x 1 = 4
Tails x 1 = 4
Tails x 2 = 3
Tails x 3 = 0

I need to account for runs up to 60 (rather than 3 above) for  
hundreds of flips (rather than 20 above).


I've been using a very clumsy multiple if-then solution to date,  
but this quickly becomes difficult with many runs.


Can someone point me in the right direction?

Cheers,
Jason
___
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: counting runs

2005-10-31 Thread Dick Kriesel
On 10/31/05 4:22 PM, Jason Tangen [EMAIL PROTECTED] wrote:

 Hello,
 
 I'm trying to solve a seemingly simple problem and I could use some
 help. A coin flip will come out Heads or Tails and will produce,
 for example, the following series for 20 flips:
 
 T,T,H,T,T,H,H,H,T,T,H,T,H,H,H,T,H,T,H,T
 
 I need to count up the number events for a particular run.  For example,
 
 Heads x 3 = 2
 Heads x 2 = 0
 Heads x 1 = 4
 Tails x 1 = 4
 Tails x 2 = 3
 Tails x 3 = 0
 
 I need to account for runs up to 60 (rather than 3 above) for
 hundreds of flips (rather than 20 above).
 
 I've been using a very clumsy multiple if-then solution to date, but
 this quickly becomes difficult with many runs.
 
 Can someone point me in the right direction?
 
 Cheers,
 Jason

Here's yet another solution.  At the core, it uses an array like Alex's
solution, but with slightly fewer instructions.  So all it really adds to
suggestions already posted is a technique for reporting results as the
original example suggests: runs of heads first sorted by descending run
length, followed by runs of tails sorted by ascending run length, with no
run lengths missing.

-- Dick



post script:

local sArray,sChar,sCount,sMax

on mouseUp
  ask enter a comma-delimited sequence of H's and T's \
  with T,T,H,T,T,H,H,H,T,T,H,T,H,H,H,T,H,T,H,T
  recordFlips it
  putResults
end mouseUp

on recordFlips pSequence
  put  into sArray
  put char 1 of pSequence into sChar
  put 0 into sCount
  put 0 into sMax
  repeat for each item tChar in pSequence
recordFlip tChar
  end repeat
  add 1 to sArray[sChar,sCount]
end recordFlips

on recordFlip pChar
  if pChar = sChar then
add 1 to sCount
if sCount  sMax then
  put sCount into sMax
end if
  else
add 1 to sArray[sChar,sCount]
put pChar into sChar
put 1 into sCount
  end if
end recordFlip

on putResults
  -- note: fill in any missing runs
  put the keys of sArray into tKeys
  repeat with i = 1 to sMax
if sArray[H,i] is empty then put 0 into sArray[H,i]
if sArray[T,i] is empty then put 0 into sArray[T,i]
  end repeat
  -- note: sort runs of heads descending, then runs of tails ascending
  put the keys of sArray into tKeys
  sort tKeys numeric descending by sortKey(each)
  -- note: put the results
  put 
  repeat for each line tKey in tKeys
put item 1 of tKey  x  item 2 of tKey  :  sArray[tKey]  cr
after msg
  end repeat
end putResults

function sortKey pKey
  if item 1 of pKey is H then put item 2 of pKey into tSortKey
  else put 0 - item 2 of pKey into tSortKey
  return tSortKey
end sortKey


___
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


AW: counting runs

2005-10-31 Thread Thomas Fischer
Hi Jason,

if you just want to count the occurrences of H and T in strings like
 T,T,H,T,T,H,H,H,T,T,H,T,H,H,H,T,H,T,H,T
the easiest (and most likely fastest, unchecked though) way might be to do 
something like

  put  T,T,H,T,T,H,H,H,T,T,H,T,H,H,H,T,H,T,H,T  comma into myString
  put the number of items in myString into totalCount
  replace T, with  in myString
  put the number of items in myString into headCount
  put totalCount - headCount into tailCount
  answer total:   totalCount  return  \
  Heads:   headCount  return   \
  Tails:   tailCount
 
All the best
Thomas


--
Thomas Fischer
Salzburg 

 -Ursprungliche Nachricht-
 Von: [EMAIL PROTECTED]
 [mailto:[EMAIL PROTECTED] Auftrag von Jason
 Tangen
 Gesendet: Dienstag, 1. November 2005 01:22
 An: use-revolution@lists.runrev.com
 Betreff: counting runs
 
 
 Hello,
 
 I'm trying to solve a seemingly simple problem and I could use some  
 help. A coin flip will come out Heads or Tails and will produce,  
 for example, the following series for 20 flips:
 
 T,T,H,T,T,H,H,H,T,T,H,T,H,H,H,T,H,T,H,T
 
 I need to count up the number events for a particular run.  For example,
 
 Heads x 3 = 2
 Heads x 2 = 0
 Heads x 1 = 4
 Tails x 1 = 4
 Tails x 2 = 3
 Tails x 3 = 0
 
 I need to account for runs up to 60 (rather than 3 above) for  
 hundreds of flips (rather than 20 above).
 
 I've been using a very clumsy multiple if-then solution to date, but  
 this quickly becomes difficult with many runs.
 
 Can someone point me in the right direction?
 
 Cheers,
 Jason
 ___
 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: Date conversions in summer time

2005-10-31 Thread Sarah Reichelt
 Just wondering if anyone else has seen date conversions adding an extra hour
 each time you convert?


What version of Revolution are you using Monte? I thought this one had
been fixed in 2.6?
If you need a convert that works with earlier versions, I have a
function that checks  allows for this bug if necessary. Just let me
know if you need it.

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


RevCursor and RevVariableWatcher fixes

2005-10-31 Thread MisterX
Hi everyone

Tired with the design of the revVariableWatcher (VW), went in and fixed the
problems of this stacks including the bugzillas I posted for them. Took
exactly 10 minutes! 

Fixes include:
- Position of the splitters (awful, inpractical - always requiring a manual
fix when you open VW)
- Scrolling of the 3 fields not synchronized or wouldn't work with
scrollwheel (the 2 rightmost fields mostly)
- The cursors' hotspot position which in windows is at 1,1 instead of 10,10
(the same with other cursors). This is not an issue on Macs it seems...

These were the most annoying so there you go.

The two stacks involved are the 

../revolution/components/global environment/revcursors.rev
../revolution/components/global environment/revvariablewatcher.rev

You can download both at

http://monsieurx.com/hyper/rev/revcursors.rev (82KBs)
http://monsieurx.com/hyper/rev/revvariablewatcher.rev (12KBs)

Just replace them in your installation folder in their respective folders
(might be a good idea to make a backup of these stacks before replacing
them).

Hoping it makes your rev work more pleasant...

cheers
Xavier
http://monsieurx.com/taoo

___
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