Re: Field printing blank page? (I'm so stupid!)

2005-09-29 Thread Dave Cragg


On 29 Sep 2005, at 18:49, [EMAIL PROTECTED] wrote:

OMG I can't believe how retarded I am! I forgot to take of the   
tape on the

ink cartridge.


The smile your mail brought is worth a fortune.

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


Re: Setting Custom Property to an Array

2005-10-05 Thread Dave Cragg


On 5 Oct 2005, at 19:16, David Burgun wrote:


Hi,

How can I set the Customer Property of a Stack to an array? The  
following does not seem to work:


local myArray

set the cpArray of this stack to myArray


set the customProperties[cpArray] of this stack to myArray

Cheers
Dave
___
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 Switching Question

2005-10-05 Thread Dave Cragg


On 5 Oct 2005, at 21:04, Richard Gaskin wrote:


J. Landman Gay wrote:


Richard Gaskin wrote:

I used the file name form to illustrate another difference  
between HC and Rev:  while you would indeed need to open a stack  
in HC in order to get stuff out of it, in Rev you can get  
property values of objects in unopened stacks.  When you do that  
the engine reads the file into memory to access what's being  
requested; if the stack has been accessed before it'll stay in  
memory (unless you turn on the stack's destroyStack property), so  
subsequent accesses will be lightning fast.


Just an addendum: Actually, I've been using this technique on  
multiple stacks, and found that once accessed, the stack stays  
open until you explicitly close it regardless of its destroystack  
settings. I found this out after I accessed data from a ton of  
external stacks and then discovered them all open later on. I had  
to specifically close them to remove them from RAM (their  
destroystack was true, so that did the trick.) If an accessed  
stack has its destroystack set to false, just closing it won't be  
enough, the script will have to delete it as well. (I know you  
already know that, Richard, just mentioning it for completeness.)





Actually I didn't know that. Is that a bug?  It rather invalidates  
the destroyStack property, no?




I think we could debate that one for a month or two. :-)

I suppose the destroyStack is intended to apply when a stack is  
closed, and therefore has been explicitly opened earlier. Referencing  
an external stack isn't the same as opening it.


Like Jacque, I've been caught out with stacks in memory when I'd long  
forgotten about. However, one practical problem for the engine to  
overcome would be to determine when it should purge the stack.  
Typically, when I reference an external stack, I'm likely to make a  
few references to it within a handler. Having to reload the stack for  
each reference could introduce an overhead. (Perhaps referenced  
stacks should be purged when any currently running handlers finish.)


Meanwhile, I try to remember to specifically delete each externally  
referenced stack.


Cheers
Dave
___
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: PHP and Rev cgi

2005-10-06 Thread Dave Cragg


On 6 Oct 2005, at 10:40, jbv wrote:


Hi list,

I'm trying to launch a Rev cgi script from a PHP script.

I'm using the following line :

exec(/home/httpd/html/cgi-bin/./myScript.cgi 0 $caddie);

and it works.

But the problem is that I need to pass 2 parameters to the Rev cgi
script, and can't figure how to read these parameters in the Rev
cgi script...

I've tried :on startup x, y
but that doesn't work...

Any clue ?


Try looking at the $0, $1, $2, etc.  environment variables. I think  
$1 and $2 may be what you want.


e,g

on startup
 put $1 into tParam1
 put $2 into tParam2

There has been some discussion in the past about how these parameters  
are interpreted, (an issue with quotes if my memory serves) but I  
think the problems may have been limited to Windows.


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


Re: another beginning SQL/Rev question

2005-10-09 Thread Dave Cragg


On 9 Oct 2005, at 19:26, Charles Hartman wrote:

Something I don't understand about the revExecuteSQL command. I  
open my MySQL database and get an id. Now, to make later steps more  
general purposes, I'd like to ask the database for the structure of  
one of its tables (number of columns, column names) rather than  
hardwiring that into the Rev front-end. So I should be able to  
create a

global myArray
and then with my dbID in hand,
revExecuteSQL dbID, show columns in myTable, myArray
(taking care to put quotes around myArray as the docs say).

Trouble is, nothing shows up in myArray, or anywhere else as far as  
I can see. Using a variable (or several) instead of myArray doesn't  
help, neither does putting some dummy stuff () into myArray[1],  
myArray[2], etc., ahead of time.


The variable or array is used to substitute values in the SQL  
statement, not to receive data from the query.


Try using revdb_querylist (or revDataFromQuery) to execute SQL that  
returns data.


For example

   put show columns in myTable into tQuery
   put revdb_querylist(,, dbID,tQuery) into tData
   put tData into field whatever'

The docs aren't too clear on this. They seem to say use revdb_execute  
(or revExecuteSQL) for everything except SELECT statements. But I  
think we have to infer that any SQL that returns data should be  
treated in the same way as SELECT. (as opposed to INSERT, UPDATE,  
etc. where we should use revdb_execute)



Cheers
Dave
___
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 help, please

2005-10-10 Thread Dave Cragg

On 11 Oct 2005, at 00:04, Harvey Toyama wrote:


Hi,

I have a log file to parse. The data looks like this:

  Chip_Test:

  2   1075.7  R120-7000h0002 mov
HifRegs
  2   1088.1  R14-7000h 00020002 mov
HifRegs
  6   1100.5  [7020h]-1h00020004 mov
RSTS_Busy


I do not want to capture the line with Chip_Test:. I know the third
character will always be a single digit number. I have a feeble
knowledge of Regex from casual Unix use. I thought something like this
would work

put line vLineCounter into vLineBuffer
if char 3 of vLineBuffer = [0-9] then
...



regEx in Rev is only used in the MatchText and ReplaceText functions.

You could do this:

  if char 3 of vLineBuffer is a number then

But you're missing something in the first line. Assuming vLineCounter  
is a number, and the data to parse is in a variable named vData, then  
you need something like this:


  put line vLineCounter of vData into vLineBuffer


If you're parsing through all the lines in the file, and if it's  
long, you'll find that the expression line vLineCounter of vData  
takes longer to evaluate as the value of vLineCounter gets higher. In  
that case, the repeat for each format would be a lot faster.  
Something like:


  repeat for each line vLine in vData
if char 3 of vLine is a number then
-- your stuff
end if
  end repeat

Cheers
Dave
___
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: QT version on Windows

2005-10-11 Thread Dave Cragg


On 11 Oct 2005, at 09:52, [EMAIL PROTECTED] wrote:


put queryregistry(HKEY_LOCAL_MACHINE\software\apple Computer,
Inc.\quicktime\version,text) into data

get binarydecode(h*, data, x)
you get x = 00080360

if you reverse that string you get what i saw correctly in the  
registry..


This gives me what I see in the registry. (in this case version 7.0.2)


put queryregistry(HKEY_LOCAL_MACHINE\software\apple Computer, Inc. 
\quicktime\version,text) into data

local t1,t2,t3,t4
get binaryDecode(H2H2H2H2,data,t1,t2,t3,t4)
put t4t3t2t1

-- 07028000

I'm not sure if this is any help to sims. I assume digits 1-2 are the  
main version number, digit 3 is the subversion, and digit 4 is the  
sub-sub version. But this probably needs some more confirmation.


I also see there's a registry entry that give the location of QuickTime.

HKEY_LOCAL_MACHINE\software\apple Computer, Inc.\quicktime\InstallDir

Any use?

Nothing else seems to not work the way it's supposed to but im no  
expert

in the binarydecode function...


I know what you mean. I think the docs may need some revision. Every  
time I read about binaryDecode and binaryEncode my head hurts.  
Generally, it's trial and error.


Cheers
Dave
___
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: QT version on Windows

2005-10-11 Thread Dave Cragg


On 11 Oct 2005, at 17:56, Mark Wieder wrote:




put queryregistry(HKEY_LOCAL_MACHINE\software\apple Computer, Inc.
\quicktime\version,text) into data
local t1,t2,t3,t4
get binaryDecode(H2H2H2H2,data,t1,t2,t3,t4)
put t4t3t2t1



Interesting. What are you trying to do with that text in the
queryRegistry() call?



No idea, Mark. :-) I just copied that part from an earlier post. I  
didn't notice it.


The version I used here didn't include a second parameter at all. Lke  
this:


put queryregistry(HKEY_LOCAL_MACHINE\software\apple Computer, Inc. 
\quicktime\version) into data

local t1,t2,t3,t4
get binaryDecode(H2H2H2H2,data,t1,t2,t3,t4)
put t4t3t2t1

Dave
___
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: background grps and preOpenCard

2005-10-19 Thread Dave Cragg

On 19 Oct 2005, at 21:22, Chipp Walters wrote:

I'm working on a multi-card wizard and came across this and wanted  
to mention a peculiar behavior and see if people thing it's correct.


I create a shared background group over a few cards.

I put in it:

on preOpenCard
  beep
end preOpenCard

It only gets called on the first card where the group is  
encountered, and none thereafter. IOW, it appears the preOpenCard  
message is not sent to a background group except for the first time  
it's encountered. If I go to a card which doens't have the bgGroup,  
then back to one that has it, the preOpenCard handler gets called  
again.


It beeps here when I go to any card where the group is placed, even  
between card that both have the group. (this is Rev 2.6.1 on OS X)


Do you have the backgroundBehavior property set?

However, if I set backgroundBehavior to false, it doesn't beep at  
all, which is what I would expect. Your beep one time only sounds  
like what should happen from a preOpenBackground handler.


Do you have any other preOpenCard handlers anywhere that might block  
this? (in card scripts, or other backgrounds)


Cheers
Dave
___
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 trim?

2005-10-23 Thread Dave Cragg

Is there a requirement for the solutions to be one liners?

I think the following 2 are faster than any solutions using  
replaceText, and more readable too.


function trimL pString
  puttab  return into x
  repeat while char 1 of pString in in x
delete char 1 of pString
  end repeat
  return pString
end trimL

function trimR pString
  puttab  return into x
  repeat while char -1 of pString in in x
delete char -1 of pString
  end repeat
  return pString
end trimR

The following is not as fast as return word 1 to -1 of , but  
it's less than twice as slow. And it makes it easy to modify which  
whitespace characters to remove.



function trim pString
  puttab  return into x
  repeat while char 1 of pString in in x
delete char 1 of pString
  end repeat
  repeat while char -1 of pString in in x
delete char -1 of pString
  end repeat
  return pString
end trim


Cheers
Dave
___
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: Best Update Standalone Scenario

2005-10-23 Thread Dave Cragg


On 22 Oct 2005, at 20:44, Sivakatirswami wrote:


Aside query about Windows systems... why are two different ones for

C:\Documents and Settings\username\Application Data
and
C:\Documents and Settings\username\Local Settings\Application Data\)




The first one, specialFolderPath(26), may be stored on a server where  
roaming profiles are used. The second one, specialFolderPath(28), is  
only ever kept on the local machine.  You should use the first one  
for data the user should have access to, no matter which machine the  
user logs on from (application prefs for example). The second one is  
typically used for cached data (the Internet Explorer cache is kept  
here),  which isn't really needed in every location.


Cheers
Dave

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

2005-10-23 Thread Dave Cragg


On 23 Oct 2005, at 11:03, Thomas Fischer wrote:


Hi,

Wouter is right:



It is indeed elegant, but a condition check is necessary here as it
will remove the first word + the space(s) if there is no space at the
start of the line.



The cat sat on the mat. 





But if no space in front the result is

cat sat on the mat. 




This is actually true -- and a serious bug in Revolution's RegExp  
engine.


The Regular Expression Syntax reference states:

^ matches the following character at the beginning of the string
^A matches ABC but not CAB

* matches zero or more occurrences of the preceding character or  
pattern


I assumed that Revolution would do what it promised and didn't  
check this.


Try
answer replaceText(A C,^ *,)
I get C, which obviously is not correct.
If I remove the *, I get A C


This may be a bug. (I'm not sure.)

But the following will work:

answer replaceText(A C,^ +,)

I.e. match at least one occurrence of a space, which is what is  
intended.



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

2005-10-23 Thread Dave Cragg


On 23 Oct 2005, at 11:23, Dave Cragg wrote:


I assumed that Revolution would do what it promised and didn't  
check this.


Try
answer replaceText(A C,^ *,)
I get C, which obviously is not correct.
If I remove the *, I get A C



This may be a bug. (I'm not sure.)


To expand on why I wasn't sure if it was a bug or not.

A regular expression consisting of a single character (or single  
character set) followed by the * (zero or more matches) quantifier  
will always match. Therefore it's not really a useful construction.  
If it always matches, replaceText will presumably always try to  
replace the matched text. But in this case, it has matched an empty  
string, so I guess the engine is confused about where the replacement  
should be made. As far as I know, replaceText always works when the  
above construction is used in combination with another expression  
(e.g yx*, x*y, yx*z), so if it is a bug, I don't think it can be  
considered a serious  one.



answer replaceText(A C,^ +,)


The above works because the match can fail, in which case no  
replacement is made.


Cheers
Dave
___
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: mk_libsmil1

2005-10-25 Thread Dave Cragg

On 25 Oct 2005, at 12:06, Klaus Major wrote:


Hi friends,

i just uploaded a little stack to Rev-Online that will generate a  
SMIL file

on the fly that you can use in a player-object.

SMIL = Synchronized Multimedia Integration Language
Please use GOOGLE to learn more about SMIL.

User: klausimausi
Stack: mk_libsmil1

(Actually it is just one function and not a complete library, but  
LIB sounds

much more important... ;-)


The underscore combined with lib in mk_libsmil1 makes it look  
even more important (and difficult), and of course it runs faster  
when named this way. :-)


But I found a bug. There is a stray break command in the  
makemesmile function (in the part for Mac users).  Removing the  
break fixed things (except for the strange picture on the opening  
card :-)).


A great little tool. Subarashii. Thanks, Klaus.

Dave

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

2005-10-25 Thread Dave Cragg

On 25 Oct 2005, at 20:19, Mark Wieder wrote:


Ken-

Tuesday, October 25, 2005, 10:28:36 AM, you wrote:


Actually, it *should* support the full form of PCRE, since that is  
the
library that was used when the put it into the engine. The bugs  
you identify
above are all enhancement requests, so they are not representative  
of actual
bugs with the engine - in fact the only other two bugs I could  
find were

related to docs and not PCRE support at all.




So AFAICT we have a full and complete PCRE implementation here,  
with no

'real' bugs associated with it.



Well, my BZ #2805 was filed as an enhancement because I realize that
runrev implements *some* of the regular expression characters in the
filter command, but not all. I realize the matchText function handles
more of them, but whether this inconsistency is a bug or an
enhancement request is a matter of semantics. If the engine implements
the full PCRE set but I can't get to it using the syntax that the
builtin commands will accept, it doesn't do much good from a scripting
perspective.


I don't think it's just a matter of sematics.

 matchText doesn't just handle more of them; it effectively  
handles all of them.


The filter command doesn't claim to use regualr expressions. (only  
matchText, matchChunk, and replaceText do) The docs for filter use  
the term wilcard expression, and in fact, a much richer set of  
wildcards are allowed in filter now than used to be the case.


To me, there's a big difference between Wouldn't it be nice if the  
filter command used the full RegEx syntax in the same way as  
matchText? and Rev's regEx  implementation is a sparsely-documented  
subset of PCRE compatible

syntax and that subset can change at any time.

Cheers
Dave
___
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 Dave Cragg


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


2. I didn't want to sound too harsh, sorry.


And if my reply sounded harsh, sorry too.



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).


I believe that replaceText received a performance boost in the 2.6.1  
version. I don't how much of a difference it makes. But I'm not  
surprised that Perl handles regular expressions faster. That's what  
it was built for. (On the other hand, it's not too good at drag and  
drop. :-) )


On the other hand, this shows that those cumbersome repeat loops  
are surprisingly fast.


And usually easier to read than regular expressions.


All in all, Bob's idea to ask questions that make them want to  
crawl under the table in shame because probably the answer is  
idiotically simple. turned out to keep people busy and excited for  
quite a while. Proves again that there are no simple questions...


Absolutely.

Regards
Dave

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


Re: Runtime Engine

2005-10-26 Thread Dave Cragg


On 26 Oct 2005, at 19:32, J. Landman Gay wrote:


Stewart Lynch wrote:


Sorry.   I forgot the subject in my previous message.
I have just purchased the e-Book on Using Revolution's Engine for
Internet CGI's and the following link does not work.  I am looking  
for the

engine that will run on my Windows system.
Any thoughts?



The Windows engine does not require any special CGI adaptation.  
Just put a copy of the Revolution executable from your regular  
distribution into your CGI folder. The only OS that needs a  
specially-compiled executable is OS X, which requires the Darwin  
CGI engine.


Has this changed, Jacque? There used to be a separate cgi engine for  
Windows named cmc.exe (from the Metacard era). I have a copy (from  
years ago), but right now I can't say for sure what version it is.


Cheers
Dave
___
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: Changing Font Style of Text Already in a Field

2005-10-28 Thread Dave Cragg


On 28 Oct 2005, at 20:48, Chipp Walters wrote:


Both Klaus and Signe Marie Sanne have good suggestions for doing this:

set the textfont of char 1 to -1 of fld X to to Lucida Grande

Both of their solutions involve explicitly set the font of the  
characters. Another way is to do as you do:


set the textFont of fld X to Lucida Grande
put the text of fld X into fld X

This has the added advantage if you cut and paste the text from fld  
X to another fld, it doesn't automatically take the font settings  
with it.


And just for variety (or confusion perhaps), this will do essentially  
the same as Chipp's suggestion.


  set the textfont of char 1 to -1 of fld X to empty
  set the textFont of fld X to Lucida Grande

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


Darwin cgi engine and sendmail

2005-10-28 Thread Dave Cragg

Hi good people

Does anyone have any experience of using sendmail from the Darwin cgi  
engine? (OS X 10.4.2)


If so, could you let me know how it's done? Or if you know it's not  
possible, could put me out of my misery and let me know.


Cheers
Dave
___
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: Darwin cgi engine and sendmail

2005-10-30 Thread Dave Cragg


On 28 Oct 2005, at 22:46, Andre Garzia wrote:



there was some snipet code by sivakatirswami showing that some time  
ago on the list, I'll search the list and get back to you.




Thanks. Andre. I found a snippet on the Metacard list from some time  
ago. This used open process. Unfortunately, I couldn't get it to work.


Sivakatirswami wrote:

Here you go Dave.. .from the application here that generates our  
Daily Hindu Press international..


This is running from a rev desktop stack in the GUI, but I'm pretty  
sure it will work from a CGI...



Thanks for this. Very promising. I got it working from my normal  
machine (OS X 10.4.2) from both a regular stack and a cgi.


But I can't get it to run on the machine I want to use (OS X 10.3.9).  
I get this error:


 postdrop: warning: unable to look up public/pickup: No such file or  
directory


Googling for this brings up a lot of discussion about unix/postfix  
configuration issues. (Not really a place I want to go.) But no  
obvious solution so far.


If anyone has any hints, I'd love to hear.

Cheers
Dave
___
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: Darwin cgi engine and sendmail

2005-10-30 Thread Dave Cragg


On 30 Oct 2005, at 10:42, Dave Cragg wrote:

Sivakatirswami wrote:


Here you go Dave.. .from the application here that generates our  
Daily Hindu Press international..


This is running from a rev desktop stack in the GUI, but I'm  
pretty sure it will work from a CGI...





Thanks for this. Very promising. I got it working from my normal  
machine (OS X 10.4.2) from both a regular stack and a cgi.


But I can't get it to run on the machine I want to use (OS X  
10.3.9). I get this error:


 postdrop: warning: unable to look up public/pickup: No such file  
or directory




It looks like all I had to do was start postfix from the terminal on  
the 10.3.9 machine


sudo postfix check
sudo postfix start

(hint at www.macosxhints.com).
As soon as I did that, all the mail I'd tried to send previously  
suddenly arrived.


Thanks once again for the script.

Cheers
Dave
___
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: tiny mystery

2005-10-30 Thread Dave Cragg


On 30 Oct 2005, at 12:56, Charles Hartman wrote:

I've got a dialog substack that includes two fields with  
listBehavior set to true. I fill them up from scripts -- a  
preOpenStack handler for one, and for the other an on  
selectionChanged handler called when something from the first list  
one is selected.


I don't want anything to be selected in either one until the user  
selects something. So at the end of both list-filling handlers, I  
include the line


set the hilitedLine of fld oneOfTheListFields to 0

It works in one (the one filled after the user selects something  
from the other) but not in the one filled by the preOpenStack  
handler. That list shows a hilite on the blank line after the last  
item in the list. How do I get rid of it??


One way round this would is to put the above line in an openStack  
handler instead of preopenStack.


Another way might be to set the traversalOn property of the fields to  
false. (Which might not be what you want.)


I think the problem is that Rev will focus on the first control with  
traversalOn *after* the preOpenStack handler runs. If ths control is  
a list field, it will hilite one of the lines (not sure why it's the  
last line in your case, it's the first here).


Cheers
Dave
___
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: Darwin cgi engine and sendmail

2005-10-30 Thread Dave Cragg


On 30 Oct 2005, at 11:13, Alex Tweedly wrote:


Dave Cragg wrote:


Thanks for this. Very promising. I got it working from my normal   
machine (OS X 10.4.2) from both a regular stack and a cgi.


But I can't get it to run on the machine I want to use (OS X  
10.3.9).  I get this error:


 postdrop: warning: unable to look up public/pickup: No such file  
or  directory


Googling for this brings up a lot of discussion about unix/ 
postfix  configuration issues. (Not really a place I want to go.)  
But no  obvious solution so far.



postfix is an email sending program - a replacement for the normal  
sendmail.
It is sendmail compatible (to some level of compatibility) -  
sounds like it is either misconfigured, or somehow the machine has  
got both sendmail and postfix running and they are in conflict.

(www.postfix.org)

I'd start by trying sendmail from the command line - can it send  
mail at all ?

If not, fix that before doing anything from Rev.

If it can, then try a variant using the same switches as you intend  
to use (may be a problem with mail lists, or multiple addresses,  
etc. ) and then with the same list of addresses.


 and about then I run out of suggestions :-(


Thanks, Alex. As you probaby saw, I managed to get it working,  
applying the sophisticated method of turning it on.


I've never paid much attention to how mail works on any computer I've  
used. I just take it for granted. On OS X, I knew that Postfix was  
installed, but had no idea how it was used, if at all, by e-mail  
applications. I still don't know.   I just hope by starting up  
postfix, I haven't created a calamity of any kind. Fingers crossed!. :-)


Cheers
Dave


___
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: Dumb question about RunRev Documentation

2005-10-30 Thread Dave Cragg


On 30 Oct 2005, at 16:37, Roger Guay wrote:


Alex,

AudioClip doesn't offer to expand to messages on my copy of 2.6.1.   
What version are you using?  If I'm correct, is there yet another  
way to get to the messages in version 2.6.1??


Cheers, Roger



Be sure you don't have anything typed in the search box. This will  
filter out stuff, and the audio clip entry may not show as expandable.


Dave
___
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: Load URL returns error 10049

2005-11-08 Thread Dave Cragg


On 8 Nov 2005, at 01:52, Dave Beck wrote:




Hi,



I have a rev standalone that has been distributed to a number of  
users. The
standalone uses the load URL command to get a web page from my  
server. The
command works as expected for every user to which I've distributed  
the stack
except for one. The load URL command fails for this user and the  
URLStatus
function returns error. Then the libURLErrorData function returns  
10049.
Does anybody have any idea what could be causing this error? The  
user is
able to browse the internet with IE without problems before and  
after the
error occurs, so I doubt it is a problem with her setup. The online  
info I
could find on the error says it is related to opening invalid an IP  
address:


One thing to check...

Does the user need to connect to the internet through a proxy server?  
Have the user check the Internet Options control panel to see if  
there are any proxy settings. If so, you will need to set the  
httpProxy (see Rev docs) to the appropriate address.


Cheers
Dave
___
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: The Disappearing Desktop - It's Real This Time

2005-11-10 Thread Dave Cragg


On 10 Nov 2005, at 06:36, Mark Wieder wrote:


Dan-

Wednesday, November 9, 2005, 4:16:42 PM, you wrote:


There is no necessary connection between where data is and where the
app is. That's just today's temporary model.


That may be true, but according to UNESCO's 3 November report on
Knowledge versus Information Societies 11 percent of the world's
population has access to the internet. And that's not talking about
wired-in broadband connection - this includes dialup and folks who
simply have access to internet cafes and such.

http://unesdoc.unesco.org/images/0014/001418/141843e.pdf


But I wonder if the percentage of the world's population who have  
access to a computer is much above the same 11 percent figure. Among  
my own non-computing friends and family members who have or are  
thinking of buying a computer, the net is the basic reason they  
need/want one. The point being that we can probably assume that  
computer-access and net-access will come to mean much the same thing.


However, this doesn't mean I support the view that where the data  
is is no longer important. That remains to be seen.


Dave

___
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: The Disappearing Desktop - It's Real This Time

2005-11-12 Thread Dave Cragg


On 13 Nov 2005, at 00:19, Dan Shafer wrote:


From which experience i conclude:

(a) AJAX and RIAs are not a panacea
(b) $2 billion acconting firms IT shops probably don't embrace new  
technologies in the first place (having seen *that* up close and  
personal)
(c) Moving information from one Web service to another is often  
difficult because of all the impenetrable crap put in the way for  
security in the first place

(d) This technology has a ways to go.


I suspect the CIO was talking about web services in the narrow  
sense of something like SOAP (no longer word of the month). And if  
that's the case, I can understand his comments. I remember struggling  
to make the SOAP toolkit that was once distributed with Rev, and at  
the time thinking what's the point?. The aim was basically to get a  
piece of dynamically generated xml from one computer to another - not  
very different from a web form and a cgi script. In this case, I  
think it's not the technology that has a way to go, but the  
definition of a clear purpose, without which committees will   
generate more committees until the camel is built.





On Nov 12, 2005, at 2:34 PM, Sivakatirswami wrote:

The CIO of a 2 billion dollar accounting firm that handles movie  
and media events accounting for the likes of Warner Brothers and  
Disney, is on our team... he was just here in my office yesterday,  
explaining to me to be very cautious about using of web  
services. Warner Brother's forced them into it and he says the  
kajillion lines of code that have evolved from this decision...  
just to do the simple of things, where all that is really  
happening is a very little bit of data is moving via an XML  
protocol from one machine to another, is costing everybody, big  
time...he said don't go there!


just FYI.


___
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: frappr map

2005-11-12 Thread Dave Cragg


On 12 Nov 2005, at 16:43, Mark Wieder wrote:


Marty-

Friday, November 11, 2005, 6:49:14 PM, you wrote:


Oddly enough, this is the second time in 24 hours frappr has come to
my attention and I've been invited to add myself -- I had never heard
of frappr before this.  Is it new?  (I notice it's in beta.)
It does seem rather US-centric, doesn't it?


Yes. I've adjusted the map so that it shows the whole world now. It's
using Google maps, so my guess is that it's a Google spinoff. I've
just become aware of it in the last couple of weeks, so I think it's
*very* new... and *very* beta. But much fun.


It certainly is (much fun, that is). I didn't think we were allowed  
new toys this close to Christmas. :-)


Dave

___
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: Load URL returns error 10049

2005-11-15 Thread Dave Cragg


On 15 Nov 2005, at 05:59, Dave Beck wrote:


Erin, I had the user ping the web site that the script is trying to  
access

through Load URL and the ping returned:



Ping statistics for 66.160.133.98

Packets: Sent 4, Received 4, lost 0

Approximate round trip minimum =72ms, maximum 78 ms, average 74ms






So everything appears to be normal there. I also built I special  
version of

the stand alone that accesses the URL through the IP address as you
suggested, but unfortunately she still received the same 10049 error.



What happens when she tries to connect to the same IP address out of  
a browser? Also, can you you have her use a Rev standalone to connect  
to some other URLs (e.g. http://www.yahoo.com, etc,) and see if the  
problem is limited to this address or others too.




Any help anybody could offer would be greatly appreciated. Again, the
problem is that the load URL command fails for this user when  
trying to load

a web page and the URLStatus function returns error. Then the
libURLErrorData function returns 10049. This problem is isolated  
to this
user and the stand alone has been distributed and works as expected  
for over

50 others, as accessing the same hard coded URL.


Just to confirm, is the error literally 10049 or is there some  
other text such as error on socket 10049? Windows socket errors  
usually return a little bit more than just the number, so if that's  
all you're seeing, there might be something else going on.


Cheers
Dave
___
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: Downloading mystery

2005-11-17 Thread Dave Cragg


On 17 Nov 2005, at 01:42, Bruce A. Pokras wrote:

I am trying to script the downloading of European patents from the  
European Patent Office's server. They provide a sample URL to use  
for that purpose, but instead of the patent, I instantly get a zero  
size file. I've tried it with and without URLencode. However,  
scriptiing with revGoURL works fine with the same URL to open the  
patent in my browser. Any ideas? The script I am using goes like this:


on mouseup
put https://publications.european-patent-office.org/ 
PublicationServer/getpdf.jsp?cc=EPpn=1502503ki=A1 into theURL

   put URL theURL into URL binfile:1502503.pdf
end mouseup

Could it be that Rev is allergic to JavaServer Pages? I hope not.  
Thanks for any help that you might be able to give.


mauling_by_sheep
This is a plea, not just to Bruce, but to all of you who do things  
like this, most of whom should know better.


When you deal with URLs, especially internet URLs, things sometimes  
go wrong. Often these things are outside of your control, such as the  
network being busy, being given the wrong URL by your boss, your  
ISP's data center being struck by an asteroid, or a dud hard drive.


It's important that you check that things happen as expected. So  
every time you make a url request, always (i.e. always) check the  
result.


In the example above, there are two url requests in the same line. So  
should you check the result twice? I'd say yes. Something like this:


put URL theURL into theData
put the result into theRes
if theRes  empty then
  answer theRes ## or whatever you need to do
else
  put theData into URL binfile:1502503.pdf
  put the result into theRes
  if theRes is not empty then
answer theRes ## or whatever you need to do
  else
##carry on
  end if
end if

/mauling over

Apart from that, I think Ken's pointer to  libURLSetSSLVerification  
will probably work. This will mean that you won't be able to  
authenticate the remote server. Perhaps OK for the patent office, but  
probably not a good idea for doing bank transactions. The alternative  
is to set the sslCertificates property to an appropriate certificates  
file.


Cheers
Dave
___
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: Downloading mystery

2005-11-18 Thread Dave Cragg


On 18 Nov 2005, at 01:53, Bruce A. Pokras wrote:


Thanks, Dave, for the mauling. It was well deserved. However, I  
have been trying to get this to work over a period of several  
weeks. This was not a try once and cry for help. This has been a  
long, drawn out bit of frustration. A couple of times I did throw  
the result into the script, but it was very un-enlightening. I  
also alternated using revGoURL with the same URL, and bingo, the  
patent showed up in Netscape.  So there were no issues with the EPO  
server at the times I was trying.


With that introduction, the Result #1 (see below) shows the  
single word error. Not very enlightening! I am using the  
following handler, if anyone wishes to try it:


on mouseUp
  libUrlSetSSLVerification false
  put https://publications.european-patent-office.org/ 
PublicationServer/getpdf.jsp?cc=EPpn=1502502ki=A1 into theURL

  put URL theURL into holdData
  put the result into theRes
  if theRes  empty then
answer Result #1:   theRes
  else
put holdData into URL binfile:1502503.pdf
put the result into theRes2
if theRes2  empty then
  answer Result #2:   theRes2
end if
  end if
end mouseUp


Hi Bruce

The above worked here the first time I tried, and I got a nice patent  
application saved to a pdf file.


However, on subsequent attempts I had mixed results, the main problem  
being either a socket timeout or redirection failed result.   
Logging the data (libUrlSetLogField), I see that the redirecton  
failures were also socket timeouts.


Out of a browser, it worked initially, but at a later try I was  
getting redirected to a Search page. Is this in fact a pay for  
service, and they only let you download a few times for free?


The first response from the url request is a redirection response  
(302). By default, libUrl will try to redirect the request using the  
Location header in the response. However, I also saw that the first  
response had a Set-Cookie header like this:


Set-Cookie: JSESSIONID=8A03B947A0B4703A14FA776E904EE40F; Path=/ 
PublicationServer


I'm wondering if things would go better if  the cookie were returned  
in the redirected request. To do this, you'd need to handle the  
redirect yourself (libUrlFollowHttpRedirects false), get the remote  
server's headers (libUrlLastRHHeaders()), and extract the Location:  
and Set-Cookie headers. Then set the Cookie to return (set the  
httpHeaders to Cookie: something) and then get the url extracted  
from the Location header.


I'm not sure whether you just return the Cookie as you received it  
(Cookie: JSESSIONID=8A03B947A0B4703A14FA776E904EE40F; Path=/ 
PublicationServer), or you have to set it differently. (perhaps  
someone can help.)


Whatever, it seems like the service has some kind of session control  
on it. Although whether this is a cause of the frequent timeouts is  
hard to say. (increasing the socketTimeoutInterval to 6 didn't  
seem to have any effect.) Do you have any other information about how  
the service works?


Cheers
Dave


___
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: Messages in setprop...

2005-11-24 Thread Dave Cragg


On 24 Nov 2005, at 22:27, Gilberto Cuba wrote:


Hi,

I'm working in a setprop of the property set, that is to say,  
group of property, and detect that I modified or set a value of a  
property of the same group or property set, the message dont  
triggered. How I can do this message occur?


Example:

setprop MyPropSet[propName] newValue

switch propName
case Prop1
  -- (1)
  set the MyPropSet[Prop3] of me to value
  break
case Prop2
  ...
  -- do something...
  ...
  break
case Prop3
  ...
  ...do something...  (2)
  ...
  break
end switch

end setprop

When i set a value to a property Prop1, it come in to (1), but  
when the next line is executing, it dont pass for (2).

I hope you might understand.


The following is from the Rev documentation under setprop.

If you use the set command within a setProp control structure to set  
the same custom property for the current object, no setProp trigger  
is sent to the object. (This is to avoid runaway recursion, where the  
setProp handler triggers itself.)


I assume this also applies with property set handlers too.

Depending on what you are wanting to do, there are probably a number  
of ways to get round this. My first suggestion would be to use a  
regular handler or function instead of a setprop handler.


Cheers
Dave
___
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: Scope Problem on Standalones

2005-11-28 Thread Dave Cragg


On 28 Nov 2005, at 12:51, David Burgun wrote:


Bu according to the documentation, the path returned should be the  
path to the real application, e.g.


MacOSX/myApp.app/Contents/MacOS/Runtime/Stacks/StackA.rev

Or perhaps:

MacOSX/myApp.app/Contents/MacOS/MyApp (real applicaiton)

Have I got this wrong? I would be really grateful if someone could  
just let me know if:


I don't think you've got it wrong.

As a quick test, I made two stacks path_tester and stackA

In the card script of path_tester I put this script:

on preopenstack
  put empty into field pathlist
  put the filename of this stack into tPath
  put tPath into field pathlist
  set the itemDel to /
  put item 1 to -2 of tPath into tDir
  if there is a stack (tDir  /  stackA.rev) then

toplevel (tDir  /  stackA.rev)
  end if
end preopenstack

I built this into a standalone.

In the card script of stackA, I put this script:

on preopenstack
  if there is a stack path_tester then
  put cr  the filename of this stack after field pathlist of  
stack path_tester

  end if
end preopenstack

I then placed stackA.rev in the Contents/MacOS folder inside the  
standalone.


On running the standalone, I get the following in field pathlist.

/Users/dave/Documents/RunRevStuff/problem testers/pathtest/ 
path_tester/path_tester.app/Contents/MacOS/path_tester
/Users/dave/Documents/RunRevStuff/problem testers/pathtest/ 
path_tester/path_tester.app/Contents/MacOS/stackA.rev


This is with Rev 2.6.1 on OS X 10.4.3 (but I'm pretty sure it also  
worked this way in earlier versions).


Can you show us the script that is producing the strange result?

Cheers
Dave

___
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: Load URL returns error 10049

2005-11-29 Thread Dave Cragg

Hi Dave

No answers I'm afraid. Just more questions.

On 29 Nov 2005, at 05:02, Dave Beck wrote:


 I'm afraid they are quite puzzling to me and seem to
point towards a bug in the Rev internet lib or the engine itself,  
but maybe

somebody with more experience could chime in on that.


That can't be ruled out. But as it works for the other users, and  
this is the first report of this error, I'd still look at the user's  
setup as the probable cause. Of course, the fact that the Web Browser  
works suggests something wrong with Rev, but it may be just that they  
are doing things differently.




Again, to reiterate, the problem is that the load URL command fails  
for this

user when trying to load a web page and the URLStatus function returns
error. Then the libURLErrorData function returns Error 10049. This
problem is isolated to this user and the stand alone has been  
distributed
and works as expected for over 50 others, all accessing the same  
hard coded

URL.


10049 looks like a Windows socket error. From looking around the net,  
it seems to be associated with setting up servers and not client  
apps. (The problem is a failure to bind to an address on the local  
machine.) However, I can force this error by connecting to a url like  
this: http://255.255.255.255/something.html; But the error string  
returned by libUrlErrorData is error Error 10049 on socket.


Sorry to harp on about this, but are you sure the error string is  
Error 10049. You're not filtering the message in any way? (e.g.  
word 2 to 3 of libUrlErrorData(tUrl)). The reason I'm asking is that  
I can't find anywhere in libUrl that would set the data returned by  
libUrlErrorData in this way. How are you getting the message? In an  
answer dialog? Is there any chance that it's not a Rev window popping  
up but a system or other utility window? What version of libUrl are  
you using (libUrlVersion()). Also, what version of Rev, and what  
version of Windows is the client using.





I had the customer check to see if the same URL loaded in her browser
without problems, and the answer was yes. I then built a special  
stand along
for this customer that accesses the website directly through the IP  
instead

of using the DNS lookup, but the same error was still generated.


When you used the IP, did you set it manually or use Rev's  
hostNameToAddress function? If the latter, it might point to a DNS  
issue. A way to check would be to see the result from  
hostNameToAddress(servername) on the user's machine. For example,  
if the url you are connecting to is http://www.myserver.com/ 
something.html, the see what hostNameToAddress(www.myserver.com)  
returns. Is it a valid IP address?




I then
built another standalone that attempts to access google through the  
load
command as a sanity check, and what happened was that the load  
failed again

and this different error was returned by libURLErrorData:

Error loading on socket


Again I'm puzzled by the message. I'd expect to see  
error (lowercase) before the capitalized Error. Also, I've never  
come across this specific message before.




Erin, I had her give me all her configuration info. There are no proxy
server settings, and in the Internet Protocol (TCP/IP) settings she  
has

Obtain an IP address automatically and Obtain DNS server address
automatically turned on.



Just to reconfirm the proxy settings. In the Internet Options Control  
Panel, under the Connections tab, click the LAN Settings button. In  
the Automatic Configuration section at the top of the window, are any  
check boxes hilited. If so, this could be a problem.


In an earlier mail, you said...
(She already told me that she is not on an internal network or  
behind a

firewall.) Or in light of the new info is that a moot point?


This might point to some malware problem - trojan/spyware/whatever.  
Are you able to suggest (tactfully) that she run some kind of anti- 
spyware and anti-virus utilities.


The only other suggestion would be to use libUrlSetLogField to log  
the transaction with the server. This may not reveal much if the  
problem is happening when opening the socket. But it's worth doing,  
even if just to confirm where the problem is occurring.


Cheers
Dave
___
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 - MySQL, PHP, and Japanese text

2005-12-01 Thread Dave Cragg

On 30 Nov 2005, at 23:45, N Cueto wrote:

Good questions about Japanese and mySQL for which I hoped someone  
would pipe in with some good answers. In the meantime, here's the  
little I know.





2) at MySQL admin-level, does
Japanese text require a special
data type or data setting? It's
varchar now.


varchar is the column type, which is different from the character  
set used. You can set the default character set for the database,  
individual tables, and columns within tables. (including SJIS and utf8)


For more than you ever wanted to know:

   http://dev.mysql.com/doc/refman/5.0/en/charset.html

So I guess the first thing is to try and find out the character set  
of the database column or table in question. MySQL's default is Latin  
1, but I guess if your hosting service is in Japan, they may have set  
a different default.


There may also be other reasons for getting garbled texts. If you're  
also filling the database fields with data ourself, you'll need to be  
sure that  the method used for inserting the data is comparable to  
how you retrieve it. So for example, if you were using utf8 in the  
database, and the text to insert comes from a Rev field whose  
textfont is set to Osaka,Japanese, you might do something like this  
to get the text for inserting into the database:


   put unidecode(the unicodeText of field data,utf8) into tData

And then to put retrieved data back into a similar field:

  put revDataFromQuery(,,gDbId,tSql) into tData
  put uniencode(tData,utf8) into tData
  set the unicodetext of  field data to tData


As a little experiment, I tried storing Japanese text in a default  
Latin 1field in mySQL. I had some success by storing and retrieving  
it as UTF8, but not using Rev's UTF16 internal unicode format. The  
reason for the UTF16 problem was that the unicode data included a  
backslash character which mySQL treats specially in a Latin 1 field.  
So what came out was different from what went in. The UTF8 approach  
worked, but I did this with a limited amount of text, so there's no  
guarantee that other pieces of UTF8 don't include problem characters.


Hopefully someone else will step in with something more lucid. :-)

By the way, did you compose your mail on some small and nifty  
Japanese technology? The narrow text lines suggest it's smaller than  
the clunky computer (made from granite) I use. Does it run Rev? :-)


Cheers
Dave


___
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: Rev performance: help! (more info)

2005-12-05 Thread Dave Cragg


On 5 Dec 2005, at 21:03, Jon Seymour wrote:


Hi all,

I fear I have a corrupted stack. The program is giving me a  
previous request not completed message and frankly it seems as if  
it's busy doing something else! The message watcher is not showing  
anything, though. After a while the program just crashes. Any ideas?


That looks like a libUrl message. You'll get this message when you  
try to get or post to a url, when a previous request has not  
completed.


I doubt it's a corrupted stack. Could you give us some more  
information about what your stack is doing, especially any scripts  
that call URLs? Then we might be able to help.


Cheers
Dave
___
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: Rev performance: help!

2005-12-06 Thread Dave Cragg

I may have missed part of this thread.

On 6 Dec 2005, at 19:57, Judy Perry wrote:


I forgot to mention that I'm seeing alot of ulTickleMe's in the  
message

watcher...


The ulTickleMe message is sent by liburl. If you are seeing it once a  
second, that's normal while you have a socket open. The messages  
should stop when all sockets are closed.



Cheers
Dave



___
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: Put something into URL returns no error

2005-12-07 Thread Dave Cragg


On 8 Dec 2005, at 07:20, Thomas McCarthy wrote:



I'm updating a file on the web using a formula like this:

put x into url ftp://name:[EMAIL PROTECTED]/folder/the_file.txt

It's working great. But when I tried it see what would happen if  
there was no internet connection--hoping there would be an error  
message-- the result was empty. How can we know if a put fails?


I see invalid host address in the result when I turn off the  
internet connection, presumably as a result of a hostNameToAddress  
lookup . If I change to a numerical IP address, I see error can't  
connect to host


This was a quick check on Mac OS X. I'll check on Windows in a short  
while.


Cheers
Dave
___
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: Rev performance: help! (solved)

2005-12-08 Thread Dave Cragg


On 7 Dec 2005, at 15:23, Jon Seymour wrote:

Thanks again to Dave for insisting that I must have had a libURL  
call in there somewhere :)


Although we solved Jon's immediate problem (wrong url), I think there  
must have been something else going on to produce the results he  
originally reported.


One possible suspect was the use of a wait ... with messages  
statement while a url was still loading. Although we never confirmed  
this, it's probably worth mentioning this potential gotcha. (Brought  
to my attention recently by Chipp Walters.)


libUrl uses the wait for messages statement to implement it's  
asynchronous behavior, in a wait loop something like this:


   repeat until some condition
  wait for messages
   end repeat

This is equivalent to:

  wait until some condition with messages

If you later use another wait ... with messages statement while the  
earlier one is still waiting, the earlier wait will remain stuck  
while the later one is waiting, even if its condition has been met.  
The following script illustrates this, where handler_one won't  
complete until handler_two completes.


global gDone

on mouseUp
  put false into gDone
  send handler_two to me in 10 milliseconds
  handler_one
end mouseUp

on handler_one
  wait until gDone = true with messages
  put handler_one finished  cr after field 1
end handler_one


on handler_two
  put handler_two stage 1  cr after field 1
  put true into gDone
  repeat 3
wait 2 seconds with messages
   put handler_two stage 2  cr after field 1
  end repeat
end handler_two


The upshot of this is that if you use load, then have a wait  
statement like this:


  load url myUrl
  wait unitl some condition with messages

the load url won't complete until some condiion is met. If some  
condition takes a long time to be satisfied, the load will take  
that long as well.


This is a potential problem with black box scripted libraries such  
as libUrl which are implementing asynchronous behavior.


You can use the waitDepth function to see if there are any  
outstanding waits. But avoid the temptation to do something like  
wait until the waitdepth is 1 with messages, which immediately  
causes the problem. Be careful! (But not too careful. :-))


Judy, if you're reading, I wonder if this kind of thing may have had  
something to do with what you were seeing.


Cheers
Dave
___
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: Put something into URL returns no error

2005-12-08 Thread Dave Cragg


On 8 Dec 2005, at 08:29, Alex Tweedly wrote:


Dave Cragg wrote:



On 8 Dec 2005, at 07:20, Thomas McCarthy wrote:



I'm updating a file on the web using a formula like this:

put x into url ftp://name:[EMAIL PROTECTED]/folder/the_file.txt

It's working great. But when I tried it see what would happen if   
there was no internet connection--hoping there would be an error   
message-- the result was empty. How can we know if a put fails?



I see invalid host address in the result when I turn off the   
internet connection, presumably as a result of a  
hostNameToAddress  lookup . If I change to a numerical IP address,  
I see error can't  connect to host


This was a quick check on Mac OS X. I'll check on Windows in a  
short  while.


Yes, but if you turn off the connection, then the computer knows  
(can tell directly) that it has no connection - that's the easy case


If you can, also check what happens if you have a *network*  
connection, but no internet connection.


e.g. if you're on broadband, disconnect the wire between the router  
and the wall socket.


But I don't need to get out of my seat to turn off the power.  Thanks  
for the heads up, Alex.


Anyway, I get the same result for the named IP (libUrl does do a  
lookup). With a numerical IP, I get eror socketTimeout


Cheers
Dave
___
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 do i check for an internet connection?

2005-12-11 Thread Dave Cragg


On 11 Dec 2005, at 00:50, Alex Tweedly wrote:


Jerry Daniels wrote:


Kurt,

I've been using this one since you posted it and i really like  
it.  VERY fast.


Thanks!

Just remember - it often gets the wrong answer on some systems  
(e.g. mine).
It believes I am always connected, even though about 50% of the  
time I'm not  - because I have an in-house network (mix of Cat-5  
and wifi) with an Internet connection which is *not* always connected.


Alex, thanks as always for pointing out the limitations. Can I pick  
your knowledge a little further?


Can the testForConnection function be assumed reliable for detecting  
a network connection of some sort, not necessarily the internet? I  
guess there are times when this might be sufficient.


Cheers
Dave


___
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 do i check for an internet connection?

2005-12-11 Thread Dave Cragg


On 11 Dec 2005, at 19:16, Alex Tweedly wrote:


Sorry - was I sounding like a broken record ? And a negative one at  
that :-(


Not at all. I really appreciate it. I think many of us are now having  
to or wanting to deliver things that have to work in various  
networked settings, and we can get carried away with our little bits  
of knowledge. Although I  know something about things such as http  
and ftp protocols, I'm fairly ignorant about many aspects of  
networking.  I'm glad for any pointers  I can get (especially  
pointers to pitfalls).



Can the testForConnection function be assumed reliable for  
detecting  a network connection of some sort, not necessarily the  
internet?


yes


I  guess there are times when this might be sufficient.

I can't think of any circumstance that it is sufficient for  
anything meaningful.

If there is something it helps with, I'd be happy to hear about it.


I have nothing very practical in mind. But it's nice to store away  
these snippets of code with an accurate description of what they do.




(note you can have a network connection with nothing but a  
successful link status - i.e. a hub or switch, there is no  
certainty that any other computer is connected; I don't see how  
that is sufficient for anything).


Well, in a company setting, and the sales person has returned to the  
office from the road with his/her laptop, and has forgotten to plug  
it into the company network when he/she starts an app that requires a  
network connection... I guess it could perhaps give a better  
description of the problem than invalid host address. (Just  
thinking aloud here.)


Cheers
Dave



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


Re: Sockets

2005-12-11 Thread Dave Cragg


On 11 Dec 2005, at 16:49, Björnke von Gierke wrote:


Of course there is a secret Socket society! But it's easy to join:
Our required readings are:

Open Socket command
Close Socket command
Accept command

If these don't help you, then you need to ask either on the use  
list or in chatrev :)



You forgot to mention the secret handshake. :-)

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


Re: Sockets

2005-12-11 Thread Dave Cragg

This time I'll try to be more helpful.

On 11 Dec 2005, at 21:34, Graham Samuel wrote:


Sockets, do we need them


If you just need to connect to internet URLs, you can use the get  
URL, load URL, etc, calls, and not have to know anything about  
sockets. But if you want to do something more fancy, such as build  
your own web server, mail client, or completely new internet protocol  
(see below), then you probably need to know a little. (But I can tell  
you from my involvement with libUrl, you don't really need to know  
that much, at least if you're doing these kind of things in Rev.)


and is the term just a token or does it carry some metaphorical  
meaning?


Both of those I guess. The term socket is not just a Rev  
expression, but is used in all computer development environments. A  
socket is part of the connection that computers use to communicate  
with each other on TCP/IP networks such as the internet and on  
intranets too.


The following description/analogy may not be strictly accurate, but  
I've found it quite helpful.


Remember those old-fashioned telephone switchbords where the operator  
stuck wires into various holes on the board. Well, imagine your  
computer has a similar board inside with a lot of holes numbered from  
1 to 65000 or thereabouts. And the computer you want to connect to  
(for example, the computer that hosts www.runrev.com) has a similar  
set of holes. To connect your computer to the runrev computer, you  
can imagine connecting a wire in one of the 65000 holes in your  
computer and connecting it one of the holes in the RunRev computer.  
The sockets are the endpoints of the connection. However, with Rev,  
we don't really need to think about the endpoints too much, and it is  
often easier just to think about the connection itself. However, much  
as I'd prefer to script this:


  open connection to www.runrev.com

you have to script this:

  open socket to www.runrev.com #(not quite correct, but see later)

Now remember those 65000 or so holes on the board in your computer,  
and the other 65000 holes on the renRev computer. Well those holes  
are called ports, which is easy enough to understand. So are  
sockets and ports the same? Not exactly as you can open many sockets  
to a single port (Many wires to one hole). But from a Rev  
perspective, they're pretty similar.


Unfortunately, when you want to connect to the runrev computer, you  
can't just connect to any old port (numbered hole) on the runrev  
computer. Many of the ports have specific functions, and you have to  
connect to the right one. For example, if there is a web server   
running on the runrev computer, it is most likely linked to port  
(hole) number 80, as that's the default for web servers.


So when you do something like this:

  get url http://www.runrev.com/index.html;

libUrl assumes that the htpp server is running on port 80, and so  
does the following as part of its stuff:


open socket to www.runrev.com:80

(You *must* include the port number when you open a socket, which is  
why the example earlier was wrong.)


OK. So once you open a socket, what do you do? Well, you write data  
to the socket, and read data from it. (That's about all you can do.)  
If your connecting to a standard server such as a web server, mail  
server, or ftp server, there are protocols which dictate exactly  
what you have to write and read. These protocols are described in  
documents called RFCs which are no fun to read but will help send you  
to sleep when you're on a long flight. (Threaten the kids with one  
for Christmas!)


So rather than wrestling with an established protocol, it's probably  
easier to learn sockets by inventing a brand new protocol. (Really.)  
But to do this, you have to build the server part of the connection  
too. However, this is amazingly easy. The key syntax to running a  
server, is the following script:


  accept connections on port port number with message some handler

But if you want to see how simple this can be to get started, you can  
try running the following client script. I have a Rev server  
running here right now  that implements a simple protocol I invented  
while writing this mail. :-)


To run the client, you need to make a stack with two fields and one  
button. Name the fields in and out. Put some text in field  
in (keep it below 10K to save my bandwidth). Put the following  
script in the button:


on mouseUp
  put 193.109.51.205:8081 into tS
  open socket to tS with message connected
end mouseUp

on connected pS
  put field in into tData
##uncomment following line to see server script
## write script  cr to socket pS
  write length(tData)  cr to socket pS

  write tData to socket pS with message readLineOne
end connected

on readLineOne pS
  read from socket pS for one line with message readmore
end readLineOne

on readmore pS, pData
  if word 1 of pData is a integer then
repeat until length(tRD) = word 1 of pData
  read from socket 

Re: Sockets

2005-12-12 Thread Dave Cragg


On 13 Dec 2005, at 01:40, Jim Hurley wrote:

Like Graham, I too would like to thank Alex and Dave for their  
detailed discussion of sockets.


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


Looks like it got all wore out after one use.


I hope not. People will want their money back. :-)

The server script appears to be still running here, but I'm  
connecting over an internal network, and so use a different IP  
address from the one in the script I posted.


You'll have noticed a complete lack of error checking in the script I  
posted, and also on the server script if you managed to retrieve it.  
Error checking is lesson 2. :-) Unfortunately, I have to go Christmas  
shopping shortly (I promised), so I can't do much right now. You  
could add a socketError handler to the script. The sample handler in  
the Rev docs (under socketError) should be fine.


Setting a breakpoint may not be so useful. I haven't tried this  
recently, but in the past I found it difficult (impossible) to use  
the debugger with asynchronous behavior like this. Instead, you might  
want to add lines to the script that record values to another field.


For example, add the following log handler

on logit pData
 put pData  return after field log
end logit

and then add log sttaements wherever you want to inspect something.  
For example:


on readLineOne pS
  logit readLineOne  pS ##DEBUG
  read from socket pS for one line with message readmore
end readLineOne

Cheers
Dave
___
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: Getting a URL form a logged in site

2005-12-21 Thread Dave Cragg

On 21 Dec 2005, at 02:38, Brian Yennie wrote:


Dave  Dennis,

Those headers you report are a redirect which probably needs to be  
followed.
What happens if you follow the URL indicated in the Location  
field? That URL seems to indicate from it's name that is has  
something to do with setting cookies.


You should follow Brian's suggestion. I haven't really followed all  
of this thread, sorry.


By the way, libUrl will automatically follow redirects if the  
original request is a GET, but won't follow them for POST requests.  
(This follows the http rfc spec.) I'm assuming your login request  
used POST.


To extract the Location url:

put libUrlLastRHHeaders() into tRHHeaders
put lineOffset(Location:, tRHHeaders) into tLocLine
if tLocLine  0 then
  put word 2 to -1 of line tLocLine of tRHHeaders into tNewLoc
end if

Cheers
Dave

___
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: revOpendatabase: 10061 can't connect error

2005-12-21 Thread Dave Cragg


On 21 Dec 2005, at 04:15, N Cueto wrote:


Hello All,

 Just this morning, I installed mysql (5.0, Win)
 and then used revOpendatabase to connect.
 On the machine where mysql is actually
 running (localhost), RunRev can connect
 to the database. But from the other networked
 machines, a can't connect (10061) error
 is the result.

 My guess is that firewall software is blocking
 the TCP/IP port, but I don't know how to
 confirm this guess (the sys-admin comes
 tomorrow). Or maybe it's something else.


I'm assuming 10061 is a Winsock error, in which case it means the  
connection was actively refused by the server. I guess it may be a  
firewall setting as you say, or possibly a mySQL configuration  
setting. (I don't know anything about mySQL on Windows, sorry.)


Cheers
Dave
___
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: SQLite Issue

2005-12-27 Thread Dave Cragg


On 27 Dec 2005, at 04:52, Scott Kane wrote:

I'm getting the result It
rather than the value of the field (in the example
below the field is called edName).

  -- COLLECT name AND email
  put name,email into tColumnItems
  repeat for each item I in tColumnItems
--ask question New value for column:   I
put Field edName into i
--if it is empty or the result is cancel then exit to top
put '  cleanSQL(it)  '  , after tRowData
  end repeat


Is the item variable a lowercase L or an uppercase i?

Anyway, you should try one of the follwing:

  put '  cleanSQL(i)  '  , after tRowData

or

  put field edName into it

or

  get field edName

Cheers
Dave
___
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: One cute hack for MacOS X (... or nice internet protocol helper hacks...)

2006-01-03 Thread Dave Cragg


On 3 Jan 2006, at 06:57, Richard Gaskin wrote:


Andre Garzia wrote:

On Jan 3, 2006, at 3:43 AM, Ken Ray wrote:
That's so cool, Andre! Nicely done... any idea on how to do it  
on  Windows?


;-)
I bet it's a registry hack, might even be easier than Macs...  
I'll  find out and tell you! ;-)
the beauty of this solution is that the stacks never touch the  
disk,  it's all on memory, the GURLGURL event will tell rev a URL  
and Rev  will load it on the fly. It's not like Safari downloading  
the stack,  taging it as a safe file type and loading after the  
download. I don't  know if we have this kind of flexibility in  
windows, but I'll do some  research!


Is there a way to have a user set this up without having to do it  
manually themselves by downloading that specialized app?


It would be ideal if this could be set up via AppleScript, driven  
by the click of a button in our apps


Wouldn't this be opening up a huge security hole for users if it  
could be done this easily? If I understand this correctly, this would  
be similar to the help protocol security issue that was around with  
OS X 10.2.8 (or thereabouts). See the following URL.


  http://mamamusings.net/archives/2004/05/18/ 
serious_os_x_security_problem.php


Andre wrote:

What can you do with things such as this? Well, you can create  
educational resources as HTML and create little demo stacks, when  
the user clicks on the demo stack links inside the HTML, the app  
will load on demand inside Revolution (or Dreamcard player,  
whichever is available, you could even create your own loader using  
splash techniques), which would be a very easy student user  
experience.


Unfortunately, I think someone could also add links in web pages to  
stacks  that read/delete your hard drive contents, install and launch  
other apps, etc.


Sorry to be the doom merchant. :-)

Cheers
Dave
___
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: One cute hack for MacOS X (... or nice internet protocol helper hacks...)

2006-01-03 Thread Dave Cragg


On 3 Jan 2006, at 20:38, Chipp Walters wrote:



I'm just not a fan of securemode, especially if one is trying to  
create a real application which runs from the web.


I agree with you there. It's limitations are pretty crushing.

Your idea is interesting. But I'm not comfortable with the idea of  
registering safe stacks. And I'm also not sure how stacks can be  
determined as safe. I see there being two types of unsafe stack:   
those with malicious intent and those which are just badly  
programmed. Both are capable of damage.  So I'm still hoping for a  
way to prevent stacks from doing damage, but without the current  
secureMode limitations.


One idea I've toyed with is to always run the stackRunner/player  
app in secureMode, but have a helper app  which runs in parallel,  
and which is not in secure mode. The main app would communicate with  
the helper app over a socket using a private protocol. The helper app  
would perform a limited number of actions that secureMode prohibits.  
For example, write to a cache folder, launch a limited number of  
applications, run some predefined shell commands, etc. (I'm thinking  
of a variety of stack runner type apps that seve different  
purposes, so the allowed actions might vary among implemetations.)  
The main app would have an API which is open to other stacks and  
which would allow them to take advantage of the helper app.


I believe the Dreamcard Player uses a helper app like this to store  
preferences, even when in secureMode. But I haven't looked into it in  
great detail.


I'd be interested to hear from anyone that has tried to implement  
something like this. Right now it's only an idea in my head, and  
before having a go I'd appreciate any advice/warnings of possible  
pitfalls.


Cheers
Dave




___
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: SSL Certificates on OSX (Dar :)

2006-01-09 Thread Dave Cragg


On 6 Jan 2006, at 14:57, David Bovill wrote:


Has anyone used SSL certificates on OSX with Rev?


A little. So this is definitely not expert advice.




I have created and downloaded a certificate from www.cacert.org but  
I am not sure if this is what is required. The file is  
[EMAIL PROTECTED] and not a .pem file. Also I am not  
sure where to put it or how to work with keychain access - any  
pointers?


David, what is it you want to do with this certificate? Use it to  
provide your own secure web server, or to verify connections to https  
sites secured with certificates issued by CAcert? I'm assuming the  
latter. If that's right, then I *think* you will need a different  
certificate. I'm guessing the certificate you mention above is your  
personal certificate for securing websites, mail, etc.


I tried this:

From the following url

   https://www.cacert.org/index.php?id=3

download the Class 1 (PEM format) Root Certificate. (This will be a  
file named root.crt)


Then set the sslCertificates to this file:

   set the sslCertificates to /whatever/root.crt

Then to test, try to connect to ths test url:  https://www.cacert.org/

   put url https://www.cacert.org/; into tData
   if the result is not empty then
 answer the result
   else
 answer seem to be working
   end if

There should be no need to use libUrlSetSSLVerification. It is true  
by default, but if you have previously set it to false, then you  
should reset it to true. It certainly won't harm to specifically set  
it to true.


I had some mixed success with this root.crt file. I could connect  
more often than not to the test url, but I also got a lot of socket  
timeouts. (on OS X 10.4.3)


Good luck!

Dave

___
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: url GET https requests -- walking thru certificate issues

2006-01-09 Thread Dave Cragg


On 10 Jan 2006, at 01:59, Sivakatirswami wrote:


Does anyone know a way to get libURL to walk thru these server  
responses, just like a user would in a browser?


Did you try this?

   libUrlSetSSLVerification false

It won't let you walk thru, but may let you skip them altogether.

Dave
___
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: The formatted mouseline?

2006-01-12 Thread Dave Cragg


On 12 Jan 2006, at 16:16, Mark Swindell wrote:

I'm looking for the location of the formatted line, or its  
coordinates relative the field, so that I can place a graphic (an  
underline or somesuch) under the text of that formatted line.  This  
has to be derived from the mouse position relative to the formatted  
line position as this graphic will move based on where the mouse is.


Not perfect, but something like this in the field script (graphic 1  
is the graphic to be moved):


on mouseMove
  put the mouseChunk into tMC
  if tMC  empty then
get the formattedRect of tMC
set the top of graphic 1 to item 4 of it
  end if
end mouseMove

I'm assuming the graphic width would be set to the width of the field.

One limitation is that when the mouse moves over empty space at the  
end of a line, the mouseChunk returns empty. I can't think of a way  
round that.


Cheers
Dave
___
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 Newby Questions

2006-01-16 Thread Dave Cragg

On 16 Jan 2006, at 23:02, Ben Bock wrote:

I have a timed quiz spread across several cards, each card has a  
Next Page button.  The quiz starts with a button.


To start the quiz, a button has:

on mouseUp
startTimer
go next
end mouseUp


The card script has:


on startTimer
send timesUp to me in 120 seconds
end startTimer

on timesUp
go card Finish Card
end timesUp



It's probably better to place these handlers in the stack script.  
(see below)


Here are two possible approaches:

1.

In the stack script:
---
local sTimerOn

on startTimer
put true into sTimerOn
send timesUp to me in 120 seconds
end startTimer

on timesUp
  if sTimerOn then
go card Finish Card
  end if
end timesUp

on NeverMind
  put false into sTimerOn
end NeverMind
--

2.

In the stack script:
---
local sTimerID

on startTimer
send timesUp to me in 120 seconds
put the result into sTimerID
end startTimer

on timesUp
go card Finish Card

end timesUp

on NeverMind
 cancel sTimerID
end NeverMind
--

In both cases, the two mouseUp handlers you currently have should  
work fine.


Note that it's important that the script local variables (sTimerID  
or sTimerOn) are declared outside the handlers. In this way they can  
be be shared by all the handlers in the stack script.


Cheers
Dave
___
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: revMail, OSX 10.4.4 and Umlaute

2006-01-16 Thread Dave Cragg


On 17 Jan 2006, at 06:53, Sarah Reichelt wrote:



revmail [EMAIL PROTECTED],Hier Ausfüllen,Text of Mail

doesn´t work, but



I had a look at the script in the revCommon library and it contains
the following lines:
put urlEncode(pSubject) into pSubject
put urlEncode(pBody) into pBody
replace + with %20 in pSubject
replace + with %20 in pBody

I would have thought they would make it work, even with umlauts, but
in fact, when I commented them out, it all worked fine.


Using utf8 for the subject and message text also seems to work.

 put uniDecode(uniEncode(Hier Ausfüllen),utf8) into tSubject
 revmail [EMAIL PROTECTED], tSubject,Text of Mail

As with Sarah's solution, I don't know what will happen with other  
mail clients. But at least you can avoid editing the rev library.


Cheers
Dave___
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: revMail, OSX 10.4.4 and Umlaute

2006-01-17 Thread Dave Cragg


On 17 Jan 2006, at 07:21, Dave Cragg wrote:



 put uniDecode(uniEncode(Hier Ausfüllen),utf8) into tSubject
 revmail [EMAIL PROTECTED], tSubject,Text of Mail



Sorry, I repeated the original syntax error. It needs an extra comma.


  put uniDecode(uniEncode(Hier Ausfüllen),utf8) into tSubject
  revmail [EMAIL PROTECTED],,tSubject,Text of Mail

Cheers
Dave___
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 of keyword https

2006-01-23 Thread Dave Cragg


On 23 Jan 2006, at 19:17, Timothy Bleiler wrote:


Thanks for the reply,

I think I have the SSL  Encryption library that comes with Rev. Is  
there something else I need?


--Tim Bleiler


You'll need to set the sslCertificates property to a suitable file.

Or, if you don't mind not verifying the server, you can use  
libUrlSetSSLVerification false to avoid the need for a  certificate  
file.


Cheers
Dave
___
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: nested ifs

2006-01-25 Thread Dave Cragg


On 25 Jan 2006, at 10:32, Chipp Walters wrote:


I like to do the following:

if tResult is Error then
  answer Go Ahead anyway with Cancel or OK
  if it is Cancel then exit to top
end if

Most of the time it compiles, but sometimes the single line if  
statement in the middle throws and error and won't compile, so I'm  
forced to do:


The problem seems to occur before an else line.

If x  y then
  doSomething1
  if a = be then doSomething2 ##problem here
else
  doSomethng3
end if


I've always assumed (without any deep investigation) that it was a  
result of the engine's tolerance of various if constructions. For  
example the following compiles:


 if 1  2 then put 2
 else put 1

While we're on the subject, could someone who likes to use the then  
on the following line syntax please explain the advantages. I've  
always found it confusing when I come across it, but  there must be a  
reason for using it that I haven't yet grasped.


Cheers
Dave
___
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 save data from standalone?

2006-02-06 Thread Dave Cragg


On 6 Feb 2006, at 21:54, Marielle Lange wrote:


Using pathToUsersDocumentsFolder would therefore be a better  
approach, but I don't really want to create a file within this  
folder as the file is in a completely adhoc format that would  
puzzle anybody who come across it.


It's not uncommon to see folder and files created by various  
applications in the OS X Documents folder (specialFolderPath 
(docs)). In mine I see the following folders:


Acrobat User Data
Adobe Reader
AppleWorks User Data
Eudora Folder
Finding Out (children's learning prgram)
Micosoft User Data
ScanWizard 5 Folder
Virtual PC List

And most of the files in these folders are puzzling, to say the least.

On Windows, the user's Application Data folder (specialFolderPath 
(26)) is the normal place to put this kind of stuff. Although on a  
standard Window's installation, this folder is invisible, and it can  
be tricky to direct a user to find the folder if, for example when  
things go wrong, you ever need them to delete it, or retrieve a file.


There's also a Local Settings version of the Application Data  
folder (specialFolderPath(28)) which will always remain with the  
local machine and won't get transferred to a user's network roaming  
profile. It's typically used for cached data that isn't critical but  
may be large.




Has anybody ever tried the User/Library/Application  
Support   way? Is there any problem associated with this solution?


I don't think there's a direct way to get this path using  
specialFolderPath. However, you can use specialFolderPath(asup) to  
get the root level Application Support folder path (e.g. /Library/ 
Application Support) and then append this to the $HOME environment  
variable.


  put $HOME  specialFolderPath(asup) into tAppSupPath

For a full listing of the specialFolderPath codes, see Ken Ray's site:

http://www.sonsothunder.com/devres/revolution/tips/file010.htm

Cheers
Dave
___
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: liburl cgi linux

2006-02-07 Thread Dave Cragg

On 7 Feb 2006, at 04:13, Thomas McCarthy wrote:



I'm running rev's Linux engine on my ISP.
Is there a problem with the POST command?


I'm assuming you want to post *from* the cgi (and not to it).

In that case, you'll need to have the libUrl library loaded somehow.

From the archives:



Create a new mainstack and name it myLibUrl (or whatever) and save  
it as myLibUrl.rev.


In a button, put the following script (take care of wrapping in mail):

on mouseUp
set the script of stack myLibUrl to the script of button  
revlibUrl \

of stack revLibrary
set the customproperties of stack myLibUrl to the customproperties \
of button revlibUrl of stack revLibrary
set the customProperties[cFtpGoodCodes] of stack myLibUrl to \
the customProperties[cFtpGoodCodes] \
of button revlibUrl of stack revLibrary
save stack myLibUrl
end mouseUp

I've never done the next bit, but I understand it works. (Someone  
please tell us if I'm wrong.)


Place the myLibUrl stack in the same location as your cgi script.  
Near the top of your cgi script, put the line:


start using stack myLibUrl.rev


Cheers
Dave
___
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: liburl cgi linux

2006-02-07 Thread Dave Cragg


On 7 Feb 2006, at 14:14, Thomas McCarthy wrote:




I'm assuming you want to post *from* the cgi (and not to it).


Yes


In that case, you'll need to have the libUrl library loaded somehow.


That's how I got it working before (Unix host, bsd rev engine). Now  
with a Linux server, it doesn't appear to be working...hmm anyway  
of checking? is there a site I can post to to check? Could be a  
useful tool.


I just tried and realised the likely problem.

Did you make the myliburl.rev file from a recent version of Rev? If  
so, the libUrl script will cause a problem with the older cgi engine.  
Versions of liburl from 1.1 or later include the open secure socket  
syntax  which Rev engine versions prior to 2.6.1 won't like.


Two ways round this:

Make the myliburl.rev stack with an older version of Rev.

or

After making the myliburl.rev stack, edit the stack script and search  
for lines that contain open secure socket (there should be 2) and  
comment them out.


I just did the latter, and I can post from the cgi script on a Linux  
server.


Cheers
Dave
___
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: FTP via put opens files but fails to write data?

2006-02-08 Thread Dave Cragg


On 8 Feb 2006, at 04:38, Sivakatirswami wrote:


This FTP script below frequently fails

I get three files on the server with the correct name, but no data  
is written to them



Typically, that's a symptom of a problem with the data source part of  
the put.




 repeat for each item x in tImages
   put url (tLocalLocation  x) into url (tRemoteLocation  x)
 end repeat
end uploadImages


You should check the url (tLocalLocation  x) part is valid before  
trying to upload the data.


  Ex,

  put url (tLocalLocation  x) into tUploadData
  if the result is not empty then
  ##  do error stuff here
  else
   put tUploadData into url (tRemoteLocation  x)
   -- check the result here
  end if

Cheers
Dave
___
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: Write File From Cache Really Slow?

2006-02-08 Thread Dave Cragg

On 8 Feb 2006, at 08:47, Ken Ray wrote:


Hi,

I'm downloading files via HTTP with 'load URL' and then I'm writing  
them to
disk with put url... into binfile. Everything works fine, but it  
takes a
really long time to write the data to disk. For example, if I  
download a
12MB file into the cache, it takes well over a minute to write it  
to disk.


That's slow, and sounds suspiciously like the url is being downloaded  
a second time. Could you use libUrlSetLogField to see if that might  
be happening?





So two questions: (1) is there any other way I can get a 'loaded'  
file to
disk other than the way I'm doing it, and (2) if not, is there  
anything I

can do to speed it up?



You could use libUrlDownloadToFile to download directly to a file.  
Contrary to what the docs might imply, it can be used with http urls.


Cheers
Dave

___
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: liburl cgi linux

2006-02-08 Thread Dave Cragg

On 7 Feb 2006, at 23:37, Thomas McCarthy wrote:




I just did the latter, and I can post from the cgi script on a Linux

server.

I forgot to ask, how did you test it?


The hard way. :-)  I checked the Apache error log on the server which  
gives the line in the CGI script where the error occurred. In this  
case it was the start using stack myliburl.rev line. Then, as I  
was responsible for adding the open secure socket line to libUrl, I  
had a jump start on guessing the problem. (unfair, I know)




Do you have an easy way to test that anyone could use?


Afraid not. You can do syntax checking by putting the cgi script in a  
button and making sure it will compile. But that won't catch runtime  
errors like this.


Where possible, I try to build new cgi scripts around old ones that I  
know work. And then build them in stages, testing as I go. A local  
test server is useful for this, but not always practical.  Putting   
the script in a try handler can help, with the catch element  
returning some useful diagnostic information.


But I'm always on the lookout for simpler solutions.

Cheers
Dave
___
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 does a stack know it's been opened from a cgi?

2006-02-08 Thread Dave Cragg


On 8 Feb 2006, at 17:06, Ken Ray wrote:


Hi, I have a library that I want my CGI to 'start using', but it is
important that the library know whether it is being loaded from a  
CGI, or

whether it's being loaded from a normal stack.

What can a stack do to test whether it's being loaded from a CGI or  
not?


The library stack will show the openStacks as empty when called from  
a CGI, assuming the cgi hasn't opened any other stacks. Could you use  
that?


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


Re: Setting a tabbed button

2006-02-09 Thread Dave Cragg

On 9 Feb 2006, at 19:12, Dar Scott wrote:

I forgot how to set a tabbed button.  In my app the first card  
comes up at the start but the button is in some leftover state.


Hi, Dar. We've not seen you for a while.

To get the tabbed button to correspond to the initial state, you can  
do either of these:


  set the menuHistory of button myButton to 1

or

  set the label of  button myButton to whatever its label is

Both of these will act as though the tab had been clicked. If you  
want to stop that happening, use lock message before setting the  
label/menuHistory.


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


Re: Setting a tabbed button

2006-02-09 Thread Dave Cragg


On 9 Feb 2006, at 21:17, Dave Cragg wrote:
Both of these will act as though the tab had been clicked. If you  
want to stop that happening, use lock message before setting the  
label/menuHistory.


Oops. Should be lock messages

Dave
___
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 Bump

2006-02-09 Thread Dave Cragg


On 10 Feb 2006, at 07:06, Scott Rossi wrote:


function compareData set1,set2
  repeat for each item V in set1
put max(V,item 1 of set2) after tData
delete item 1 of set2
  end repeat
  return tData
end compareData


Here's one way.

function compareData set1,set2
  split set2 by comma
  put 0 into tCount
  repeat for each item V in set1
add 1 to tCount
put max(V,set2[tCount]) after tData
  end repeat
  return tData
end compareData

Cheers
Dave
___
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: send mouseUp real click

2006-02-17 Thread Dave Cragg


On 17 Feb 2006, at 11:36, sims wrote:

I have an OS X app which uses an external, it collects data and all  
runs fine.


If that computer is set to 'sleep', upon wakeup the external is not  
collecting that data.


If I then physically use the mouse to click a btn to stop  restart  
that external it works fine (external collects data properly)


If I use a  send mouseUp to that btn it does not work the same as  
when I physically click with the mouse

(the external does not collect data)

I have tried all sorts of 'send in X seconds' and still no happiness.

Is it possible that sending a 'mouseUp' to a btn is different than  
an actual mouse click?


It's different in the sense that a click will generate both mouseDown  
and mouseUp events. So if your mouseUp depended on anything that be  
set by mouseDown, Klaus's idea is probably better.


Also, manual clicking will ensure that the stack with the button is  
the defaultstack and possibly the topstack. Depending on what action  
your mouseUp handler takes, could that be a factor?


Cheers
Dave
___
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: send mouseUp real click

2006-02-17 Thread Dave Cragg


On 17 Feb 2006, at 11:48, sims wrote:


At 12:46 PM +0100 2/17/06, Klaus Major wrote:


I have an OS X app which uses an external, it collects data and  
all runs fine.
If that computer is set to 'sleep', upon wakeup the external is  
not collecting that data.
If I then physically use the mouse to click a btn to stop   
restart that external it works fine (external collects data  
properly)
If I use a  send mouseUp to that btn it does not work the same  
as when I physically click with the mouse

(the external does not collect data)
I have tried all sorts of 'send in X seconds' and still no  
happiness.
Is it possible that sending a 'mouseUp' to a btn is different  
than an actual mouse click?

Any suggestions?


you could try

click at the loc of btn the one that wants to be touched physically

Maybe that will work...(?)


Tried that, doesn't work.  Flowers  chocolates have no effect  
either  ;-)




Sounds like you're clicking the wrong buttons.

Dave
___
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: Retrieve List of Array Properties?

2006-02-18 Thread Dave Cragg


On 18 Feb 2006, at 20:07, Jeanne A. E. DeVoto wrote:


At 11:59 AM -0800 2/18/2006, Scott Rossi wrote:

If I set some custom properties of an object via an array:

  set the specialData[cool] of fld 1 to hello
  set the specialData[hot] of fld 1 to world

...how do I retrieve a list of the custom property names (are  
these called

indexes?) of the object?  (cool, hot, etc)


There are a couple of ways. One is to use the customKeys to get the  
current set of custom properties, after first setting the current  
property set to the one you want:


  set the customPropertySet of field 1 to specialData
  put the customKeys of field 1 into myPropertyList

Alternately, grab the whole array of custom properties, then get  
the array's keys:


  get the customProperties[specialData] of this stack
  put the keys of it into myPropertyList

The second way is probably cleaner: it doesn't change the current  
custom property set.


One further way...

  get the customKeys[specialData] of field 1


Cheers
Dave
___
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: Retrieve List of Array Properties?

2006-02-19 Thread Dave Cragg


On 19 Feb 2006, at 04:05, Ken Ray wrote:

On 2/18/06 7:50 PM, Richard Gaskin [EMAIL PROTECTED]  
wrote:



Scott Rossi wrote:

Recently, Dave Cragg wrote:

One further way...

 get the customKeys[specialData] of field 1


*THIS* is what I had in my mind of how it should work, but  
couldn't get the

syntax right.  Thanks very much Dave.


Whoa.  Never seen that before.

I have mixed feelings about the syntax, wondering whether () might be
more appropriate than [] in that context.

Has this been in the docs all these years and I've somehow missed it?


I know what you mean! It *isn't* in the docs AFAICT, so it just  
goes to show

you can certainly teach an old dog new tricks..


Does that make me a spring chicken? :-)

It's probably my old doggish behavior that accounts for me knowing  
this. The array style runs right through all the syntax relating to  
custom properties, and allows you to avoid specifically setting a  
customPropertySet. Being so set in my ways before the  
customPropertySet syntax was introduced, I've never really adapted to  
it, and rarely think in terms of different property sets.


I always think of customPropertySets as being alternative sets of  
properties, For example, different language versions of error  
mesages, or different settings for different platforms. In these  
cases, it would make sense to set a customPropertySet at startup and  
use that for the rest of the session.


But I find I more often use custom properties to store structured  
data, so have properties such as cUser[id], cUser[name], cUser 
[zodiacsign]. In this case, I don't think of there being a  
customPropertySet named cUser, but a single property named cUser,  
with many attributes. Thus my preference for the array syntax.


Cheers
Dave
___
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: Switch versus if/then/else ( was: Main menu puzzle, Klaus)

2006-02-19 Thread Dave Cragg


On 19 Feb 2006, at 05:27, Judy Perry wrote:


Yes, but do you think in these terms in day-to-day life?


Well, yes.

When the doorbell rings, I don't think like this:

if it's the postman
  I'll say good morning
if it's the taxman
  I'll get my gun
if it's the neighbor
  etc,

Instead, I'm more likely to think who could that be, and compile a  
list like this ...


  postman
  milkman
  delivery man

  taxman
  police
  bailiff
  mother-in-law

  daughter's boyfriend

  son's girlfriend's father

...which lends itself to a switch/case structure.

So depending on the situation, both approaches can seem quite natural.

Cheers
Dave
___
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: Frustration: put after URL...

2006-02-20 Thread Dave Cragg


On 20 Feb 2006, at 13:20, Thomas McCarthy wrote:



Testing out my PayPal thing and running into a few walls:

My brand new Windows XP (home edition) is not allowing my stack to  
put some text into my remote file server.


 put  cr  theText after URL ftp://username:[EMAIL PROTECTED]/ 
revproject/reg/key_log.txt


This has worked on every other computer, even on the same network..  
Could there be some XP setting I need to...uhm, set?


First, I didn't even know you could use put  after url with an  
ftp URL. But sure enough, it works.


(By the way, the engine makes two calls to the url to do this. First  
it retrieves the entire url from the server, then writes back the  
retrieved data with the new data appended. So this may not offer the  
efficiency you expected.)


That said, I just tested this on 2.7 on Win XP, and it works fine here.

Do you get any error messages?

Cheers
Dave



___
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: Frustration: put after URL...

2006-02-20 Thread Dave Cragg


On 20 Feb 2006, at 23:51, Thomas McCarthy wrote:


Yes, I was looking for efficiency as well as privacy (not to  
mention simplicity!). I didn't want to do this via getting a cgi;  
as I understand it, those calls can be read. (is this still true if  
one does it through rev and not with the user's browser?)


I'm not quite sure what you mean by read. But in terms of data  
going over the wire, ftp is just as readable as http/cgi. If you mean  
that the workings of a cgi form can be easily read by looking at the  
html source, then this is easily hidden in a Rev stack.




However, if there is a question of some users' system settings  
blocking this, as Bruce said, then I will rework it into a cgi  
call. There are some other parts of the program that use  
'put...after url' for updating records, so I'll rework those as well.


I've had a couple of reports of ftp troubles with 2.7. There is a  
small change in the libUrl version distributed with 2.7 that affects  
ftp transfers (designed to get around a problem a few users had  
reported with previous versions). However, I'm waiting for log  
reports to see if the problems and the change are connected in any  
way. If you could get the transaction data for the bad ftp calls  
(libUrlSetLogField), I'll take a look .


Cheers
Dave
___
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: Blend Level in Fields

2006-02-22 Thread Dave Cragg


On 22 Feb 2006, at 03:07, Scott Rossi wrote:


Recently, Sivakatirswami wrote:


Is there some trick for setting transparency in fields   (blend)
such that the foreground color (the textcolor) is not affected by the
blend level? I tried all the ink options... nothing works.


I don't think it's possible yet to set the opacity of the field's  
background
separately from its content.  Regardless, it doesn't seem that big  
a deal to
set the field's opaque to false and place a translucent image (or  
graphic

under 2.7) behind.


I'm a novice in this area, so forgive me if my ignorance shows.

If the text is black, I've found setting the ink to blendMultiply,  
then adjusting the backcolor as appropriate can give a similar effect.


Also, on OS X, setting the ink to blend doesn't seem to affect the  
text color, only the backgroung color. But it affects both on Win XP.


Cheers
Dave
___
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: Transcript and Dot Notation

2006-02-26 Thread Dave Cragg


On 26 Feb 2006, at 09:04, Richard Gaskin wrote:


The Secret Cause of Flame Wars
By Stephen Leahy

Don't work too hard, wrote a colleague in an e-mail
today. Was she sincere or sarcastic? I think I know
(sarcastic), but I'm probably wrong.

 According to recent research published in the Journal
 of Personality and Social Psychology, I've only a
 50-50 chance of ascertaining the tone of any e-mail
 message. The study also shows that people think they've
 correctly interpreted the tone of e-mails they receive
 90 percent of the time.

 That's how flame wars get started, says psychologist
 Nicholas Epley of the University of Chicago, who
 conducted the research with Justin Kruger of New York
 University. People in our study were convinced they've
 accurately understood the tone of an e-mail message when
 in fact their odds are no better than chance, says Epley.
 


What do you mean by that? :-)

Cheers
Dave
___
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: Long load times

2006-02-27 Thread Dave Cragg


On 27 Feb 2006, at 23:49, Mark Talluto wrote:

I have a stack that has a 45MB disk image in a custom property.   
When I load it into Rev 2.7, it loads instantly.  When I make a  
standalone out of it, it takes about 35 seconds to load.  I can  
load Rev and the stack in less than 10 seconds total.   This  
includes a number of plugins.  Why the large discrepancy?


Is the stack in the standalone password protected? This can increase  
load times. It's not usually noticeable, but with a 45MB stack, I  
guess it may become so.


Dave
___
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: Pie Chart Algorithms?

2006-02-28 Thread Dave Cragg


On 28 Feb 2006, at 21:29, Sivakatirswami wrote:

OK, was musing to make a simple pie chart: make a circle and set up  
the center point as a fixed variable and the point on the circle as  
the dynamic variable and draw radius lines programatically: seems  
simple enough.. but:


1) draw circle graphic with shift key down to constrain to perfect  
circle

2) name it oval1
3) msg box: put the points of grc oval1

result: nothing

I'm missing something... Where to go from here?


You might want to look at the arcAngle and startAngle properties for  
ovals.


Cheers
Dave
___
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: Read from StnIn from POST is still broken?

2006-03-07 Thread Dave Cragg


On 6 Mar 2006, at 10:17, Mark Waddingham wrote:


Hi Sivakatirswami,

Linux web server, Apache, call Rev CGI to receive incoming Post  
Data.  Beginning lines of script to read the incoming data -- see  
below (suggested as a possible fix years ago by Scott Raney)


(musings... it is possible that this is a client side problem?
--machine A with browser B cannot in fact encode large chunks of  
data and the name=value pair actually arrive to the server already  
truncated.. meanwhile
-- box C with browser D submits a large text chunk from the same  
form and it arrive just fine: result Rev get blamed for being  
intermittent failures... but he's really not the bad guy.


on startup
if $REQUEST_METHOD is POST then
put  into PostIn
repeat until length(PostIn) = $CONTENT_LENGTH
read from stdin until 
put it after PostIn
  end repeat
put  urlDecode (PostIn)  into tDataIn

split tDataIn by  and =
put keys(tDataIn) into tFields

.etc.


There is no reason I can see (engine-side) as to why post data  
should get truncated. That being said, however, you should ensure  
that you pass '-ui' to the revolution engine when running as a CGI.


Has that option always been there?? And does it mean we don't need a  
Darwin engine to run on OS X?





(i.e. the first line of a cgi script should be:
  #! /path to rev cgi/revolution -ui

[ The -ui option alters a few things internally, in particular  
disables attempts to create any GUIs and enables stdin/stdout on  
systems - such as Win32 - which don't by default have these enabled ]


Does using the -ui option on Win32 work with IIS? I was under the  
impression that the #! line wasn't read by IIS and it links the  
script to an executable using its own settings.


Dave
___
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: MagicCarpet Users and 2.7 bugs

2006-03-09 Thread Dave Cragg


On 9 Mar 2006, at 21:14, Chipp Walters wrote:


For those of you who use MagicCarpet:

The only serious bug I can track down has to do with FTP and  
libURL. Turns out Rev 2.7 won't upload propertly to our FTP servers  
with the new version of libURL (MagicCarpet plugin users should be  
aware of this!).


That said, Dave Cragg's already got a fix (and patch) and I assume  
it will find it's way into the dot upgrade of 2.7. If you're a  
MagicCarpet user and are using 2.7, I suggest you contact Dave  
Cragg for the libURL patch.




Just a word on this before you all flood me with requests. There was  
small change to the FTP routine in the libUrl version that ships with  
2.7. It was designed to get round a problem that some users had  
reported. Chipp's FTP server is the only one we know of so far to  
have a problem with the new libUrl version. So it's most likely some  
people will see an improvement with the version in 2.7, and most will  
see no change.


Below is some background to the problem, which might help you decide  
whether you are suffering from the issue Chipp mentioned. But if you  
are having FTP problems in general, please let me know, and I'll take  
a look. (If you could supply some log data by using  
libUrlSetLogField, it would help greatly.)


The background
Under 2.6.1 (and earlier )a few users had reported a problem with  
timeouts when uploading files (usually largish ones  100KB). The  
timeouts occurred at a stage in the FTP process immediately after the  
file had uploaded, when libUrl is waiting for a 226 completed  
message from the server. Some people reported switching to active  
FTP mode helped, but this didn't work in all cases. I started  
experiencing the same problem after installing a new (and cheap) ADSL  
router. The problem also occurred when using commercial FTP client  
applications. Taking a hint from one of Fetch's obscure settings  
designed for problematic NAT routers, I added an extra do nothing  
command (NOOP) at the end of the upload and before checking for the  
226 response. I understand that some other FTP client  
implementations employ a similar approach. This has worked in testing  
with a variety of servers. Chipp's is the first problem encountered.  
The error returned from Chipp's server is 421 Timeout (no new data  
for 900 seconds). The 900 seconds is misleading. The message comes  
long before that. But if you see a 421 result, then you may want to  
let me know, and I can send you a temporary libUrl patch.


Cheers
Dave

 
___

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: The templateField Keyword

2006-03-11 Thread Dave Cragg


On 9 Mar 2006, at 19:41, Gregory Lypny wrote:


Hello everyone,

I tried to create a field template using the templateField keyword,  
but it doesn't seem to work.  When I use the handler below, the  
text in newly created fields is Lucida Grande, but the size is 11  
instead of 12, and the height is 14 instead of 18.  What am I doing  
wrong?


Regards,

Gregory

on openStack
  set the textFont of the templateField to Lucida Grande
  set the textSize of the templateField to 12
  set the fixedLineHeight of the templateField to true
  set the textHeight of the templateField to 18
end openStack


Are these newly created fields made by using the Rev tool palette?  
I'd assume that Rev sets the templateField every time you create a  
field. That would explainwhat you see.


To create fields using templateField settings of your own, you need  
to use create field before anything else can change the  
templateField again. Something like this:



   on createField
 set the textFont of the templateField to Lucida Grande
 set the textSize of the templateField to 12
 set the fixedLineHeight of the templateField to true
 set the textHeight of the templateField to 18
 create field
 reset the templateField
   end createField

Cheers
Dave
___
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: The templateField Keyword

2006-03-13 Thread Dave Cragg


On 13 Mar 2006, at 00:03, Gregory Lypny wrote:


	What you say below is not how I expect templateField to work based  
on its description.  I thought that setting the templateField was a  
one-time thing and that it remained in effect until it was reset.   
Your handler based on the createField message would seem to make  
templateField unnecessary because you're changing the style of  
newly created fields using a script after they've been created,  
whereas the point of templateField is to set those properties  
before.  Am I misunderstanding what you've intended?



I think Dan's reply clears it up. There's no need to reset the  
templateField, although I learned it was a good idea back when I  
started with Metacard, and so have followed that advice like a good  
boy. ;-) I think the idea is that by immediately resetting the  
templatex, you don't leave any surprises around for the next time  
you create an object. But if you're solely in charge of what gets  
created, then I guess it doesn't matter.


The main point I wanted to make was that you should use create  
field in your own script to get a field that follows the template  
settings you have made. I don't think you can rely on the tool  
palette in the IDE to respect the settings you have made. I say this  
without knowing how the tool palette creates objects; I was just  
assuming it was likely to set the templateField itself before doing  
so. I also wasn't sure what the palette does after it has created an  
object, but Dan's reply suggests it sets back to the state it was in  
before.


Sorry for any confusion.

Dave

___
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: Deleting A Card

2006-03-13 Thread Dave Cragg


On 13 Mar 2006, at 07:31, Andy Calloway wrote:


Hiya all,

I'm still just playing with RunRev, but I've come across what  
appears to be
a problem. I created a mainstack and added seven cards (just  
running through
the tutorials). I've now come to do something proper with them but  
I can't

delete any of the cards.

I move to the card I want to delete, choose object- delete card,  
say 'yes',
but nothing happens. A bug or am I missing something peculiar to  
RunRev?




Check whether you have the cantDelete property of the card set. You  
can see this in the card property inspector (Object menu - Card  
Inspector)


Cheers
Dave
___
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: Would this be a situation for a Front Script?

2006-03-13 Thread Dave Cragg


On 13 Mar 2006, at 21:07, Garrett Hylltun wrote:


I have about 200 objects on a card, and I want to have mouseEnter  
and mouseLeave handlers for all of them, but instead of writing  
code for each one, would it be better to just use a front script to  
intercept these events?


Instead of a front script, handlers in the card script would probably  
be easier. This takes advantage of the Rev message hierarchy. If the  
mouseEnter and mouseLeave messages aren't handled in the objects  
themselves, the messages pass on to the card.




All of them will do the same thing, which is change the color of  
the background of each object on enter and then change it back on  
leaving. I have the objects named individually like this box1 all  
the way through box200.  So determining which object fired the  
event is not an issue.


Small suggestion, although perhaps not so important in this case.  
When you have many items named basically the same but appended with a  
number, I find it more useful to make the names into two words. For  
example, box 1, box 2, box 115, etc. Then it's easy to get the  
numbered part by using word 2 of the short name of whatever.


The handlers in this case might look like this:

## in card script

  on mouseEnter
if word 1 of the short name of the target is box then
   set the backcolor of the target to color
end if
  end mouseEnter

  on mouseLeave
if word 1 of the short name of the target is box then
   set the backcolor of the target to color
end if
  end mouseLeave

Cheers
Dave



___
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: Making the move...

2006-03-17 Thread Dave Cragg


On 17 Mar 2006, at 18:26, Mark Wieder wrote:


Marielle-

Friday, March 17, 2006, 4:44:16 AM, you wrote:


many Japanese management concepts such as Total Quality Control,
Quality Control circles, small group activities, labor relations. Key
elements of Kaizen are quality, effort, involvement of all employees,
willingness to change, and communication.


Having been involved with Total Quality initiatives, Quality Control
Circles, etc, on this side of the pond I can say from experience that
they are doomed to failure because of underlying cultural differences.
Labor and social relationships are not structured in western societies
to provide the level of trust and support required to allow them to be
effective.



Like Lynn, I've spent a long time in Japan, and my life still carries  
the trappings.


I agree with what you say, Mark, but I think it isn't the whole  
picture. In the early 80s, a guy at a Japanese steel company  
explained to me how his time was being taken up with visiting  
Americans determined to learn the secrets of Japanese TQC.  He felt  
they were wasting their time. Not because they were incapable of  
learning, but because there was nothing to learn. He said that  
Westerners will debate and evaluate various methods until they decide  
on the best approach. Japanese corporations, on the other hand, will  
take any method, good or bad, and make it work. Having subsequently  
worked with a number of large Japanese corporations, I think his  
comments were very shrewd. In other words, it's not that Japanese  
methods transferred to the west are doomed to failure, but rather  
that any method adopted by Japanese corporations is doomed to  
success. (But that was in the 80s, and plenty has changed since then.)


Cheers
Dave
___
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: FTP and cross platform issues...

2006-03-23 Thread Dave Cragg

Hi Mark

On 23 Mar 2006, at 00:56, Mark Schonewille wrote:


If you'd like to do a test, I'm working on an FTP client. Contact  
me off-list if you would like to give it a try.


I noticed the above on the list. I wondered if you were planning on  
using the current libUrl routines in your ftp client. The reason I'm  
asking is that I was planning to produce a separate FTP library that  
would duplicate most of  the existing  FTP stuff in libUrl, but also  
add some further features. If this is something that you might be  
interested in, or might help your client app, please let me know,  
especially if you had any requests for additional FTP features not  
currently in libUrl.


Although I've started on the new library (barely), I can't put a  
definite time on its completion right now. But I would like to get  
something completed over the next few weeks.


Cheers
Dave
___
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: FTP and cross platform issues...

2006-03-23 Thread Dave Cragg
Sorry. My previous post was meant to go directly to Mark. Please  
forget you read it. :-) So you won't be disappointed when nothing  
appears.


I should probably  learn how to use e-mail before messing around with  
libraries.


Dave


___
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: somewhat OT : Rev cgi Safari

2006-03-24 Thread Dave Cragg


On 23 Mar 2006, at 11:18, jbv wrote:


Hi list,

I'm using Rev cgi and have a problem debugging a script :
it's a (rather) complex subscription page to a website, with
a sophisticated form and javascript functions, and on the server
side a cgi with a mySQL connection.
Everything works fine except for 1 version of Safari. The agent
information for that version is :
Mozilla/5.0 (Macintosh; U; PPC Mac OS X; fr-fr) AppleWebKit/312.8
(KHTML, like Gecko) Safari/312.6

in short, some elements of the HTML form are skipped when the
user clicks the submit button...
And to make things even more difficult (to reproduce and correct
the bug, or find a workaround), this seems to happen only
sporadically; i mean that using that specific version of Safari
doesn't systematically lead to the bug...


Coming late to this.

Are you sure the problem is with Safari and not at the CGI end? When  
you say some elements of the form are being skipped, what appears at  
the CGI end? Are some arbitrary form elements missing, or is it that  
the posted data is truncated? (I'm assuming the form is using POST  
and not GET. If not, you can ignore this?)


If it appears that the data is truncated, it may be the reading of  
the data in the CGI that is the problem. There is a known issue  
concerning reading from stdin in a cgi script if you just do this:


 read from stdin for $CONTENT_LENGTH

To be sure you get all the data, you need to do something like this:

  put empty into tBuf
  repeat while length(tBuf)  $CONTENT_LENGTH
read from stdin for $CONTENT_LENGTH
put it after tBuf
  end repeat

If you know all this, my apologies. But just in case you're looking  
in the wrong place.


Cheers
Dave


___
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: FTP and cross platform issues...

2006-03-24 Thread Dave Cragg


On 23 Mar 2006, at 00:31, John Patten wrote:


Hello All...

I searched the archives and could not come up with a solution to an  
FTP problem I'm having.


I have an OSX Tiger Server configured for FTP. Everything works  
like it supposed to with both Fetch (Mac side) and FTP Commander on  
the WinXP side. No problem.


However, I've been trying to get the WindowsXP box and Rev to  
upload a simple text file to the server. No success. I have tried  
Andre FTP utility, a couple others from the member area, my own  
hacks using the examples in the rev docs, and finally Chip's FTPer  
utility. None of them would work. The best I could see was that I  
was getting a time out error.


I know there has been some discussion about passive/active/firewall  
issues, but I wonder if something else isn't amiss. On my own local  
network, with Win XP firewall on, I can upload to an OS X Tiger ftp  
server without problems. I've had the XP firewall on since the SP2  
release and have had no problems. I just reset the XP firewall  
settings to restore default settings and still have no problems,  
using both active and passive. (It seems to have upset my smb  
connection though. :-( )


FTP severs will generally handle both passive and active requests,  
unless specifically set otherwise. The problems over passive/active  
generally occur at routers/firewalls between the client and server.


Some questions: (apologies if they have been answered already)

Is the server on the local network or on the internet?

Is the OSX Tiger Server running OS X Server or just plain OS X? (I  
think they deploy different FTP servers, in case that's relevant.) In  
my case, it's plain OS X.


Are you running any other internet security software on either the  
client or server machine?


Can you get some log data using libUrlSetLogField in the client? This  
might help pin down where the problem is occurring?


What version of Rev and libUrl are you using? (put libUrlVersion()  
in the message box will give you the libUrl version.)


Cheers
Dave
___
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: Progress Bar Example

2006-03-24 Thread Dave Cragg


On 24 Mar 2006, at 21:42, Sarah Reichelt wrote:


On 3/25/06, Jeff Honken [EMAIL PROTECTED] wrote:


I would like to use a progress bar to monitor a go stack URL.   
I'm
clueless on how to write the code.  Does someone have an example  
of this

or can someone please point me in the correct direction. Jeff


I haven't done it using stacks, but I have done it for downloading
pictures from the web and I guess it's much the same. Firstly, you
need to use load instead of go. This is non-blocking and reports
it's status so you can show what's happening.


You can show status using go as well. libUrlSetStatusCallback works  
for both blocking (e.g. load url) and non-blocking (.e.g. get url)  
calls.


Below is the script of a *very crude* progress palette. The stack  
consists of two fields (one named url and the other named  
status), and a scrollbar (progress bar) named progress . Name the  
stack url_status (or anything you want).


Make this stack a substack of your main stack. Then somewhere (e.g in  
your mainstack's preopenstack handler), include the following:


  start using url_status

That's it. After that, it should work for all downloads and uploads  
(which may not be what you want).


Cheers
Dave

--
local sUrls

on libraryStack
  libUrlSetStatusCallback urlCallback, the long id of me
  palette me
  hide me
end libraryStack

-
on releaseStack
  libUrlSetStatusCallback empty
  close me
end releaseStack
---

on urlCallback pUrl, pStatusString

  show me
  put pUrl into field url of card 1 of me
  put item 1 of pStatusString into tStatus
  put tStatus into field status of card 1 of me
  put 1 into sUrls[pUrl]
  if tStatus is among the items of loading,downloading,uploading then

put item 2 of pStatusString into tPart
put item 3 of pStatusString into tWhole
if tWhole  empty then

  showProgress tPart,tWhole
else
  hide scrollbar progress of me
  put ,  tPart  bytes after field status of card 1 of me
end if
--unlock screen
  else if tStatus is among the items of  
loaded,downloaded,uploaded,cached then

delete local sUrls[pUrl]
if the visible of scrollbar progress of me then showProgress 1,1
send hideStatus to me in 200 milliseconds ##leave visible for  
short time


  else if tStatus is among the items of error,timeout then
delete local sUrls[pUrl]
send hideStatus to me in 200 milliseconds ##leave visible for  
short time

  else
hide scrollbar progress of me
  end if
end urlCallback
-
on showProgress pPart,pWhole
  put the endValue of scrollbar  progress of me into tMax
  set the thumbPosition of scrollbar progress of me to round(tMax  
* pPart / pWhole)

  show scrollbar progress of me
  wait 10 milliseconds
end showProgress
---
on hideStatus
  if keys(sUrls) is empty then
hide me
  end if
end hideStatus

___
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: FTP and cross platform issues...

2006-03-24 Thread Dave Cragg


On 24 Mar 2006, at 23:35, Alex Tweedly wrote:


Dave Cragg wrote:

Can you get some log data using libUrlSetLogField in the client?  
This  might help pin down where the problem is occurring?



How do we call libUrlSetLogField ?


libUrlSetLogField the long id of field whatever

and to turn off:

libUrlSetLogField empty

Cheers
Dave





___
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: Avoiding line cut-off in a multipage printout

2006-03-26 Thread Dave Cragg


On 27 Mar 2006, at 07:36, Graham Samuel wrote:


It seems to me that in principle we can't know how much wiggle room  
to leave, because we can't know how different the screen and  
printer versions of Windows fonts might be. I haven't any real  
experience of this, but I guess that for some unusual fonts they  
might be very different indeed.  And I want my printing handler to  
be sufficiently generalised to allow it to print a text in any  
available font, chosen by the user and therefore not predictable by  
me. After all that's what even the most elementary text editors do.  
Come to that, what does the RR IDE do?


Graham, I'm not sure of your exact problem, but can you use the  
pageHeights property? I've used this before to print multi-paged  
fields. But it's been a while now (more than a few days :-)), so I  
forget the exact details of what I did.


Apologies if you've already looked at that.

Cheers
Dave


___
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: Avoiding line cut-off in a multipage printout

2006-03-27 Thread Dave Cragg


On 27 Mar 2006, at 18:38, Graham Samuel wrote:

Well, so far my experiments have been somewhat unsatisfactory. My  
surmise that you can't scroll beyond the bottom of the last page  
was correct: if say 60 lines fit on the first page and you have a  
total of 80 lines, scrolling the pixel equivalent of 60 lines won't  
make line 61 come to the top of the field: in fact AFAIK line 21 or  
thereabouts will come to the top of the field, so I will have to  
deal with the last page in a different way (for example by deleting  
all the lines except the ones that are meant to be on the last  
page, and printing what remains).


I looked back at some old stacks where i'd used the pageHeights. It  
looks like I used  two approaches. One was deleting the printed lines  
(as you mention above). The other was adjusting the height of the  
field to the same value as the current line in the pageHeights.


Cheers
Dave
___
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: FTP and Cross platform issues....

2006-03-27 Thread Dave Cragg


On 27 Mar 2006, at 19:21, John Patten wrote:


Hi Dave...

Here are the answers to your questions:


snip


socket 10.58.1.7|6927
socket timeout 10.58.1.7:21|6927
220 --



The log entries suggest something odd is going on.

In the first line, I would expect to see a port number appended to  
the IP address. Like this:


  socket 10.58.1.7:21|6927

And although a socketTimeout is reported, the final line suggests a  
connection was opened and at least one line was read from the server.  
Strange!


Can you show us the script you're using to upload the file?

Also, if you're using one of the non-blocking calls (such as  
liburlFtpUpload), do you do anything after the call that might  
interfere with the liburl script. Examples would be a repeat loop  
that lasts for a long time, or the use of any wait commands.


Cheers
Dave
___
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: Loading image data from DB

2006-04-05 Thread Dave Cragg


On 5 Apr 2006, at 23:37, Devin Asay wrote:

I know this can be done, but it's got me stumped. Nothing  
conclusive from archives.


I want to store image data in a  mysql database and then show it in  
an image object in Rev. I successfully loaded an image into a field  
of type longblob. I know the data is there and that it's valid.


This is what I tried to load the image data:

global connID -- my connection id

on mouseUp
  if connID is empty then
answer You need to connect to the database first.
exit to top
  end if
  put word 2 of the selectedline of fld linenumbers into tEntryNum
  put select illustration from vocablist where item_index =
tEntryNum into tQuery

  put revDataFromQuery(,,connID,tQuery) into tData
  set the imagedata of img testImg to tData
end mouseUp


Did you try using revQueryDatabaseBlob instead of revDataFromQuery?

Cheers
Dave
___
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] why eating your own haggis is not too bad for a companybased in Scotland

2006-04-07 Thread Dave Cragg


On 7 Apr 2006, at 18:30, Lynn Fredricks wrote:


Haggis does not scare me. Just look at this, and be afraid:

http://www16.ocn.ne.jp/~uoshige/shiokara.jpg
http://en.wikipedia.org/wiki/Shiokara


Scared? I'm married to a lady who likes and regularly serves up both  
(not usually on the same plate).  I'm petrified, but not of the  
food. :-)


Bon appetit
Dave
___
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 long does one put up with crashing? - reply

2006-04-07 Thread Dave Cragg


On 7 Apr 2006, at 21:19, Chipp Walters wrote:


But, then there's another problem (at least for me). Currently, I'd  
like

to get my hands on a 2.6.6 version of Rev. But the latest installer I
have is 2.6.1, which when properly online updated, goes to 2.6.6 (bug
fixes mostly). But, because the online update now only points to 2.7,
how does one go about getting the update to 2.6.6? Is there  
somewhere an

archived version of 2.6.6 and if so, where?


Chipp, are you talking about engine version numbers or Rev App  
version numbers? The reason I'm asking is that I don't recall a Rev  
App of version of 2.6.6.


The latest pre-2.7 version I have here is 2.6.1, which has an engine  
versione of 2.6.6.


The 2.6.1 engine version is what shipped with Rev 2.5.

(As of 2.7, the engine and app versions are the same, thank goodness.)

Cheers
Dave
___
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 create hypertext links

2006-04-07 Thread Dave Cragg


On 7 Apr 2006, at 22:42, Bob Wilson wrote:

I have a situation where I need to load forms with text that  
includes links.

Right now, they are stored in the source database as follows:

The jrain in Spain/j falls mainly in the plains.

The text to be hyperlinked is rain in Spain.  The j and /j  
are not to

be displayed.

I can't find anything in the Revolution documentation that describes
hypertext-like characters that I can preload in the text stream to  
create

linked text segments.

So my question is - what's the best way to load this text and  
create linked

segments while I'm loading it.


It depends on exactly how you want to use the link, but take a look  
at linkText and linkClicked in the docs.


The simplest way would be just to replace the j and /j with a  
and /a respectively. Then set the htmlText of the field to the  
string. For example:


   set the htmlText of field 1 to The arain in Spain/a falls  
mainly in the plains.


The will display the link with an underline. If you click on the  
link, the linkClicked message will be sent to the field, passing  
rain in Spain as a parameter.


If you'd rather the linkClicked message was sent something else as a  
parameter (an index number, for example) you could set alternative  
linkText like this:


  set the htmlText of field 1 to The a href=9rain in Spain/a  
falls mainly in the plains.


Then in the field script, you would have a linkClicked handler like  
this (this assumes there will be other link text in the field, and  
that teh links are set up as in the first exampe above.)


  on linkClicked pLinkText
 switch pLinkText
case rain in Spain
  play audioclip rineinspine ## or whatever
break
case she sells
  play audioclip sea shells
   break
 end switch
  end linkClicked

There are some restrictions on the use of the linkClicked message. I  
think the field has to be locked, and it won't work with a list field.


Cheers
Dave
___
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 create hypertext links

2006-04-07 Thread Dave Cragg


On 7 Apr 2006, at 23:36, Dave Cragg wrote:


  set the htmlText of field 1 to The a href=9rain in Spain/a  
falls mainly in the plains.


That was a pretty poor piece of scripting. :-)

  put The a href= into tString
  put  quote  9  quote after tString
  put  rain in Spain/a falls mainly in the plains. after tString
  set the htmlText of field 1 to tString

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


  1   2   3   4   5   6   7   8   >