Re: OT: getting page hit-counts for on-rev account

2010-11-18 Thread Alex Tweedly

In cpanel
In the "Logs" panel, click on   webalizer
for the appropriate domain, click on "View"
then click on the relevant month
then click on "URLs"
and then you should see it 

Hopefully there are other, perhaps better ways.
-- Alex.


On 18/11/2010 23:55, Nicolas Cueto wrote:

Hello List,

I guess my question is for fellow on-rev account users.

How can one retrieve a count of the number of visitors to a specific web-page?

Somewhere in the cpanel, I imagine. But if someone knows for certain,
it'd save me a lot of digging around here and there.

Thanks.

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



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


Re: Functions in the on-rev - LC server script

2010-11-16 Thread Alex Tweedly
Yes, but there is no need to transform handlers (commands)  into 
functions. You can have handlers in .irev too, so long as they are 
defined before they are used.


-- Alex.

On 16/11/2010 17:17, paolo mazza wrote:

Thank you Devin,
that's interesting.
So, if I move all the functions and all the commands  (transformed in
functions) of my  script before the main command the script of my stack
should work also in the on-rev server.

I will give it a try.

Thanks a lot

Paolo

On Tue, Nov 16, 2010 at 5:59 PM, Devin Asay  wrote:


On Nov 16, 2010, at 9:40 AM, paolo mazza wrote:


How can I place a function in a on-rev - CGI server script ?
I have to port a stack script (with commands and functions) to a .irev

text

file for the  on-rev  server .
I expected something similar to the following script...


... but obviously it does not work !!!

Any idea?

Paolo,

In irev scripts you have to declare the function before you call it, so
just put the function handler at the top:



Regards,

Devin


Devin Asay
Humanities Technology and Research Support Center
Brigham Young University

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


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



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


Re: LiveCode Personal Banner

2010-11-15 Thread Alex Tweedly

On 15/11/2010 20:37, Andre Garzia wrote:

(2) There is no way to distinguish your standalone running on your own
machine from your standalone running somewhere else. Any way to detect that
it is running on the same machine as the one used to develop the given
standalone will not be tamper proof. You can't trust any metric given by a
computer to identify itself. You can't trust MAC Addresses, HD Serial or CPU
Serial, all those can be spoofed.



That's right, you can't have a reliable check for the machine. But what 
you can do, and I would argue you should do, is check for a valid IDE 
license. So the rule could be:


a standalone built with Personal Edition will check whether the machine  
has a valid licensed copy of the IDE on it

If there is no IDE, then you get the 10 second start-up screen.
If there is a valid IDE, you get no start-up screen (or maybe a 1-second 
start-up)


That way, anyone with the Personal Edition can build and run on (all) 
their own machines without being bothered.


-- Alex.
___
use-revolution mailing list
use-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: Indenting Challenge

2010-11-09 Thread Alex Tweedly

I haven't thought this through, but .

there are only 3 (or maybe 4) different indent cases.
create a suitable image for each case (i.e. normal, bulletted, 2nd 
level, continuation, etc.) which is blank space of the appropriate 
number of pixels wide
then insert an extra character at the start of each line, and set the 
imagesource of that first character according according to what kind of 
line it is


-- Alex.

On 09/11/2010 18:39, Scott Rossi wrote:

Hi List:

Was hoping someone here might have some uncanny insight into how to solve a
text formatting dilemma...

Basic problem: I need to create two levels on indenting in a block of text,
but the text needs to always be directly editable and may span multiple
lines.

About a month or so back I mentioned an app I was working on that was sort
of a poor man's PowerPoint, and was trying to mimic the bullet formatting
one can apply to text.  I've been asked to implement two levels
bulleting/indenting, something like the following (hope it comes across):

€ Main Bullet Item 1 that spans
multiple lines
€ Main Bullet Item 2
- Secondary Bullet 1
- Secondary Bullet 2 which
   spans multiple lines
- Secondary Bullet 3
€ Main Bullet Item 3

I can accomplish the first level bullet/indenting using a combination of
margins and firstIndent, but I can't figure out a way to handle second
level.  To date I've been using HTMLtext and non-breaking spaces to pad the
secondary level lines, but arbitrarily adding spaces to live editable text
is messy, and I can't find a way to align a padded+wrapped line with the
line above it.  It occurred to me maybe there's some non-typeable,
non-selectable character I could use for padding, but I only know of
formFeed/lineFeed characters which wouldn't help here.

And the thing that really makes this difficult is the fact that the text
needs to be directly editable by users (cannot be in a locked field).

Any suggestions on how I might tackle this?

Thanks&  Regards,

Scott Rossi
Creative Director
Tactile Media, UX Design


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



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


Re: delete chunk.

2010-11-03 Thread Alex Tweedly

I agree it would be great to be able to say
   set the payAttentionToTrailingDelimiters to true

But in the meantime you can use the fact that doubling a trailing 
delimiter will be ignored.

repeat for each line L in tData
   if the last item of (L & the itemDel) is empty then
  -- deal with an empty one
   else
  -- use "the last item of L" which is not empty
   end if

-- Alex.

On 03/11/2010 12:52, Ken Ray wrote:

Just tossing this out there, but I *love* this behavior. I'm sure there are
situations where it's undesirable, but are easily compensated for by just
adding another delimiter.

Begin able to do the following is very handy and makes the code clean:

put "foo"&  cr after fld "x"
put "bar"&  cr after fld "x"
put the number of lines of fld "x"

Having that return 2 is extremely convenient.

Agreed, but sometimes it's not convenient when you want to get the "last
item" of a line; for example, if you have a container that holds columns for
First Name (tab) Last Name (tab) Notes, and some lines have a note and some
don't, you can't just set the itemDelimiter to tab and run through the
container and get the "last item" or "item -1" of the line to check if the
person entered a note; if they didn't provide one, then check the "last
item" will give you their Last Name instead.

It would be great if there was a global setting that you could toggle it on
in these circumstances, something like:

put item -1 of "Ken,Ray,"
==>  returns "Ray"

set the dontIgnoreTrailingDelimiter to true
put item -1 of "Ken,Ray,"
==>  returns ""

:-)

Ken Ray
Sons of Thunder Software, Inc.
Email: k...@sonsothunder.com
Web Site: http://www.sonsothunder.com/


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



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


Re: delete chunk.

2010-11-03 Thread Alex Tweedly

On 03/11/2010 13:43, dunb...@aol.com wrote:

This seems perfectly intuitive to me.

When you delete an item, you are doing something entirely different than
just manipulating the contents of an item. In one case you reduce the number
of items. In the other you merely insert, or remove, data from them.
But manipulating the contents of an item does (can) change the number of 
items.

   put "a,b,c" into temp
   put temp && the number of items in temp
===>  a,b,c 3
   put empty into the last item of temp
   put temp && the number of items in temp
===>  a,b, 2

-- Alex.
___
use-revolution mailing list
use-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: delete chunk.

2010-11-03 Thread Alex Tweedly

On 03/11/2010 04:41, J. Landman Gay wrote:


Right. You can't have an empty last item, and if you try, the last 
delimiter is removed. There's a comment about it in the dictionary 
under "item".



You can have an empty last item - see the end of the email.

But even without that special case, you can have a trailing delimiter - 
if you do this in the message box of LC 4.5


put "a,b,c" into t ; put empty into item -1 of t; put t

then you get

a,b,

i.e. the trailing comma remains.  If instead you say "delete item -1 of 
temp" then the trailing delimiter disappears.


I guess it just *is* that way, and always has been. The problem is that 
the docs are completely wrong when they say


   delete /chunk/ of /container /
is the same as
   put empty into /chunk/ of /container/


But it can be tricky to follow the logic. Here's a quiz  without 
trying it :-) what do you get from

put "a,b,c" into t
put empty into the last item of t
put empty into the last item of t
put empty into the last item of t
put t

answer follows below 





















You get "a,,"
the first "put empty ..." removes "c"
The second one removes "b"
The third one does nothing - because the last item is empty.

-- Alex.


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


delete chunk.

2010-11-02 Thread Alex Tweedly


Hmmm ... what should I get from

put "a,b,c" into temp
delete item -1 of temp

I think temp should now have "a,b," - i.e. the last item has 
disappeared, but the (now) trailing item delimiter should still be there.


However, I actually get that temp has "a,b" - the last comma has also 
disappeared.


The docs say that "delete chunk of container" is equivalent to "put 
empty into chunk of container" - but if I replace it so I do


put "a,b,c" into temp
put empty into item -1 of temp

then I do indeed get "a,b,".
Feels like a bug, and I should put it into QCC - but it's late at night 
and I may be just missing something.

Am I ?

Thanks
-- Alex.
___
use-revolution mailing list
use-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: Auto-updating apps, and splash screens.

2010-10-29 Thread Alex Tweedly

 On 29/10/2010 05:40, stephen barncard wrote:

Search for "Magic Carpet" at Chipp's site.

I tried Magic Carpet when it was first announced, and it was a good 
backup/archive/version-control system, but I don't remember anything 
about auto-update, and there's nothing about auto-update in the web 
pages about Magic Carpet.


On 29/10/2010 05:10, Jim Sims wrote:

Alex - search the List archives for Chipp's updater, he has a few posts that 
outline what seems
to be a good system and gives some excellent advice.
I did (eventually) find that advice. It's well hidden because some other 
emails in the archive refer to it, but have the wrong link. It should be

http://lists.runrev.com/pipermail/use-revolution/2003-August/021626.html

and you're right, lots of good advice, looks like a good system, etc.  I 
was just hoping for some working example to start from.


Richard Gaskin has most of this in the auto-download used in RevNet, so 
I may try taking that and expanding it into auto-updater.Sounds like 
a project for a quiet evening 


Thanks
-- Alex.
___
use-revolution mailing list
use-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 as Linux Shell Script

2010-10-28 Thread Alex Shaw

Hi Mike

If you're using the 3.5 engine you can use liburl via the following:

http://www.lacscentre.com/liburl/releases.html


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


Auto-updating apps, and splash screens.

2010-10-28 Thread Alex Tweedly


I have a little app that will be used on a number of computers, so I 
want it to check for a new version being available, and update itself if 
needed (and desired).  I know the easy way to do this is to have the 
executable be basically a 'splash screen' that starts the *real* stack, 
and therefore the real stack can be updated.

Does anyone have a sample stack / app showing this ?

And, what do you as app users prefer

1. The app automatically updates itself when a new version is available.
2. The app downloads the new version automatically, and then (next 
time?) on startup asks if you want to install the update.
3. The app lets yo know there is a new version available, and asks if it 
should download / install the update.

4. Something else.

Thanks
-- Alex.
___
use-revolution mailing list
use-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 as Linux Shell Script

2010-10-28 Thread Alex Tweedly
 Just a guess . libURL uses private handlers, and RevServer scripts 
can't have private functions in them.


(The Docs say 'private' applies to desktop and server, but my simple 
test suggests otherwise




fails, remove the 'private' and it works.)

There are only 2 instances of it in libURL, so try changing them and see 
if it helps 
beware also of name clashes - e.g. the handler 'log' would cause a clash 
in most of my scripts :-)


-- Alex.

On 28/10/2010 23:28, Mike Bonner wrote:

Nope doesn't work, and I don't know enough to determine if it would be
worthwhile to beat it into submission or how to begin if it is worthwhile.
(tried it with the 4.5 script) Mostly was just wondering, revserver throws
errors  such as:

183,485,43,)
482,746,1,private
EXECUTION ERROR:
681,0,0,1

I have no clue what they mean.

On Thu, Oct 28, 2010 at 3:39 PM, J. Landman Gaywrote:


On 10/28/10 3:23 PM, Mike Bonner wrote:


I have a question regarding this, if one were to copy the script as you
explained, and instead of placing it in a stack could one paste it into an
.irev file and use it as an include with revserver scripts?


Yes, I think so, but I'm not sure how much of libURL the irev engine
supports. The original post was about using it in an old-style CGI, which
doesn't support text file includes, but is basically the same engine as the
one used for building standalones.

If you try it, let us know if it works.


--
Jacqueline Landman Gay | jac...@hyperactivesw.com
HyperActive Software   | http://www.hyperactivesw.com
___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your
subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution


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



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


Re: liburlftpcommand problem

2010-10-26 Thread Alex Tweedly


No clear idea, but a debugging suggestion.

If it were me, I'd change your (failing) script to

put the selectedtext of fld "fListe" into tText
put "dele /htdocs/visit05/files/"&  tText into tCmd
*put ">>>>"&  tCmd&  "<<<<"&  CR after msg*
get liburlftpcommand(tCmd, tFtpServer, tFtpUser, tFtpPass)  

just to be sure that I have what I expect in the selected text, and 
don't have any stray extra CRs or other odd characters.


-- Alex.

On 26/10/2010 21:33, Matthias Rebbe wrote:

Hi,

i want to delete a file on an ftp server.

With the following script

put the selectedtext of fld "fListe" into tText
put "dele /htdocs/visit05/files/"&  tText into tCmd
get liburlftpcommand(tCmd, tFtpServer, tFtpUser, tFtpPass)  

i get an error  550 /htdocs/visit05/files/Test3: No such file or directory

I tried list fields and scrolling list fields.

But with the following script

put "Test3"
put "dele /htdocs/visit05/files/"&  tText into tCmd
get liburlftpcommand(tCmd, tFtpServer, tFtpUser, tFtpPass)

it works and the file is deleted.

Is there anything i am missing?

Regards,

Matthias


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



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


Re: [OT] Mac App Store

2010-10-25 Thread Alex Tweedly
 Hi Sarah - very interesting perspective on the App Store. I was 
particularly struck by one point.


On 25/10/2010 01:36, Sarah Reichelt wrote:


The other iOS phenomenon I would expect to see on the Mac, is greater
numbers of small, cheap, single-use apps. LiveCode is ideally suited
to this market, provided we can get the native controls etc, that the
App store will require.

I am building a small app (primarily, if not entirely) for my own use. 
It does two related, but kind of different, things, which need slightly 
different user input. And I've been struggling with how to handle that


Should I
 - display all controls
 - have modes, and disable those controls that don't currently apply
 - hide those that don't apply
 - use modal / wizard style for the more complicated one 

Oh, so many choices. And your point above gave me the right answer for 
this case - make it two separate apps. Make each one totally focused, no 
complications arise over what controls to show or what to display.


Sometimes the answer is too simple :-)

Thanks,
-- Alex.
___
use-revolution mailing list
use-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 Email

2010-10-24 Thread Alex Tweedly

 Yes, both Sarah and Shao Sean have SMYP libraries (I haven't used either).

It's not hard to pick out the attachments - but it would be nice to do 
it in a general way for a library, that would return a list of 
attachments, their types, allow simple filing of them, etc.


-- Alex.

On 24/10/2010 14:49, Len Morgan wrote:

On 10/24/2010 8:46 AM, Ray Horsley wrote:

Alex,

Thanks for these suggestions.  Please let me know if you ever write
something a little beefier; i.e. something which could read 
attachments and

work with SMTP.


I'm pretty sure Sarah has one that uses SMTP too.

What makes reading attachments so hard?  Aren't they separated by an 
ID number and you're told what the type of the attachment is and 
possibly the length?  It seems like LiveCode's text search routines 
would make it pretty easy to "delimit" the various attachments from 
each other.  The "hard" part would be deciding what to do with them 
once you had them.


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

http://lists.runrev.com/mailman/listinfo/use-revolution



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


Re: Getting Email

2010-10-24 Thread Alex Tweedly
 Sarah has a library for reading from a POP server, which I've used a 
few times  - see

http://www.troz.net/rev/index.irev?category=Library#stacks

Shao Sean also has a POP library, which I haven't used but I would 
expect it to be excellent.


AFAIK, neither has decoding capabilities for extracting attachments, 
etc. so if you need that you'll need to roll your own. BTW, if anyone 
else has written one of those, and felt like sharing it, I'm sure it 
would be very welcome.
 (I keep threatening to do that, but for now my Python script is 
running very happily so I haven't got around to re-writing into LiveCode).


-- Alex.

On 24/10/2010 13:50, Ray Horsley wrote:

Greetings,

Anybody know of a way to retrieve email using LiveCode?

Thanks,

Ray Horsley
LinkIt! Software

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



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


Re: determining if user has shell access

2010-10-14 Thread Alex Tweedly


Write a tiny script that does something trivial in shell (e.g. "shell 
ls"), and build that as a tiny executable.
Have your real script run that as a separate process and see if it never 
returns.


(Hmmm ... can you always start another executable ?)

-- Alex.

On 14/10/2010 09:41, Monte Goulding wrote:

Hi Dar

Thanks for your interest.


I'm a little confused as to what is happening.  Is the app locking up?

Yes. The shell function never returns. I have reported it as a bug because it 
should fail gracefully. But I'd love a workaround or test.


  Or does the function return empty?

If the latter, then maybe you can test shell with something trivial that always 
returns something that is not empty.  If you get empty, you can't use shell().

I wish it were that easy.

Cheers

Monte

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



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


Re: List Words from Textarea

2010-10-13 Thread Alex Tweedly
 Welcome Raz. Pierre's script gives you one good answer. When I read 
your email, I assumed you wanted to list each word - but avoid 
duplicates. To do that, you would change the script slightly, to


on mouseup
set the wholeMatches to true
repeat for each word w in fld "myfield"
if w is not among the lines of mywordslist then put w&  cr 
after mywordslist
end repeat
answer mywordslist
end mouseup

-- Alex.

On 13/10/2010 20:18, Pierre Sahores wrote:

Welcome to LiveCode Raz !

on mouseup
repeat for each word w in fld "myfield"
put w&  cr after mywordslist
end repeat
answer mywordslist
end mouseup

HTH,

Best,

Pierre


Le 13 oct. 2010 à 21:06, Razvan Pantescu a écrit :


I've started to study Livecode, don't know too much of it. I'm living about 
250km north of Danube (Focsani, Romania)

So any suggestions so I can read or list all the words from a Textarea?


Thanks,
Raz.





Date: Wed, 13 Oct 2010 21:59:55 +0300
From: richmondmathew...@gmail.com
To: use-revolution@lists.runrev.com
Subject: Re: List Words from Textarea

  On 10/13/2010 09:57 PM, Razvan Pantescu wrote:

Hi,

How can I list every word from a textarea?

"put any word of field" - show any word, but exists some "every word"?

Thank you,
Raz.



Wow; at least one other LiveCode / RunRev programmer in the Balkans;
there's hope yet!

How far north of the Danube do you live?

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


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

--
Pierre Sahores
mobile : (33) 6 03 95 77 70

www.wrds.com
www.sahores-conseil.com




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



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


RevOnline (Was: Re: [ANN] slotmachine iPhone was scrolling wheel]

2010-10-10 Thread Alex Tweedly

 On 10/10/2010 23:14, J. Landman Gay wrote:

On 10/10/10 4:47 PM, Alex Tweedly wrote:

On 10/10/2010 19:16, J. Landman Gay wrote:


I think the best repository would be the one provided by RunRev --
RevOnline. Everyone has access to that and sharing stacks and code is
its main intention.


That may be its main intention- but it does a pitifully poor job of it.

It currently has 225 entries, in about 90 categories (I guess they're
tags, not categories, I think). Which tag would I use to find, say,
Scott's scrolling list ? (OK, I'd start with "Awesome", but after that,
I'm not sure :-)


"Mobile" I guess. Or "Rossi". Only I don't think he's uploaded 
anything there yet.



Neither of those get any hits in the search box.


Why they had to remove the old RevOnline feature of allowing us to
search by author is totally beyond me.


I just typed my name in there and all my stuff came up. But it's true 
that search also brings up entries that happen to contain someone 
else's name, so yes, it isn't specifically an author search.


I just tried that (which name ?? - Gay, Jacqueline, Landman, Hyperactive 
- all get 0 hits)



I'm sure there were other issues with the new version of RevOnline, but
I can't log in to try it out properly.


I'm not sure why, but a note to support should fix it.


No need - the "automatic password reset" has succeeded.
Now I need to find a stack worth uploading :-)

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


Re: [ANN] slotmachine iPhone was scrolling wheel

2010-10-10 Thread Alex Tweedly

 On 10/10/2010 19:16, J. Landman Gay wrote:


I think the best repository would be the one provided by RunRev -- 
RevOnline. Everyone has access to that and sharing stacks and code is 
its main intention.



That may be its main intention- but it does a pitifully poor job of it.

It currently has 225 entries, in about 90 categories (I guess they're 
tags, not categories, I think). Which tag would I use to find, say, 
Scott's scrolling list ?  (OK, I'd start with "Awesome", but after that, 
I'm not sure :-)


Why they had to remove the old RevOnline feature of allowing us to 
search by author is totally beyond me.

Why they didn't preset the list of categories is a mystery.
I'm sure there were other issues with the new version of RevOnline, but 
I can't log in to try it out properly.


Maybe LiveCodeOnline will be better.

-- Alex.



___
use-revolution mailing list
use-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: Socket read problems

2010-10-08 Thread Alex Tweedly
 No good suggestion - but you might try multiple reads, each of one 
byte to see how many you get.


-- Alex.

On 08/10/2010 12:29, Len Morgan wrote:

 Dar,

I wish it was that simple but the length of the message is only in one 
byte so it's pretty hard to swap.  For test purposes, I have scrolling 
field where I print the progress of the conversation and I am 
displaying the correct length.  Also, I've got WireShark on the line 
so I can look at the actual packets to make sure I'm picking the right 
bytes, etc. and all of that is ok.  The only thing that seems "out of 
place" is that there is one more zero byte at the end of payload that 
fills out the data area to an even word boundry.  This null byte is 
not part of the data and is not counted in the length byte that I'm 
reading.  I believe that is part of the TCP/IP spec but it's been a 
long time since I've done a digital colonoscopy on network protocols 
so I could be mistaken.


What ends up happening is that the socket read command is getting one 
more byte than I've asked for so I'm wondering if it hangs up when I 
try and close the socket since I still have one unread byte in the 
buffer.  As it turns out, if I try and read that extra byte too, the 
result is the same:  The read command will not finish until 
 milliseconds have passed yet is never sends me 
a socketTimeout message.


The particular slave I'm talking to is from a major commercial vendor 
(inventor of ModBus as a matter of fact) but as I recall, my own slave 
(built with an Arduino) suffered the same "problem."


Is it possible that since I'm not using the callback on the read 
complete, that there is a bug in the read socket library?  I will do 
some more experimentation today and report back what I find.  I will 
also try and whip out a LiveCode slave and see if I can make it do the 
same thing on the same machine.  That should be interesting.


len morgan


On 10/8/2010 12:42 AM, Dar Scott wrote:
Could you have gotten the two length bytes swapped and are asking for 
way too many bytes?


Dar Scott

On Oct 7, 2010, at 6:22 PM, Len Morgan wrote:

 I'm trying to read data from a MODBus/TCP controller and having 
some issues with the timing of the read command.  I request a block 
of registers from the slave and it returns the requested bytes and 
header just fine and very quickly.  In order to read everything 
right, I have to first read the first 6 bytes of the header to know 
how many bytes are to follow.  Once I know that, I do a read from 
socket tSock for  characters.  Note that ALL of the 
characters have been received in a single packet so once I read the 
6 bytes, the rest of the data is already in the socket buffer.


The problem I have is when I do the second read, the read command 
blocks for the socketTimeoutInterval before continuing.  It doesn't 
matter what I set it to, it will wait that long before continuing.  
I tried catching the socketTimeout message but that message is never 
sent, even when I set the socketTimeoutInterval to 5 milliseconds!


I am not using the read ... with message form of the command since I 
want the handler to wait until all the bytes have been received 
before I move on.  Has anyone else seen this?  Have I missed 
something in the documentation or could this be something in the 
Windows code that handles sockets?


Any help would be appreciated!

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

http://lists.runrev.com/mailman/listinfo/use-revolution


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

http://lists.runrev.com/mailman/listinfo/use-revolution




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

http://lists.runrev.com/mailman/listinfo/use-revolution



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


Apache Log File analyzer

2010-10-07 Thread Alex Tweedly


Before I re-invent the wheel . does anyone have a LiveCode script to 
analyze Apache log files ?


Thanks,
-- Alex.
___
use-revolution mailing list
use-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: Download Beta Test Franklin Audio External for LiveCode

2010-10-06 Thread Alex Shaw

Hi Ruslan

Personally, I have one project which audio playback and recording is 
central so having a cross platform (other than quicktime) solution is 
useful, particularly windows & mobile platforms.


regards
alex

On 6/10/10 5:05 PM, Ruslan Zasukhin wrote:

On 10/6/10 9:20 AM, "Alex Shaw"  wrote:


Hi Lynn

Also, will/is it compatible with revmobile?


Hi Alex,

We did not considered yet revmobile ...

What this means?
 Port to iphone?  Others?

This is much more job agree.

Task is possible of course.
If there is enough interest ...

Iphone will be the most easy for us, because we have developers for it.



___
use-revolution mailing list
use-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: Download Beta Test Franklin Audio External for LiveCode

2010-10-05 Thread Alex Shaw

Hi Lynn

Also, will/is it compatible with revmobile?

regards
alex


On 5/10/10 9:02 AM, Pierre Sahores wrote:

Lynn,

Really amazing. Even if i got exactly the same beta-glichies exposed by Bob, 
Franklin Audio seems very promising (OS X 10.6.4 MBP i7 15"). Will it be way to 
run it from within the webPlugin ?

Best Regards,

Pierre


___
use-revolution mailing list
use-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: uuencode/uudecode

2010-09-30 Thread Alex Tweedly


Sorry about the delay - I started this interesting exercise, but got 
distracted .


Here's a simple script that handles uuencoding a file. It's been 
moderately, but not thoroughly, tested.



on mouseUp
   answer file "Select a file"
   if it is empty then exit mouseUp
   put URL ("binfile:" & it) into tOriginal
   -- put "Cat" into tOriginal
   put uuencode(tOriginal, "000", "text") into tEncoded
   put tEncoded after field "fLog"
   put CR & the number of chars in tOriginal && the number of chars in 
tEncoded after field "fLog"

end mouseUp

function uuencode pData, pPermission, pName
   put 1 into tBase
   put "begin" && pPermission && pName & CR into tOutput

   put the number of chars in pData into tLen
   put numToChar(0) & numToChar(0) & numToChar(0) after pData

   put empty into tLine
   repeat until tBase > tLen-2   -- i.e. all full words before the padding
  put charToNum(byte tBase of pData) * 256 * 256 into t
  add charToNum(byte tBase+1 of pData) * 256 to t
  add charToNum(byte tBase+2 of pData) to t

  put numToChar((t mod 64)+32) into t4
  put t div 64 into t
  put numToChar((t mod 64)+32) into t3
  put t div 64 into t
  put numToChar((t mod 64)+32) into t2
  put t div 64 into t
  put numToChar(t+32) & t2 & t3 & t4 after tLine

  if the number of chars in tLine = 60 then
 put numToChar(the number of chars in tLine * 3 / 4 + 32) & 
tLine & CR after tOutput

 put empty into tLine
  end if
  add 3 to tBase
   end repeat
   if tLine is not empty then
  put numToChar(the number of chars in tLine * 3 / 4 + 32) & tLine 
& CR after tOutput

   end if
   put "`" & CR & "end" & CR after tOutput
   return tOutput
end uuencode



On 23/09/2010 19:56, Phil Davis wrote:

 Hi Matthias,

With LiveCode on Mac OS X you could use a shell() command and let the 
'uuencode' line command do the work. Not sure about Windows... there 
doesn't seem to be a direct way to uuencode a file - no 'uuencode' 
command, nor any way to do it using PowerShell (AFAIK). Do you feel 
like writing your own LC uu library? That should be doable.


More info about the uuencode spec:
http://en.wikipedia.org/wiki/Uuencoding
http://www.opengroup.org/onlinepubs/009695399/utilities/uuencode.html

Phil


On 9/23/10 7:42 AM, Matthias Rebbe wrote:

Hi,

how can i uuencode data with LiveCode?
Do i need 3rd party tools for that? i cannot find anything about it, 
when searching the dictionary for uuencode.




___
use-revolution mailing list
use-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: Still: Where do I put libUUID.rev and qrtReportsLIb.rev in LiveCode?

2010-09-22 Thread Alex Adams
Jan,

Thank you for the explanation.  I have implemented as you have suggested and
it finally works.  I think there were several conflicting directives
colliding with one another.  Now I am just declaring the location in the
stackFiles and I had to adjust the start using command to not include the
.rev.
-- 
Alex Adams

hawkVision ‹ yourVision of all the info in yourWorld
A2 Technology Partners, Inc.
831-724-1397
a...@a2technology.com
www.a2technology.com


> From: Jan Schenkel 
> Reply-To: How to use Revolution 
> Date: Wed, 22 Sep 2010 05:33:43 -0700 (PDT)
> To: How to use Revolution 
> Subject: Re: Still: Where do I put libUUID.rev and qrtReportsLIb.rev in
> LiveCode?
> 
> Hi ALex,
> 
> You really shouldn't make the libraries substacks of your own stack, merely
> add a reference to them in the stackfiles, as I explained.
> Once you've done that, the standalone builder will automatically copy it to
> the standalone folder at build time.
> 
> qrtReportsLib.rev includes substacks of its own, and therefore cannot become a
> substack of your mainstack.
> 
> Jan Schenkel.
> =
> Quartam Reports & PDF Library for LiveCode
> www.quartam.com
> 
> =
> "As we grow older, we grow both wiser and more foolish at the same time."  (La
> Rochefoucauld)
> 
> 
> --- On Tue, 9/21/10, Alex Adams  wrote:
>> Jan,
>> 
>> I tried what you suggested, but it still didn't work. 
>> I tried reassigning
>> the mainstack of qtrReportLib to my main stack like
>> Jacqueline recommended.
>> That worked great with libUUID, but not with yours. 
>> Is it protected against
>> such a thing?
>> 
>> The only thing that has worked with qtrReportLib is to put
>> a full path name
>> into the start using stack statement.
>> 
>> start using stack
>> "/LiveCodeUserExtensions/qtrReportsLib.rev"
>> 
>> Nothing short of this has worked.  I'm concerned about
>> what will happen when
>> the standalones are built.  Will I still need this
>> stack installed on the
>> user's computer in the expected directory?
>> -- 
>> Alex Adams
>> 
> 
> 
>  
> 
> ___
> use-revolution mailing list
> use-revolution@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-revolution

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


Re: tRev name change and site re-org

2010-09-21 Thread Alex Shaw

Thanks Jerry.

Noticed only a OSX version for Remo (327), will you create a windows 
version?


I still have major problems with tRev (325) on my Windows7 64bit 
machine. Is this a runrev or tRev problem?


regards
alex


On 22/09/10 2:35 PM, Jerry Daniels wrote:

tRev users,

Since Rev has changed its name to LiveCode, we have renamed tRev. We've been 
waiting in the wings with this.

The new name is...[drum roll]

Remo
The remote-control object editor for LiveCode

Has a nice, new icon that looks like...a remote control!

___
use-revolution mailing list
use-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: Still: Where do I put libUUID.rev and qrtReportsLIb.rev in LiveCode?

2010-09-21 Thread Alex Adams
Jan,

I tried what you suggested, but it still didn't work.  I tried reassigning
the mainstack of qtrReportLib to my main stack like Jacqueline recommended.
That worked great with libUUID, but not with yours.  Is it protected against
such a thing?

The only thing that has worked with qtrReportLib is to put a full path name
into the start using stack statement.

start using stack "/LiveCodeUserExtensions/qtrReportsLib.rev"

Nothing short of this has worked.  I'm concerned about what will happen when
the standalones are built.  Will I still need this stack installed on the
user's computer in the expected directory?
-- 
Alex Adams

hawkVision ‹ yourVision of all the info in yourWorld
A2 Technology Partners, Inc.
831-724-1397
a...@a2technology.com
www.a2technology.com


> From: Jan Schenkel 
> Reply-To: How to use Revolution 
> Date: Tue, 21 Sep 2010 13:38:50 -0700 (PDT)
> To: How to use Revolution 
> Subject: Re: Still: Where do I put libUUID.rev and qrtReportsLIb.rev in
> LiveCode?
> 
> Hi Alex,
> 
> Open your project's mainstack, go to the 'Tools' menu and pick the item 'Stack
> inspector' - then use the option menu at the top to switch to the 'Stack
> files' panel.
> There you can use the 'Folder' icon to add references to the libUUID.rev and
> qrtReportsLib.rev stacks - from then on, you can easily 'start using' those
> libraries with their short name.
> As a bonus, the standalone builder will automatically include them when the
> standalone applications are built. See also page 30 of the Quartam Reports
> Manual pdf file :-)
> 
> HTH,
> 
> Jan Schenkel.
> =
> Quartam Reports & PDF Library for LiveCode
> www.quartam.com
> 
> =
> "As we grow older, we grow both wiser and more foolish at the same time."  (La
> Rochefoucauld)
> 
> 
> --- On Tue, 9/21/10, Alex Adams  wrote:
>> Sarah,
>> 
>> I'm trying to do what you described.  But how? 
>> Are you suggesting that I
>> import the libUUID.rev and qtrReportsLib.rev as sub stack
>> to the mainstack
>> of my app?  If so, I can't figure out how to do
>> that.  It must be easy
>> -- 
>> Alex Adams
>> 
>> 
>>> From: Sarah Reichelt 
>>> 
>>> While not an ideal solution, for the quick fix, can
>> you include these
>>> 2 stacks in the stackFiles of the mainStack that needs
>> to access them?
>>> Then that stack would know where they were and you
>> could "start
>>> using".
>>> 
>>> Cheers,
>>> Sarah
>>> 
> 
> 
> 
> 
> ___
> use-revolution mailing list
> use-revolution@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-revolution

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


Re: Still: Where do I put libUUID.rev and qrtReportsLIb.rev in LiveCode?

2010-09-21 Thread Alex Adams
Sarah,

I'm trying to do what you described.  But how?  Are you suggesting that I
import the libUUID.rev and qtrReportsLib.rev as sub stack to the mainstack
of my app?  If so, I can't figure out how to do that.  It must be easy????
-- 
Alex Adams

hawkVision ‹ yourVision of all the info in yourWorld
A2 Technology Partners, Inc.
831-724-1397
a...@a2technology.com
www.a2technology.com


> From: Sarah Reichelt 
> Reply-To: How to use Revolution 
> Date: Tue, 21 Sep 2010 10:30:46 +1000
> To: How to use Revolution 
> Subject: Re: Still: Where do I put libUUID.rev and qrtReportsLIb.rev in
> LiveCode?
> 
> While not an ideal solution, for the quick fix, can you include these
> 2 stacks in the stackFiles of the mainStack that needs to access them?
> Then that stack would know where they were and you could "start
> using".
> 
> Cheers,
> Sarah
> 
> 
> On Tue, Sep 21, 2010 at 10:05 AM, Alex Adams  wrote:
>> Did that.  Set it to the last rev folder where they have been working fine
>> all along.  Still no go.
>> --
>> Alex Adams
> ___
> use-revolution mailing list
> use-revolution@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-revolution

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


Re: Still: Where do I put libUUID.rev and qrtReportsLIb.rev in LiveCode?

2010-09-20 Thread Alex Adams
I'll try that and let you know in the morning.
-- 
Alex Adams

hawkVision ‹ yourVision of all the info in yourWorld
A2 Technology Partners, Inc.
831-724-1397
a...@a2technology.com
www.a2technology.com


> From: Sarah Reichelt 
> Reply-To: How to use Revolution 
> Date: Tue, 21 Sep 2010 10:30:46 +1000
> To: How to use Revolution 
> Subject: Re: Still: Where do I put libUUID.rev and qrtReportsLIb.rev in
> LiveCode?
> 
> While not an ideal solution, for the quick fix, can you include these
> 2 stacks in the stackFiles of the mainStack that needs to access them?
> Then that stack would know where they were and you could "start
> using".
> 
> Cheers,
> Sarah
> 
> 
> On Tue, Sep 21, 2010 at 10:05 AM, Alex Adams  wrote:
>> Did that.  Set it to the last rev folder where they have been working fine
>> all along.  Still no go.
>> --
>> Alex Adams
> ___
> use-revolution mailing list
> use-revolution@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-revolution

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


Re: Still: Where do I put libUUID.rev and qrtReportsLIb.rev in LiveCode?

2010-09-20 Thread Alex Adams
Did that.  Set it to the last rev folder where they have been working fine
all along.  Still no go.
-- 
Alex Adams

hawkVision ‹ yourVision of all the info in yourWorld
A2 Technology Partners, Inc.
831-724-1397
a...@a2technology.com
www.a2technology.com


> From: stephen barncard 
> Reply-To: How to use Revolution 
> Date: Mon, 20 Sep 2010 16:28:10 -0700
> To: How to use Revolution 
> Subject: Re: Still: Where do I put libUUID.rev and qrtReportsLIb.rev in
> LiveCode?
> 
> The confusion is because of the name change. Just go into the Livecode
> preferences and set the user extensions setting to your old rev user
> extensions folder and/or name them what you want. We haven't had to do this
> for years.
> 
> On 20 September 2010 16:15, Monte Goulding wrote:
> 
>>>> Any ideas?  I'm dead in the water until this is resolved.
>>> 
>>> Put a "Plugins" folder inside the folder you declared in the User
>>> Extensions preferences. Put your plugins into the Plugins folder.
>> 
>> Aren't these both script libraries? If so then they should go in:
>> /Resources/Script Libraries
>> 
>> That will integrate them with the standalone builder. At least it did when
>> I originally wrote the SB. The IDE Should provide options for loading these
>> libraries at startup but it doesn't. I used to have a plugin for that but I
>> haven't had time to maintain it for years. Make a quick plugin that parses
>> the stacks in that folder at startup and starts using them and your set.
>> 
>> Cheers
>> 
>> --
>> Monte Goulding
>> M E R Goulding Software Development
>> Bespoke application development for vertical markets
>> 
>> InstallGadget - How to create an installer in 10 seconds
>> revObjective  - Making behavior scripts behave
>> 
>> ___
>> use-revolution mailing list
>> use-revolution@lists.runrev.com
>> Please visit this url to subscribe, unsubscribe and manage your
>> subscription preferences:
>> http://lists.runrev.com/mailman/listinfo/use-revolution
>> 
> 
> 
> 
> -- 
> 
> 
> 
> Stephen Barncard
> San Francisco Ca. USA
> 
> more about sqb  <http://www.google.com/profiles/sbarncar>
> ___
> use-revolution mailing list
> use-revolution@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-revolution

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


Re: Still: Where do I put libUUID.rev and qrtReportsLIb.rev in LiveCode?

2010-09-20 Thread Alex Adams
Sorry, but that didn't work either.
-- 
Alex Adams

hawkVision ‹ yourVision of all the info in yourWorld
A2 Technology Partners, Inc.
831-724-1397
a...@a2technology.com
www.a2technology.com


> From: Mark Wieder 
> Organization: Ah, Software
> Reply-To: How to use Revolution 
> Date: Mon, 20 Sep 2010 13:34:39 -0700
> To: How to use Revolution 
> Subject: Re: Still: Where do I put libUUID.rev and qrtReportsLIb.rev in
> LiveCode?
> 
> Alex-
> 
> Monday, September 20, 2010, 1:22:57 PM, you wrote:
> 
>> I tried creating a folder at the root level of the startup drive and
>> declaring it in the preferences for the User Extensions path.
> 
>> Any ideas?  I'm dead in the water until this is resolved.
> 
> Put a "Plugins" folder inside the folder you declared in the User
> Extensions preferences. Put your plugins into the Plugins folder.
> 
> -- 
> -Mark Wieder
>  mwie...@ahsoftware.net
> 
> ___
> use-revolution mailing list
> use-revolution@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-revolution

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


Still: Where do I put libUUID.rev and qrtReportsLIb.rev in LiveCode?

2010-09-20 Thread Alex Adams
I have now tried some more things.  None work.

I tried creating a folder at the root level of the startup drive and
declaring it in the preferences for the User Extensions path.

My thought was that the My LiveCode folder was not created during
installation maybe because I designated that all users on the machine would
have access to LiveCode, so it would not have put the folder in my user
documents folder.  Good thought, but it didn't work.  I can't find anything
in the preferences to change the installation to consider me the only user.

I tried putting the .rev files in various places in the internal directory
along with the stacks that shipped with the app.  Still no joy.

Any ideas?  I'm dead in the water until this is resolved.

Thanks in advance,
-- 
Alex Adams

hawkVision — yourVision of all the info in yourWorld
A2 Technology Partners, Inc.
831-724-1397
a...@a2technology.com
www.a2technology.com


> From: Alex Adams 
> Reply-To: How to use Revolution 
> Date: Mon, 20 Sep 2010 11:29:44 -0700
> To: How to use Revolution 
> Subject: Re: Where do I put libUUID.rev and qrtReportsLIb.rev in LiveCode?
> 
> Thanks, but that did not work.  There was no My LiveCode folder in my
> documents folder.  I created one and gave everyone permission to read/write.
> I put libUUID.rev and qtrReportsLib.rev in there, but I get the same error
> when a start using command is given.
> 
> That is the folder designated in preferences.
> 
> These do not cause the error and load properly:
> start using stack "revDataGridLibrary"
> start using stack "Data Grid Templates 1247708866452"
> 
> Any other ideas?
> -- 
> Alex Adams
> 
> hawkVision — yourVision of all the info in yourWorld
> A2 Technology Partners, Inc.
> 831-724-1397
> a...@a2technology.com
> www.a2technology.com
> hawkVisionInfo.wordpress.com
> 
> 
>> From: Andre Garzia 
>> Reply-To: How to use Revolution 
>> Date: Mon, 20 Sep 2010 15:01:39 -0300
>> To: How to use Revolution 
>> Subject: Re: Where do I put libUUID.rev and qrtReportsLIb.rev in LiveCode?
>> 
>> Alex,
>> 
>> You can go to Preferences -> Files and set your extensions folder there.
>> 
>> Or you can use the default one which is "My LiveCode" inside the documents
>> folder.
>> 
>> 
>> On Mon, Sep 20, 2010 at 2:59 PM, Alex Adams  wrote:
>> 
>>> Just downloaded the shiny new LiveCode onto my Mac Snow Leopard machine.
>>>  My
>>> apps use libUUID.rev and qtrReportsLib.rev.
>>> 
>>> In runRev 4.5 I keep them at the same level as the Revolution app and the
>>> Externals and Resources folders.  I have tried placing them at the same
>>> level of these folders inside LiveCode.app, but no joy.
>>> 
>>> What should I do?
>>> --
>>> Alex Adams
>>> 
>>> hawkVision ‹ yourVision of all the info in yourWorld
>>> A2 Technology Partners, Inc.
>>> 831-724-1397
>>> a...@a2technology.com
>>> www.a2technology.com
>>> hawkVisionInfo.wordpress.com
>>> 
>>> ___
>>> use-revolution mailing list
>>> use-revolution@lists.runrev.com
>>> Please visit this url to subscribe, unsubscribe and manage your
>>> subscription preferences:
>>> http://lists.runrev.com/mailman/listinfo/use-revolution
>>> 
>> 
>> 
>> 
>> -- 
>> http://www.andregarzia.com All We Do Is Code.
>> ___
>> use-revolution mailing list
>> use-revolution@lists.runrev.com
>> Please visit this url to subscribe, unsubscribe and manage your subscription
>> preferences:
>> http://lists.runrev.com/mailman/listinfo/use-revolution
> 
> ___
> use-revolution mailing list
> use-revolution@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-revolution

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


Re: Where do I put libUUID.rev and qrtReportsLIb.rev in LiveCode?

2010-09-20 Thread Alex Adams
Thanks, but that did not work.  There was no My LiveCode folder in my
documents folder.  I created one and gave everyone permission to read/write.
I put libUUID.rev and qtrReportsLib.rev in there, but I get the same error
when a start using command is given.

That is the folder designated in preferences.

These do not cause the error and load properly:
start using stack "revDataGridLibrary"
start using stack "Data Grid Templates 1247708866452"

Any other ideas?
-- 
Alex Adams

hawkVision — yourVision of all the info in yourWorld
A2 Technology Partners, Inc.
831-724-1397
a...@a2technology.com
www.a2technology.com
hawkVisionInfo.wordpress.com


> From: Andre Garzia 
> Reply-To: How to use Revolution 
> Date: Mon, 20 Sep 2010 15:01:39 -0300
> To: How to use Revolution 
> Subject: Re: Where do I put libUUID.rev and qrtReportsLIb.rev in LiveCode?
> 
> Alex,
> 
> You can go to Preferences -> Files and set your extensions folder there.
> 
> Or you can use the default one which is "My LiveCode" inside the documents
> folder.
> 
> 
> On Mon, Sep 20, 2010 at 2:59 PM, Alex Adams  wrote:
> 
>> Just downloaded the shiny new LiveCode onto my Mac Snow Leopard machine.
>>  My
>> apps use libUUID.rev and qtrReportsLib.rev.
>> 
>> In runRev 4.5 I keep them at the same level as the Revolution app and the
>> Externals and Resources folders.  I have tried placing them at the same
>> level of these folders inside LiveCode.app, but no joy.
>> 
>> What should I do?
>> --
>> Alex Adams
>> 
>> hawkVision ‹ yourVision of all the info in yourWorld
>> A2 Technology Partners, Inc.
>> 831-724-1397
>> a...@a2technology.com
>> www.a2technology.com
>> hawkVisionInfo.wordpress.com
>> 
>> ___
>> use-revolution mailing list
>> use-revolution@lists.runrev.com
>> Please visit this url to subscribe, unsubscribe and manage your
>> subscription preferences:
>> http://lists.runrev.com/mailman/listinfo/use-revolution
>> 
> 
> 
> 
> -- 
> http://www.andregarzia.com All We Do Is Code.
> ___
> use-revolution mailing list
> use-revolution@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-revolution

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


Where do I put libUUID.rev and qrtReportsLIb.rev in LiveCode?

2010-09-20 Thread Alex Adams
Just downloaded the shiny new LiveCode onto my Mac Snow Leopard machine.  My
apps use libUUID.rev and qtrReportsLib.rev.

In runRev 4.5 I keep them at the same level as the Revolution app and the
Externals and Resources folders.  I have tried placing them at the same
level of these folders inside LiveCode.app, but no joy.

What should I do?
-- 
Alex Adams

hawkVision ‹ yourVision of all the info in yourWorld
A2 Technology Partners, Inc.
831-724-1397
a...@a2technology.com
www.a2technology.com
hawkVisionInfo.wordpress.com

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


Re: What is the name of that function...

2010-09-18 Thread Alex Tweedly

 wrap

but why do you want to avoid 'mod' ?

-- Alex.

On 18/09/2010 22:42, Tereza Snyder wrote:

…that lets you cycle among a sequence of numbers without using mod? I've read 
through the functionnames three times but nothing seems to be it.

Someone asked on the list not too long ago, and I said to myself, "Remember 
that!" and of course I remember saying that, but I don't remember…that.

Somebody knows… what is it.



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



___
use-revolution mailing list
use-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: Waiting for DNS to update a new site.

2010-09-15 Thread Alex Tweedly


Thanks to everyone who replied - it was very helpful.

Stephen, I have had the same experience - propagation is very rapid (I 
also use both Dreamhost and on-rev :-)


But in this case, the one person who actually matters is still not able 
to see her own website. I'm starting to think it's her computer, not DNS 
(though the web tool I mentioned says that 6 out of the 20 sites it uses 
worldwide still do not see the domain properly).


I'll try Wayne's suggestions re. Windows / Firefox - or maybe just get 
her to switch off/on her computer and see if that helps.


Thanks again
-- Alex.

On 15/09/2010 16:19, stephen barncard wrote:

Propagation used to take days. These days it seems to take just minutes or
hours at Dreamhost or ON-Rev. Your milage may vary

On 15 September 2010 02:31, AndyP  wrote:


Hi Alex,

I can see the page.

I'ts going to be a DNS propagation delay...more info below:

To speed up the internet, Internet Server Provider (ISP) caches their DNS

Stephen Barncard

San Francisco Ca. USA

more about sqb<http://www.google.com/profiles/sbarncar>
___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution



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


OT: Waiting for DNS to update a new site.

2010-09-14 Thread Alex Tweedly


Off-topic - but I could do with a favour.

I'm helping a friend develop a new web site, and although I created it a 
couple of days ago, it (apparently) isn't yet visible to her. I can't 
tell whether it's simply a DNS delay - just longer than I'm used to, or 
some other problem.


So could a few of you let me know whether or not you can reach 
http://www.melaniechmielewska.co.uk
(and if you can see it, any other comments are welcome; note the gallery 
and corbel photos are incomplete, but they will be there tomorrow )


And, to be slightly more general - anyone know of a service / website 
that will let you check DNS name visibility in a number of locations 
around the web ?  I tried the one at 
http://www.mob.net/~ted/tools/dns.php3 but wasn't convinced it is very 
authoritative.


Thanks
-- Alex.
___
use-revolution mailing list
use-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: [feature] did you guys knew that "?" is a valid character for function/command name?

2010-09-07 Thread Alex Tweedly
 Not quite. We specify pass-by-ref by using '@' in the handler 
specification; you can't use it in the calling script as Ben did in his 
example in the email. Ben wants to be able to use the '@' (presumably as 
an option, with no actual effect) in the calling script, to help remind 
him that the variable will/may be changed within the handler.


-- Alex.

On 07/09/2010 14:56, Andre Garzia wrote:

Err,

Ben, this is actually in place since forever... we can pass by
references values with @

On Tue, Sep 7, 2010 at 5:51 AM, Ben Rubinstein  wrote:

This is very bad news for my long-held campaign to introduce '@' as an
optional (but one day might be checked) prefix to a parameter, to indicate
in the calling line that this is passed by reference.

ie
if functionWithSideEffects(tInput, @tOutput) then
...

should allow the reader to know immediately that 'functionWithSideEffects'
takes the second parameter by reference.

On 05/09/2010 22:01, Mark Wieder wrote:

Andre-

Sunday, September 5, 2010, 11:37:46 AM, you wrote:


Folks,
Did you guys knew that "?" is a valid character for naming functions and
commands? I just created a function like that and it works

...it gets worse... see bz #8048


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






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


Re: Copy field problem

2010-08-31 Thread Alex Shaw

Hi Richmond

The problem is THAT particular saved stack ie 
http://www.harryscollar.com/teststack.rev

.. is showing the problem.

The stack I uploaded has not been binary edited in any way and was 
initially created by code from a project I'm working on.


In the project the stack is a simple temporary, in-memory data stack, 
created whenever the application is started. When I noticed the problem 
I stripped all other elements from the stack so that only one of the 
problem fields was left and then saved it as a on-disk stack. Obviously 
this process of elimination still left me with a field that still 
wouldn't copy properly to another stack with the copy to stack command.


btw it doesn't matter whether the destination stack is named or saved, I 
just wanted a quick test process for others to follow and replicate the 
problem.


My concern is how/why the stack or field itself got corrupted so that it 
cannot be copied when the copy to stack command works fine in every 
other situation, regardless of the 'sharedText' property. Don't think 
I've tested the complete range of situations but enough to know 
something isn't right.


regards
alex


On 31/08/10 8:17 PM, Richmond wrote:

On 08/31/2010 12:37 PM, Alex Shaw wrote:

Hi Jan

Yes, that worked for me too.

Fortunately, as a workaround, having 'sharedText' active for that
particular field isn't going to cause any problems in this instance
but I still think it's a bug of sorts with the 'copy' command.

Using the copy field to stack command does not work for that strange
stack (is it corrupted?) but if you just copy the field to the
clipboard then paste to destination it does work as expected!

ie. from the message box..

Instead of..
copy fld 1 of card 1 of stack "teststack" to card 1 of stack "Untitled 1"


Why do I have a queer feeling that it might not be a bad idea to name
and save the target stack prior to
any copying?

Just set up [RunRev 4.0, Ubuntu-Linux] 2 stacks: "teststack" and
"target"; saved both.

Popped a field "fF" on "teststack" and a button with the following script:

on mouseUp
copy fld "fF" of card 1 of stack "teststack" to card 1 of stack "target"
end mouseUp

bingo!

tried the same in the Messagebox:

copy fld "fF" of card 1 of stack "teststack" to card 1 of stack "target"

bingo!

quod erat demonstrandum old chap . . . :)



This works..
copy fld 1 of card 1 of stack "teststack"
create stack "new"
paste

hmm.. strange

regards
alex




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


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


Re: Copy field problem

2010-08-31 Thread Alex Shaw

Hi Jan

Yes, that worked for me too.

Fortunately, as a workaround, having 'sharedText' active for that 
particular field isn't going to cause any problems in this instance but 
I still think it's a bug of sorts with the 'copy' command.


Using the copy field to stack command does not work for that strange 
stack (is it corrupted?) but if you just copy the field to the clipboard 
then paste to destination it does work as expected!


ie. from the message box..

Instead of..
copy fld 1 of card 1 of stack "teststack" to card 1 of stack "Untitled 1"

This works..
copy fld 1 of card 1 of stack "teststack"
create stack "new"
paste

hmm.. strange

regards
alex

On 31/08/10 6:30 PM, Jan Schenkel wrote:

--- On Mon, 8/30/10, Alex Shaw  wrote:

  Hi

Having a annoying problem with copying a field from a
(specific) stack.

See below for basic test stack with a single field with
some content..
http://www.harryscollar.com/teststack.rev

This unusual stack was initially created via code, stripped
back of unneeded controls and saved.

When I load this stack into the IDE, create a new stack and
run the following command at the message box..
copy fld 1 of card 1 of stack "teststack" to card 1 of
stack "Untitled 1"

.. I get a blank field on the new stack!

Yet when I copy and paste the field onto another new stack
and try copying, it works and copies the contents too. It
also works if I manually recreate a test stack with another
test field.

Very strange because any new field created on
"teststack.rev" will now copy over to any other stacks with
empty contents.

I've checked relevant properties but nothing seems out of
place.

Argh! Starting to pull out my hair over this problem.

regards
alex



It worked for me, once i set the 'sharedText' property of the field to true. My 
guess is that the copy command assumes that if this is false, you really didn't 
want the original text :-)

HTH,

Jan Schenkel.
=
Quartam Reports&  PDF Library for Revolution
www.quartam.com

=
"As we grow older, we grow both wiser and more foolish at the same time."  (La 
Rochefoucauld)





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


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


Copy field problem

2010-08-30 Thread Alex Shaw

 Hi

Having a annoying problem with copying a field from a (specific) stack.

See below for basic test stack with a single field with some content..
http://www.harryscollar.com/teststack.rev

This unusual stack was initially created via code, stripped back of 
unneeded controls and saved.


When I load this stack into the IDE, create a new stack and run the 
following command at the message box..

copy fld 1 of card 1 of stack "teststack" to card 1 of stack "Untitled 1"

.. I get a blank field on the new stack!

Yet when I copy and paste the field onto another new stack and try 
copying, it works and copies the contents too. It also works if I 
manually recreate a test stack with another test field.


Very strange because any new field created on "teststack.rev" will now 
copy over to any other stacks with empty contents.


I've checked relevant properties but nothing seems out of place.

Argh! Starting to pull out my hair over this problem.

regards
alex

___
use-revolution mailing list
use-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: Functions for On-Rev

2010-08-10 Thread Alex Tweedly

I saw your later post, but thought I'd mention 

it should be

function titlecase  pString

rather than

function titlecase, pString

(i.e. no comma between name and parameter list)

-- Alex.

On 10/08/2010 17:33, Gregory Lypny wrote:

Hello everyone,

Is it possible to call a file of functions for On-Rev?  I created a file called 
functions.irev.  In it, I put a function that converts strings to title case.



I then placed an HTML object on a web page with



but unfortunately, I get nothing.

Regards,

Gregory

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

   


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


Re: EXIF parser

2010-07-31 Thread Alex Tweedly
Yes, I did one a few years ago. Wasn't complete but did successfully 
parse most EXIF tags. It was also relatively slow, and in the end I 
stopped developing it in favour of using an external exif decoder and 
parsing its output (I think it might even have been ExifTools, same as 
Mark S. described).


If you still have version 3.5 installed, you can find it on the old 
RevOnline (I don't so I can't give you the exact name of where to find 
it, but it was under username 'alextweedly'). I've not had much success 
with the new RevOnline, so it never did get uploaded there :-(


You can download it from

http://dl.dropbox.com/u/5491671/libEXIFv0.9-released.rev

-- Alex.


On 31/07/2010 18:34, FlexibleLearning wrote:

Has anyone written an EXIF parser in rev?

I have wrestled with this for quite a while, but have to now admit defeat.
Examples exist in a variety of languages such as C# (for example
http://renaud91.free.fr/MetaDataExtractor/), but I cannot transliterate
them.

Hugh

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

   


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


OT: Interactive reverse graph plot

2010-07-28 Thread Alex Adams
Sorry to sound obtuse, but I have been looking for what seems like it should
be a simple tool or a program that contains the features to:

Draw a graph line manually and have it generate/change the corresponding
plot point data.  Does that make since?  I¹m creating some growth
projections in a proforma and I know what the curve looks like that I want,
but generating the data to create the curve is very time consuming.  I want
to be able to make adjustments by dragging points directly on the graph and
have the supporting point data updated.

I¹m not asking for suggestions on how to make such a tool.  I want to find a
tool that does this today so that I can work through these spreadsheets more
naturally.

Any suggestions?
-- 
Alex Adams

hawkVision ‹ tools for solving Wicked Problems

(a)2 Technology Partners, Inc.
831-726-8013
a...@a2technology.com
hawkVisionInfo.wordpress.com
universalConnector.wordpress.com

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


Re: tRev and Win Vista

2010-07-25 Thread Alex Shaw
Hmm, been having same issue with tRev on a 64-bit windows7 desktop 
machine here plus many other issues. Which is a shame because it has the 
biggest monitor attached.


Don't have 32-bit win7 but seems to work ok on 32-bit xp on a 64-bit 
machine (macbook via bootcamp).


Back to 64-bit win7, tRev and Revolution 4.0 itself seem to occasionally 
leave 'ghost' processes when quitting, which requires going into task 
manager to kill. Haven't really noticed this with any standalones I've 
produced.


regards
alex


On 24/07/10 5:04 PM, Martin Blackman wrote:

Actually my bad, it doesn't work on Win 7 (64 bit) for me, only on
vista (32 bit, no service packs installed)Hmm
For some reason on Win 7 the user account control asks me if I want to
allow tRev to make changes to the system when I run it, I don't get
that on Vista

On 24 July 2010 14:35, Martin Blackman  wrote:

works fine for me on Vista and Win 7


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


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


Re: Sarah's scheduleMessage script.

2010-07-21 Thread Alex Tweedly

I think the problems is that following

put pHours into item 4 of nextTime
put pMins into item 5 of nextTime
put 0 into item 6 of nextTime

convert nextTime to seconds
send pMessage to this stack in nextTime seconds
   
you have nextTime as the value "the seconds" WILL have when the command 
should be executed; but when you do



  send pMessage to this stack in nextTime seconds


you are asking to wait that many seconds.

I'd try changing it to

 send pMessage to this stack in (nextTime - the seconds) seconds

and see if that does it.

-- Alex.



nextTime is the seconds

On 21/07/2010 23:33, Andrew Kluthe wrote:

Hey there!

I always forget to turn my p2p software on before I go to bed at night and I
have oodles of *legal* downloads that I need to catch up on. So, I decided
to try to make a simple timer that would open a program at a certain time
and close it again at a certain time everyday.

I came across Sarah Reichelt's scheduleMessage script on this list.

The problem I am having is, the messages get queued but they never disappear
from the pending messages queue and they never call the handlers I need. It
lets me know they are scheduled at correct times and I can see the messages
in the queue. Why aren't they executing?

the handlers for open and closing the program work just fine. They just
don't execute when they are supposed to.

I have included the entire script here for testing purposes:

on openUTorrent
launch "C:/Program Files/uTorrent/uTorrent.exe"
end openUTorrent

on closeUTorrent
   set the hideConsoleWindows to true
   get shell("taskkill /IM uTorrent.exe")
end closeUTorrent

on setTimer
scheduleMessage "openUTorrent", 17, 20
scheduleMessage "closeUTorrent", 17, 23
end setTimer

command scheduleMessage pMessage, pHours, pMins
-- pHours is in 24 hour time
put the seconds into nextTime
convert nextTime to dateItems
put item 4 of nextTime into tHourNow
put item 5 of nextTime into tMinsNow

if tHourNow>  pHours or (tHourNow = pHours and tMinsNow>= pMins)
then add 1 to item 3 of nextTime
put pHours into item 4 of nextTime
put pMins into item 5 of nextTime
put 0 into item 6 of nextTime

convert nextTime to seconds
send pMessage to this stack in nextTime seconds

--   Uncomment these lines for testing:
convert nextTime to short system date and long time
answer pMessage&  " scheduled for "&  nextTime
end scheduleMessage
   


___
use-revolution mailing list
use-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: Checking the location of a moving object

2010-07-19 Thread Alex Tweedly
No, it's not completely blocking. The problem is that the very first 
call to checkit is BEFORE the move starts, so the movingcontrols is 
empty, so the send doesn't happen. Should work (i.e. it does in my 
simple stack :-)  if you change it to (the equivalent of)



on mouseUp
   move button "B" to 300,300 in 9 seconds without waiting
   checkit
end mouseUp



Note that you need the "without waiting" in order that the first checkit 
gets done immediately, rather than after the move.



-- Alex.

On 19/07/2010 12:13, David Glasgow wrote:

Hello folks.

I am proposing to import data which will form a 'freehand' graphic containing 
about 5,000 data point loc pairs.  I have made a marker to follow the curve 
using the move command, which works fine.  However, I want the user to be able 
to select a threshold on the Y axis above and below which graphics change on 
screen.

I therefore need to check the vertical position of the marker, so I did this:

In the starting button:

on mouseUp
checkit
move grc "marker" to the points of graphic "PPG" in 90 seconds
end mouseUp

and in the card script:

on checkit
put the loc of grc "marker"&  "moving  "&  the movingcontrols
-- check threshold here
if the movingcontrols is not empty then send checkit to me in 1 tick
end checkit


I get the first loc for grc "marker" reported in the message box, but that's 
it.  Is a move completely blocking or am I doing something wrong?

If I can't use move in this way, any suggestions?

Thanks

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

   


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


Re: Scripting what should be a simple loop...

2010-07-09 Thread Alex Tweedly

On 10/07/2010 00:43, Alex Tweedly wrote:

  put (fld "field" & i) into temp
   do "put temp into quote & "tVar" & quote & i

Sorry - it doesn't need to be that complicated.

   you can just do

  put (fld "field" & i) into temp
  do "put temp into tVar" & i


(And just in case there are more silly typos - here's the actual running 
code I used ... :-)

on mouseUp
   repeat with i = 1 to  2
  put (the loc of button "Button" & i) into temp
  do "put temp into tVar" & i
  put tVar1 && tVar2 & "!!" after msg
   end repeat
end mouseUp

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


Re: Scripting what should be a simple loop...

2010-07-09 Thread Alex Tweedly


You do indeed need a 'do' statement - but the first half of the 
statement (dealing with the field) doesn't need it, only the second half.

So I would find it more readable to do

   put (fld "field" & i) into temp
   do "put temp into quote & "tVar" & quote & i

OK, it's marginally inefficient, but who cares compared to the 
readability :-)


-- Alex.

On 10/07/2010 00:34, Bob Sneidar wrote:

You need a do statement. Otherwise you would need Macro Substitution which 
Runrev does not support.

put "put fld"&&  quote&  "Field"&  i&  quote&&  "of group"&  quote&  AllFields&  quote&&  
"into tvar"&  i into theCommand
do theCommand -- careful of line wraps

Easier to read is:
put "put fld fieldi of group allfields into tvari" into theCommand
replace "fieldi" with quote&  "field"&  i&  quote in theCommand
replace "allfields" with quote&  "allfields"&  quote in theCommand
replace "tvari" with quote&  "tVar"&  i&  quote in theCommand
do theCommand -- remembering to check Bob for mistakes in his code

Bob


On Jul 9, 2010, at 4:23 PM, David C. wrote:

   

Good grief! Will someone be so kind as to show me the proper way to
format my script...

Let's say I have the following

1 group named "AllFields" containing:
10 text fields, named Field1...Field10
10 temporary variables named tVar1...tVar10

All I want to do, using a loop, is to put the user supplied data
contained in each field into the corresponding, like-named variable. I
thought I could do something easy like this

repeat for i = 1 to 10
put fld "Field"&  i of grp "AllFields" into tVar&  i
end repeat

I know that I've done this before, but so far I've yet to find the
right format that will not cause an error when compiling the script
-and- would greatly appreciate it if some kind soul would rescue me
from this madness.

FWIW, I recently had another fifty-something birthday, so I'm blaming it
all on an increasing case of dementia. As in:

"Dementia (meaning "deprived of mind") is a serious loss of cognitive
ability in a previously unimpaired person, beyond what might be
expected from normal ..."


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

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

   


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


Re: RunRev 4.5 compiled (NOT) running on Windows 2000

2010-07-08 Thread Alex Adams
This is a controlled distribution with consenting participants and have had
no issues on other than Windows 2000.
-- 
Alex Adams

hawkVision ‹ tools for solving Wicked Problems

(a)2 Technology Partners, Inc.
831-726-8013
a...@a2technology.com
hawkVisionInfo.wordpress.com
universalConnector.wordpress.com


> From: Mark Wieder 
> Organization: Ah, Software
> Reply-To: How to use Revolution 
> Date: Thu, 8 Jul 2010 09:14:12 -0700
> To: How to use Revolution 
> Subject: Re: RunRev 4.5 compiled (NOT) running on Windows 2000
> 
> Alex-
> 
> Rev 4.5 is still in a very buggy developer release version. You
> shouldn't be trying to ship apps to real customers using it.
> 
> -- 
> -Mark Wieder
>  mwie...@ahsoftware.net
> 
> ___
> use-revolution mailing list
> use-revolution@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-revolution

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


RunRev 4.5 compiled (NOT) running on Windows 2000

2010-07-08 Thread Alex Adams
I just got some feedback from customer trying to run one of our apps
compiled in runRev 4.5 on Windows 2000.

I forgot there ever was such a version of Windows!

The app doesn¹t launch successfully.  I assume this is a bad match for our
app and there¹s nothing we can do but suggest the guy get a new computer?
We certainly have no way of testing on a system that old.

Does anyone have any experience with this?
-- 
Alex Adams

hawkVision ‹ tools for solving Wicked Problems

(a)2 Technology Partners, Inc.
831-726-8013
a...@a2technology.com
hawkVisionInfo.wordpress.com
universalConnector.wordpress.com

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


Re: Having strange problem with the 'clone' command

2010-07-07 Thread Alex Tweedly

On 07/07/2010 15:49, J. Landman Gay wrote:

Björnke von Gierke wrote:

You're running into the settings of the Rev IDE, these things will
not apply in a standalone. Relevant bug:

http://quality.runrev.com/qacenter/show_bug.cgi?id=3290




Interesting, I'm glad you knew about it. If the IDE is interfering 
with the dimensions, would it work to lock messages, reset the 
template object, and then clone? Seems like that might avoid IDE 
interference.


Thanks everyone. That was indeed the problem, and "lock messages" is a 
good cure.


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


Having strange problem with the 'clone' command

2010-07-06 Thread Alex Tweedly



I'm just trying to create a simple array of rectangles .

I've created one (called, with great imagination :), "R1") which has all 
the correct characteristics, including a width and height of 8


But when I clone it to create my other shapes, the widths and heights 
all come out to 120 instead of 8. I can fix this up (as I do in the 
following code), but I don't understand why that would be necessary (or 
what other properties might be different from what I expect).



   repeat with y = 0 to 5
  repeat with x = 0 to 4
 put "_h01_" & x & y into tName
 clone grc "R1"
 set the name of it to tName
 put the width of grc tName && the width of grc "R1" & CR 
after field "F"

 set the loc of grc tName to 100 + 20*x,  150 + 20*y
 set the width of grc tName to 8
 set the height of grc tName to 8
 set the visible of grc tName to true
 put the width of grc tName && the width of grc "R1" & CR 
after field "F"
 put "grc" && quote & tName & quote && "and" & space after 
tGroupList

  end repeat
   end repeat


what shows up in the field is

120 8
8 8
120 8
8 8
120 8
8 8
120 8
8 8
etc.


I tried to create a tiny sample stack to show the problem, and initially 
succeeded, but at some point as I tried minor variations, it started 
working - and now I can't get it to fail again.  The time it started 
working was when I changed

   clone invisible grc "R1"
to simply
   clone grc "R1"
but changing that back didn't cause the problem to recur.

Any ideas ?
Thanks
-- Alex.



___
use-revolution mailing list
use-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: Smokescreen.rev

2010-07-01 Thread Alex Shaw

Hi Simon

The code is available @
http://smokescreen.us/demos/js/smokescreen.0.1.3-min.js

Would be handy but just can't get into javascript :)

regards
alex

On 1/07/10 12:55 PM, Simon Lord wrote:

The project is about 6 weeks old I think.  Been keeping my eye on it.
Very curious to get my hands on the code to see how they are
reassembling the graphics and code in JS.

___
use-revolution mailing list
use-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: Smokescreen.rev

2010-07-01 Thread Alex Shaw

Hi

Here's a link to a good discussion on this i read recently..

http://news.ycombinator.com/item?id=1395509

There is lots of good of debate on whether flash is dead/restrictive/etc 
and html5 is the future..


http://apiblog.youtube.com/2010/06/flash-and-html5-tag.html

Personally flash is just another media format and a very rich one in 
flexibility and you aren't necessarily restricted to adobe tools for 
construction.


There are lots of good open source projects out there and rev has 
positioned itself in a unique way by making sometimes obstruce language 
documentation freely available and with a bit of knowhow extract the 
cgi/engine component (3.5 & below) to use at no cost.


It would be nice if rev supported flash as a native object because 
interacting with it via quicktime or revbrowser is a bit of labour at 
the moment but certainly not a priority when rev is flexible in its own way.


regards
alex



On 1/07/10 4:25 AM, Simon Lord wrote:

Not immediately related to RunRev but an enterprising person(s) wrote
a Javascript service which can read a Flash SWF and decompile&  run it
in near-realtime.

http://smokescreen.us/demo/

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


Re: [ANN] revIgniter v1.3.3b released

2010-07-01 Thread Alex Shaw

Hi Ralf

Keen to really get into revigniter a bit more seriously and like the 
documentation you've put together.


Does it work with the newly available revserver or only with on-rev?

regards
alex


On 1/07/10 6:51 PM, Ralf Bitter wrote:


This version addresses issues related to XSS cleaning of encrypted cookie data.


Info and download at: http://revigniter.com/

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


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


Re: Line Numbers in Text Editor

2010-06-25 Thread Alex Tweedly
The straightforward answer is using formattedText . but the deeper 
question is what line numbering you want for the lines when there is 
line-wrapping happening. For instance, if it is something like a source 
code editor, then the line numbers (IMHO) should be independent of the 
size of window currenty in use.


For example,  if I have the following text

 1   My first line
 2 this is a very long line of text that is going to be wrapped in a 
moment when I make the window narrow.

 3 third line.

Then when the window becomes narrow, do I *want*

 1   My first line
 2  this is a very long line of text that is going to be wrapped
 3  in a moment when I make the window narrow.
 4  third line.

or do I want something like

 1   My first line
 2   this is a very long line of text that is going to be wrapped
 2a  in a moment when I make the window narrow.
 3   third line.

It really depends on whether you are numbering the lines of the window 
or the lines of the underlying text (or source code, or whatever); quite 
often, I suspect, it should be the latter. And in that case I don't know 
of any quick or easy way to figure out how the numbering should be done :-(


-- Alex.



On 25/06/2010 08:25, Justin Sloan wrote:

I went with using a parallel field to add line numbers and it is
working well. However, rev only counts the line numbers based on the
delimeter. So if word warp is turned on you end up with more lines
then there are actual line numbers.

Does anyone know of a way to count all the lines, even the lines that
are wrapped and not separated by the delimeter?

  - Justin



On Thu, Jun 24, 2010 at 5:44 PM, Jeff Massung  wrote:
   

I used a parallel field in my Cryogen editor (http://massj.tumblr.com for
video + screenshot). Worked out perfectly, and now that I've done it that
way once, I actually wouldn't want to do it any other way in the future.

Jeff M.

On Thu, Jun 24, 2010 at 6:01 AM, Justin Sloanwrote:

 

I am planning to implement line numbers in a proprietary text editor
that I wrote for in-house use.  Problem is, I don't know how I am
going to implement it. I thought about using a parallel text field,
but there has to be an easier way.  Any of you genius devs have any
ideas?
___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your
subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution

   

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

 

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

   


___
use-revolution mailing list
use-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- for renaming files according to folder name

2010-06-24 Thread Alex Tweedly
Sounds a perfect task for Rev. Here is a scrit I had lying around that 
did something similar - modified to suit, tested VERY minimally and with 
some debugging left in place :-)


Basically - modified by the tips of my fingers, so check it carefully 
before using  and watch for line wrap ..


local sCount

on mouseUp
   set the defaultFolder to "/Users/alextweedly"
   put empty into field "F"
   put the folders into tFolders

   repeat for each line F in tFolders
  if the first char of F is not "." then
 doOneFolder F
  end if
   end repeat
end mouseUp

on doOneFolder pFolder
   put the defaultFolder into tWhere
   set the defaultFolder to pFolder
   put "do" && pFolder && the defaultFolder && the number of lines in 
tAllFiles && the number of lines in tFiles & CR after field "F"

   put 0 into sCount
   put the detailed files into tAllFiles
   repeat for each line L in tAllFiles
  if isInteresting(item 1 of L) then
 put L & CR after tFiles
  end if
   end repeat
   put the defaultFolder && the number of lines in tAllFiles && the 
number of lines in tFioles & CR after field "F"

   sort lines of tFiles by item 4 of each -- is this same item on Win ?
   repeat for each line L in tFiles
  doOneFile pFolder, URLDecode(item 1 of L)
   end repeat
   set the defaultFolder to tWhere

end doOneFolder

function isInteresting pFile
   --put "try " && pFile & CR after field "F"
   if char 1 of pFile is "." then
  --  put "nope" & CR after field "F"
  return false
   end if
   if pFile contains ".png" then return true
   if pFile contains ".jpg" then return true
   if pFile contains ".bmp" then return true
   if pFile contains ".doc" then return true
   --put "Nope" & CR after field "F"
   return false
end isInteresting

on doOneFile pFolder, pFile
   add 1 to sCount
   set the itemDelimiter to "."
   put "rename" && pFolder && pFile && "-->" && \
 format("%s%05d.%s", pFolder, sCount, item -1 of pFile) & CR 
after field "F"

end doOneFile



-- Alex.

On 24/06/2010 17:59, Kurt Kaufman wrote:

I think that the following sounds like a good task for Rev; just want to make 
sure:
OS: WinXP SP3
About 1300 folders at same level; each folder with 10-200 files of type 
jpg,png,bmp,doc.

Would rename every file within folder to the name of that folder plus 
incremented number, i.e.
name_of_folder1.jpg
followed by, potentially,
name_of_folder2.doc.

Important: The files would be renamed and sorted by creation date only, so that
name_of_folder1.jpg
would be newer than
name_of_folder2.doc.

I'm pretty sure that I could apply the programming WD-40 to my brain and 
remember how to do this (would be a good exercise, also), but would appreciate 
any tips, warnings, etc.

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

   


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


Re: WWDC Keynote: HTML5 wide open for On-Rev & revServer

2010-06-12 Thread Alex Tweedly

I guess I'm missing something here .

It seems that if I write a Rodeo app and it uses HTML5 local storage, 
then there is a secuity issue because other Rodeo apps on the same 
server might be able to access the user's data when stored locally on 
his machine.


But today I generally write desktop apps. The user's data is stored on 
(usually) his local disk. And any other desktop app he chooses to 
install can access that data. What's so different ?


-- Alex.

On 08/06/2010 18:10, Mike Bonner wrote:

Actually, I believe the following (from the provided link) is what is
being referred to:

7.2 Cross-directory attacks

Different authors sharing one host name, for example users hosting
content on geocities.com, all share one local storage object. There is
no feature to restrict the access by pathname. Authors on shared hosts
are therefore recommended to avoid using these features, as it would
be trivial for other authors to read the data and overwrite it.

Even if a path-restriction feature was made available, the usual DOM
scripting security model would make it trivial to bypass this
protection and access the data from any path.

On Tue, Jun 8, 2010 at 10:36 AM, Jerry Daniels  wrote:
   

Not so. No.

Each developer has own space. If developer INVITES someone in...as a
teammate, then they share.

Vampire rules. Need an invite to join another developer.

Best,

Jerry Daniels

Follow the Rodeo discussion:
http://rodeoapps.com/rodeo-discuss-among-yourselves



On Jun 8, 2010, at 11:19 AM, Robert Mann wrote:

 

For Rodéo apps, if each user shares a space on a common shared server,
than
all the local datas of user X are accessible to all different rodeo apps,
So
far I understood. Not reassuring!
   

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

 

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

   


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


Error in date convert

2010-06-12 Thread Alex Tweedly


The following script fragment works OK on Mac (and I believe on Win, but 
cannot verify that right now)


put "2010,1,0,0,0,0,0" into t
convert t to system date
put t

but if I put this into an On-Rev script (i.e. an .irev scrip) it fails 
(silently - even the on-rev client debugger doesn't see any error, it 
just stops silently).  (Works OK if I use "convert t to english date").


I will, naturally, send an error report to on-rev, but I was curious 
whether this is an on-rev problem or a Linux problem (or limitation), so 
if any Linux users can try it out and let me know I'd be grateful.


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


Datagrid mouseUps

2010-06-09 Thread Alex Adams
I have a number of datagrids that behave in a way that is not intended and
I¹m curious if there is a simple way to solve the problem.

I have a mouseUp event the script of the datagrid.  It works well except
that it is triggered even when there is click in a scroll bar.

I¹m imagining that changing the row style from a table to a form that I can
move the event to the behaviors?  I¹ll be making that change in the next
version or so, but I¹d like to fix this the way it is first.

Any ideas?

Thanks in advance,
-- 
Alex Adams

hawkVision ‹ tools for solving Wicked Problems

(a)2 Technology Partners, Inc.
831-726-8013
a...@a2technology.com
hawkVisionInfo.wordpress.com
universalConnector.wordpress.com

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


Re: [OT] Google Drops Windows

2010-06-01 Thread Alex Adams
Wow!
-- 
Alex Adams

hawkVision ‹ tools for solving Wicked Problems

(a)2 Technology Partners, Inc.
831-726-8013
a...@a2technology.com
hawkVisionInfo.wordpress.com
universalConnector.wordpress.com


> From: stephen barncard 
> Reply-To: How to use Revolution 
> Date: Tue, 1 Jun 2010 11:21:40 -0700
> To: How to use Revolution 
> Subject: [OT] Google Drops Windows
> 
> Another big shift:
> 
> http://www.pcr-online.biz/news/33627/Google-drops-Windows
> 
> -- 
> -
> Stephen Barncard
> San Francisco
> ___
> use-revolution mailing list
> use-revolution@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-revolution

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


Re: How to deal with unplug from the LAN

2010-05-26 Thread Alex Tweedly
Hmmm ... looks like you may have a problem with copy/paste in creating 
this email. in "connectionStatus" the first if ...then...else cluae will 
*always* cause a return, so the check for Airport never gets used. I 
suspect the original code did the Airport check first, then the Ethernet 
one - that would have been OK.


In general, can there not be more than one ethernet interface installed 
- so why not check if *any* interface of the form"enx" ihas status active.


e.g. (typed direct into email - beware typos) ...

set the itemdel to ":"
repeat for each line L in tStatus
  if char 1 to 2 of L = "en" & char 3 to -1 of (item 1 of L) is a 
number then

  put lineOffset (L,tStatus) into tTarget
  put line ((lineOffset ("Status:",tStatus,tTarget))+tTarget) of 
tStatus into tENstatus

   if (item -1 of tENstatus) = " active" then
  return "true"
   end if
end repeat
return 'false'

-- Alex.

On 26/05/2010 18:16, Web Admin Himalayan Academy wrote:
With a tip from Andre, we solved this problem... it's really pretty 
neat. Perhaps someone else may need this.


Mac Only

This queries the hardware-network interface and give you and instant 
response... if the users just unplugs from the network or turns of her 
airport, with a remote volume mounted... you want to be sure you don't 
try to interact with the server...otherwise you will get a 2 minute 
time out waiting before the system gives back the CPU to RunRev


Do this first: (disclaimer, any code I offer probably could be highly 
optimized)


function connectionStatus

   put shell("ifconfig") into tStatus

   # Parse for ethernet status
   put lineOffset ("en0:",tStatus) into tTarget
   put line ((lineOffset ("Status:",tStatus,tTarget))+tTarget) of 
tStatus into tEN0status

   set the itemdel to ":"
   if (item -1 of tEN0status) = " active" then
  return "true"
   else
  return "false"
   end if

   # Check Airport-Wireless status
   put lineOffset ("en1:",tStatus) into tTarget
   put line ((lineOffset ("Status",tStatus,tTarget))+tTarget) of 
tStatus into tEN1status

   set the itemdel to ":"
   if item -1of tEN1status = " active" then
  return "true"
   end if
end connectionstatus

Then all other places you need to interact with the server:

command CheckVarunaIsMounted
   if connectionStatus() <> "True" then
  answer "You appear to be offline line. Connect to the network by 
ethernet or airport. Then try again." with "OK"

  exit to top
   else
  put URL 
"file:/Volumes/Varuna/WWW/*Sites/varuna.hindu.org/ping.txt" into 
gControlFile

  if gControlFile = "true" then
 set the icon of btn "Connected" to 1097
 put "true" into gVarunaMounted
 set the uVarunaMounted of this stack to "true"
  else
 put "false" into gVarunaMounted
 set the uVarunaMounted of this stack to "False"
 set the icon of btn "Connected" to 1098
 answer "Varuna is not mounted. Shall I mount it for you?" 
with "OK"

 mountVaruna
 exit to top
  end if
   end if

end CheckVarunaIsMounted

command Checkin pFileName

   CheckVarunaIsMounted

   if the uVarunaMounted of this stack <> "true" then
  answer  "Sorry, Varuna is not mounted, you cannot check in 
files." with "OK"

  exit to top
   end if

   # increment revision number; change co to CI; retain user initials; 
rename local file

   put pFileName into tNewFileName

etc...

end checkIn

Then I always run this every time I set the default folder to the 
server, when done getting the file listing:


command unTetherStackFromServer
   set the defaultFolder to ($Home&"/Documents/")
end unTetherStackFromServer

and then the user gets no msg saying he can't unmount the volume 
because it is in use by RunRev.


HTH somebody...


Sivakatirswami



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

http://lists.runrev.com/mailman/listinfo/use-revolution



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


Testing a DB connection

2010-05-26 Thread Alex Adams
Does anyone have a simple technique for testing to see if a DB connection is
still functioning before trying to use it to execute some SQL?

I have an app that accesses hosted databases directly (postgres).  Users
logon at app startup.  If they let the app sit for long enough, the
connection to the DB server is dropped.  This is reasonable, but I want a
simple way of testing to see if the connection has been dropped and if it
has to reestablish the connection transparently before executing SQL
statements.

I need a simple isDBStillThere handler.  Is anyone doing anything similar?

Thanks,
-- 
Alex Adams

hawkVision ‹ tools for solving Wicked Problems

(a)2 Technology Partners, Inc.
831-726-8013
a...@a2technology.com
hawkVisionInfo.wordpress.com
universalConnector.wordpress.com

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


Re: Monitor Shell Copy File Progress

2010-05-22 Thread Alex Tweedly
First thought : I thought (according to Dictionary) that "shell" would 
wait until the command was complete before returning - dictionary says
The current handler pauses until the shell returns its result. If the 
command was successful but did not return anything, the shell function 
returns empty.
Second try :   why take a checksum, why not just use the file size ?  
Getting the checksum may involve copying the file from the remote server 
into your laptop to calculate the checksum.


Third try : instead of doing "shell 'cp file ' "  could you do
   load url ("file:" & tRemotepathname)
      check the cachedURLs 
   put url("file:" & tRemotepathname) into url('file:" & tLocalfilename)

-- Alex.

On 22/05/2010 23:35, Sivakatirswami wrote:
Work working on an in-house file manager - RCS for Indesign (since 
Adobe did an "end of life" for Version Cue)


It's coming along well, in fact really well.

One challenge is that I'm using  lots of these:

  put ("mv " & quote & gLocalFilePath & quote &" "& quote & 
(gLocalProjectPath& "/"& tShortFileName) & quote) into tShell

   get shell (tShell)

   put ("cp " & quote & (gLocalProjectPath& "/"& tShortFileName) & 
quote &" "& quote & (gServerProjectPath& "/"& tShortFileName) & quote) 
into tShell

   get shell (tShell)

to more files around and rename them... it works great.

Is there a way to monitor a background shell process like this?

The problem is if you copy from the Big Server on the LAN... to my 
Little MacBook Pro... you won't know when the file is completely 
copied to the local hard drive before doing:


 launch (gLocalProjectPath &"/" & pFileName) with the 
uInDesignPath of this stack


Typically RunRev will issue the unix cp command and then immediately 
launch inDesign, which "crokes" because the file is incomplete on the 
local hard drive.


Now I have some ideas about how to do this: get the checksum some of 
the remote file, do a send in 30 ticks (repeatedly) test of the local 
file until the local file's checksum matches the remote file and then 
launch it.


But before I go after this, I was wondering if anyone had any other 
method?  Most "cool" would be a progress bar, but I'm not sure RunRev 
can monitor a local unix copy file processor, if it can, how to do 
it.


Thanks!
Sivakatirswami





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

http://lists.runrev.com/mailman/listinfo/use-revolution



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


Re: getting the user's (internet, not local network) IP address

2010-05-17 Thread Alex Tweedly

On 17/05/2010 23:48, Bob Sneidar wrote:

That's because you connect to the internet without a gateway/router/firewall, 
in which case there is no public IP. I would rectify that situation pronto. No 
one should connect directly to the internet these days.
   


No, it doesn't necessarily imply that there is no router/firewall. It 
does imply there is no NAT function in the router/firewall, but it's 
perfectly possible, and in fact still fairly common, to have public IP = 
local IP. Most common in medium to large companies which got in early in 
the IP address space race, and have more than enough addresses to have 
no need for address sharing/translation; however, it's also possible for 
any home user who buys dedicated IP address(es) service from their ISP, 
say if they want to run their own servers.


And of course you can have a transparent firewall (e.g. Cisco PIX or 
ASA) either in your own network or in the service provider's regardless 
of whether or not you have NAT in the router.


-- Alex.
___
use-revolution mailing list
use-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 the user's (internet, not local network) IP address

2010-05-14 Thread Alex Tweedly

On 14/05/2010 20:17, Jeff Massung wrote:


This still doesn't [fully] work. While not the local IP address, you'd still
have to perform NAT traversal in order to do any actual communication with
the client machine (read: anything useful).  At best, with this IP address
you can find out the general county/city the client machine is located in.
   
You can't even do that fully reliably. It gets fooled by VPN connections 
and multi-homed campus networks, as well as other obscure configs.


-- Alex.
___
use-revolution mailing list
use-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: Strange results in deletion of lines

2010-05-11 Thread Alex Tweedly

On 11/05/2010 04:51, David C. wrote:

Then I get to build a second version that keeps the deleted "F" items
in place while removing everything else.
Oh what a joy. ;-)

As Geoff demonstrated, the efficient way to do this is with "repeat for 
each line ..." and build up a new output variable.


This is doubly true if you also need to do something with the deleted 
"F" lines 


repeat for each line L in tMyData
   if char 1 of L = "F" then
  process L
  put L & CR after tOutputFLines
   else
 process L differently
 put L & CR after tOutputNonFLines
  end if
end repeat

-- Alex.
___
use-revolution mailing list
use-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: Apple: 100 good reasons for revMobile

2010-05-11 Thread Alex Adams
Touche'
-- 
Alex Adams

hawkVision — tools for solving Wicked Problems

(a)2 Technology Partners, Inc.
831-726-8013
a...@a2technology.com
hawkVisionInfo.wordpress.com
universalConnector.wordpress.com


> From: François Chaplais 
> Reply-To: How to use Revolution 
> Date: Tue, 11 May 2010 20:44:48 +0200
> To: How to use Revolution 
> Subject: Re: Apple: 100 good reasons for revMobile
> 
> 
> Le 11 mai 2010 à 19:11, Kevin Miller a écrit :
> 
>> On 11/05/2010 17:57, "Bob Sneidar"  wrote:
>> 
>>> I submitted my 2 cents. Just a note here, it will not serve us well to use
>>> this as an opportunity to flame Apple or Steve Jobs. Please keep your posts
>>> civilized and hopeful.
>> 
>> I certainly wouldn't want to see people flame Apple or Steve Jobs. If you
>> have some constructive feedback for him I'm sure there would be no harm
>> sending it. Lets keep it professional.
>> 
>> Kind regards,
>> 
>> Kevin
>> 
>> Kevin Miller ~ ke...@runrev.com ~ http://www.runrev.com/
>> RunRev - Software construction for everyone
>> 
>> 
> Right.
> 
> I have read many things bad about Apple on this list. I, personally, do not
> resent Apple for the decision they made. I very much understand Apple's point
> of view and the fact that they value very much their independence. This is the
> same attachment to independence, I feel, that have lead some people to react
> so strongly to Apple's decision. Well, conflicts of interest are not new.
> 
> Please stop these post "Beware Apple; I am going to develop for android". As
> far as I am concerned, I have heard the message. I guess everybody who has
> read the list last week got the message. And my mother has strictly forbidden
> me to express my opinion on android and related Google ventures.
> 
> Retrospectively, I'd rather have kept the 700€ I spent on revMobile to buy
> what is soon to be my iPad. But, at the time, revMobile for the iPhone had me
> convinced, and I do not regret supporting runrev on this opportunity. Well,
> you can't win them all.
> 
> I am happy to learn that runrev will pay some attention to field formatting
> and perhaps an a number of request that are pending at qacenter.
> 
> Best regards,
> François
> 
> ___
> use-revolution mailing list
> use-revolution@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-revolution

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


OT: MacBookPro advice needed.

2010-04-27 Thread Alex Tweedly


I'd like advice in two areas .

1. Should I buy the 13-inch or the 15-inch ?
I can compare the screen sizes, and the resolution and even the relative 
weights.
But I don't have a realistic idea of how much faster the Intel i5 is 
over the older Dual Core.
So any advice about performance, or pointers to reliable benchmark sites 
for Mac ?



2. I plan to dual-boot or triple-boot OSX, Win 7 and Linux (some kind). 
Probably just using Bootcamp, but I might want to use VmWare or other VM 
later.

Any advice on setting the machine up to make this easy ?

Thanks
-- Alex.
___
use-revolution mailing list
use-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: Heather Are You All OK with the Ash!

2010-04-19 Thread Alex Tweedly

Sivakatirswami wrote:
Just checking... last time the ash was a disaster for Scotland... is 
our RunRev Team OK?


It's not causing any problems here other than the shutting down of air 
space (and hence just about all air travel). So unless the Rev team are 
travelling, and can't get home, there should be no problem for them.


-- Alex.
___
use-revolution mailing list
use-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 in Windows

2010-04-15 Thread Alex Tweedly

Sarah Reichelt wrote:

I can't get all the data I need in my bug report down to 1000
characters, so does anyone know of an alternative way to send emails
on Windows?
I want it to go through the user's mail client as I ask them to supply
additional information and attach screen shots. Otherwise I could use
an irev script on my web site.
  


It's kind of lame, but 
copy the data you want to send to the clipboard,
use revmail with a very short message   (something like  " now 
please Paste in the data from the clipboard")



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


Re: Question about RevMobile

2010-04-10 Thread Alex Tweedly

Richard Gaskin wrote:
FWIW, I picked up a netbook a few months ago and have been very happy 
with it.  It weighs only slightly more than an iPad, cost about $200 
less, has a physical keyboard, the screen is self-supported so I don't 
need to hold it with one hand while typing with the other, it folds up 
nicely so I can stuff it in my shoulder bag without worrying about 
screen damage, and best of all it comes bundled with an entire 
computer. :)


I can run anything I want on it:  I'm learning R right now and it's 
nice to be able to have it available on every computer I use.  And of 
course Rev runs well there, even though I've set my netbook up with 
Ubuntu.


I used to use the standard Ubuntu for my netbook until I discovered 
the Ubunutu Netbook Remix, optimized in both architecture and UI for 
netbooks - you can learn more about it here:

<http://www.canonical.com/projects/ubuntu/unr>

You may find Ubuntu more Mac-like than Windows, but there are plenty 
of Windows-based netbooks as well if you prefer, and pretty much all 
netbooks are dirt cheap (usually between US$300 and US$500).


And you can not only run Rev on a netbook, you can use the IDE as 
well.  I've enjoyed many a cappuccino while coding at my corner 
bakery. :)
I thought the reason that netbooks were so cheap was because they were 
under-powered, or under-spec'ed.

Do you find them (or it) adequate for general use ?
Does it run the full Rev IDE  reasonably (I know you use a fairly 
minimalist one most of the time) ?


Thanks
-- Alex.

___
use-revolution mailing list
use-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: Replace command

2010-04-10 Thread Alex Tweedly

David Coker wrote:


There seems to be an easy consensus, so that's the direction I'll take
my code...
Up until now I have never attempted using the wordOffset function for
the small things I've been building with Rev, so I guess it's time to
work it into my coding routines for the future.

Thank you folks so much for the advice and samples!
  

Be a little bit careful here 

the original script you posted (i.e. using replace) will replace the 
string "Piper" with "Jones" - regardless of whether it is an entire word 
on its own or not.
so "abc Piper def" would become "abc Jones def", but also "abc 
ghiPiperjkl def" would become "abc ghiJonesjkl def".


However, using wordoffset as described here will replace the entire 
word, so "abc ghiPiperjkl def" would become "abc jones def" !!


If you only want to replace Piper when it is the entire word, you can 
set  wholeMatches (q.v.) true to get around this.


If not, then you might instead do
  put offset("Piper", tContainer) into tStart
  put "Jones" into char tStart to tStart+4 of tContainer

-- Alex.
  put "Jones" into char (charoffset
___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: Identifying a certain Windows machine

2010-03-31 Thread Alex Tweedly

J. Landman Gay wrote:

Alex Tweedly wrote:

Joe F. wrote:

Wow- that is some answer. Thank you Monte.

I was actually expecting something like "getSystemID" to be built 
into Revtalk, but...


You inspired me to make myself a script library.
Note this approach works 99% of the time, but can go wrong (or at 
least be very confusing) if the user has installed any devices which 
have an in-built MAC address (e.g. a USB Wifi card, perhaps to get 
better reach than the in-built wifi gets, he says from experience 
:-).  This may be the MAC address reported first, giving an "ID" 
which can later change.


Monte's script looks at interface en0. Does your Wifi card register on 
that one?


On OS X it looks at en0, but on Windows it does a search for "Physical 
address", so it uses the first one it happens to find (which is not 
always the LAN cards).


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


Re: ANN: Clipboard Link

2010-03-30 Thread Alex Tweedly

Sounds really interesting Mark. I'll definitely use it.

But I won't use it for code testing - it's just too easy (for someone as 
easily distracted as me) to finish up with slightly different code on 
each machine :-(


I use Dropbox (www.dropbox.com) to automatically sync all my machines - 
happens automatically in the time it takes to walk across the room to 
the other machine.


-- Alex.

Mark Schonewille wrote:

Grrr... you probably want to know where you can download this little app:
http://clipboardlink.economy-x-talk.com

Op 30 mrt 2010, om 01:27 heeft Mark Schonewille het volgende geschreven:


Hello,

Economy-x-Talk has released a new little gem: Clipboard Link. 
Clipboard Link enables you to share the contents of the clipboard of 
your computer with other computers on the same local network. Copy a 
text or picture on one computer and paste it on any computer 
connected to your network.


Because I often develop software on two or more computers 
simultaneously, I frequently want to test the same code on multiple 
machines. Clipboard Link lets me copy a script on my MacBook and 
paste it on my Windows PC for example. Anyone who has ever been in 
the same situation might want to check out Clipboard Link. (Made with 
Revolution).



--
Best regards,

Mark Schonewille

Economy-x-Talk Consulting and Software Engineering
Homepage: http://economy-x-talk.com
Twitter: http://twitter.com/xtalkprogrammer

Economy-x-Talk is always looking for new software development 
projects. Feel free to contact me for a quote.


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

http://lists.runrev.com/mailman/listinfo/use-revolution



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


Re: Identifying a certain Windows machine

2010-03-30 Thread Alex Tweedly

Joe F. wrote:

Wow- that is some answer. Thank you Monte.

I was actually expecting something like "getSystemID" to be built into 
Revtalk, but...


You inspired me to make myself a script library.
Note this approach works 99% of the time, but can go wrong (or at least 
be very confusing) if the user has installed any devices which have an 
in-built MAC address (e.g. a USB Wifi card, perhaps to get better reach 
than the in-built wifi gets, he says from experience :-).  This may be 
the MAC address reported first, giving an "ID" which can later change.


It might be better to do a filter on ""Physical address" and then regard 
each of the physical addresses as valid IDs (disregarding the 
00-00-00-00-00-00 ones for virtual adapters).


And as Peter said, a smart user can find a way around it anyway, a smart 
and malicious user will definitely get around it.


-- Alex.
___
use-revolution mailing list
use-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 Data Woefully Slow

2010-03-26 Thread Alex Tweedly

Mark Wieder wrote:

Alex-

Thursday, March 25, 2010, 5:57:48 PM, you wrote:

  

delete line -1   requires
 search for every CR   (i.e. scan every char in the whole large 
piece of data)

  adjust some pointer to truncate



Not necessarily. See my response to Richard. I'd find the end of the
text and work my way back.

  
You're right Mark. When I said "requires" I should have said "currently 
does" - or even "appears to currently do" :-)


It looks like it would be a worthwhile change to use rindex (or 
equivalent) for all references to "line -N".


-- Alex.
___
use-revolution mailing list
use-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 Data Woefully Slow

2010-03-25 Thread Alex Tweedly

Kay C Lan wrote:

On Thu, Mar 25, 2010 at 8:08 PM, Richard Gaskin
wrote:

  

Moreover, Raney once noted that he took the time to optimize
"put...after..." specifically for cases like yours, so it could be used in
conjunction with "repeat for each" to build a subset of data.

Richard,



any thoughts as to why delete line -1 is so so much slower than delete line
1? Seems illogical.
  

delete line 1requires
   search for 1st CR (i.e. scan 30-80 chars)
either :   copy from there to the end (i.e. move each character).
  or:   manipulate some pointer to say where the data starts
I don't know which of these rev does.


delete line -1   requires
search for every CR   (i.e. scan every char in the whole large 
piece of data)

 adjust some pointer to truncate

Scanning is much slower than simply copying.

You can see this by comparing the times for

  put the milliseconds into tStart
   repeat K timeScale
  put the number of lines in largeData into t
   end repeat
   put the milliseconds - tStart & CR after field "F"
   
   put the milliseconds into tStart

   repeat K times
  put largedata into t
   end repeat
   put the milliseconds - tStart & CR after field "F"
  

-- Alex.

___
use-revolution mailing list
use-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: socket write/read conflict?

2010-03-23 Thread Alex Tweedly

Nicolas Cueto wrote:

Hello List,

I've made a quiz-type game where 2-6 students on client stacks buzz in
their answers to a server stack, all on a local network. The server
stack, as well as sending out the questions, informs live to all the
students/client-stacks about who buzzed in what.

I thought I had it working until we found a problem. If two out of six
students happen to buzz in an answer almost simultaneously (by
clicking a button on a game controller pad), as expected five of the
students will receive the server's message about who buzzed in first,
but one of those two students who buzzed at the same time won't.
Except for this simultaneity, all other server-to-client
communications work.

After trying to track this down for weeks, I'm posting here in hopes
of some list magic.

My guess, as the subject line reads, is that a client stack might be
writing to a socket at the same time that the server is trying to
write to that same socket. But, not understanding well how sockets
work, the problem may lie elsewhere. I think I've eliminated the
obvious types of mistakes, but...

So, I am including below the essence of what my server and script
stacks do. It is quite long, so apologies beforehand.

  


I'm afraid I can't see anything that looks like it could cause your 
problem. What I'd do if it were me is :


1. add a logging capability to the 'chatreceived' handler

on chatReceived s,data
  if gLoggingFile then 
 put the millisecs && s && data &CR after URL gLoggingFile

  end if
  ## Student/client has sent a message.
  ## Perhaps it's a choice/answer ...

2. add a similar log/debug to broadcastToAllClients

3. see what you find out :-)

Also, a couple of comments - some probably just artefacts of summarizing the 
script to send to us.

1. In chatreceived (and clientConnected), you do

   read from socket s with message chatReceived
which would only read one character (according to the docs). I guess you 
really do a "read until someChar ??


2. In clientConnected, you do

   wait 50 milliseconds with messages
   ## Bug? Without this line, read from socket takes a long time
   ## and returns empty.
   read from socket s for 1 line
  
I would recommend that you NEVER do a blocking read in a server. I'd 
make that something like

   read from socket s until CR with message gotClientIdentification
and put the remaining code into gotClientIdentification   (or siply add 
it to the logic in chatreceived).


And I'm pretty sure you can then remove the "wait 50 msec with messages"

3. In the array gAllClientIPsArray, it seems that the 3rd item of each 
entry will always match the key of the array, because of

   put tChatMessage & comma & s into gAllClientIPsArray[s]
That just seems like duplicate effort (and a possible source of error / 
confusion). Why not leave that out, and just use the key ?


4. If you do #3, then you can simplify

on broadcastToAllClients message
   ## Tell all the students/clients who made what choice.
   put keys(gAllClientIPsArray) into tChatterList
   repeat for each line tArrayKey in tChatterList
  put gAllClientIPsArray[tArrayKey] into tArrayDataLine
  -- the client ID, the student ID, the client IP
  -- eg, Blitz-1,1,127.0.0.1:1448
  put item 3 of tArrayDataLine into tSocket
  write message to socket tSocket
   end repeat
  

to

on broadcastToAllClients message
  ## Tell all the students/clients who made what choice.
  repeat for each key tSocket in gAllClientIPsArray
 write message to socket tSocket
  end repeat
end broadcastToAllClients


(Again, this may be due to summarizing, and there may be more to do here 
- but even then it would likely be

  repeat for each element tArrayDataLine in gAllClientsIPsArray
 -- do something to send to  this client
)


Hope that helps a little bit. Try the logging / debug code and see what 
happens (and let us know if it shows anything and we can help with 
analyzing it :-)


-- Alex.
___
use-revolution mailing list
use-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: InetBrowser and sound

2010-03-15 Thread Alex Adams
The brower stack is a companion to a stack that manages URL records.  When a
URL record is loaded, the browser is first closed if open, then reopened and
the new URL put in the address of the browser stack.  I'm not sure what code
I should be posting.  I am not aware of any multiple instantiation going on.
-- 
Alex Adams

hawkVision ‹ tools for solving Wicked Problems

(a)2 Technology Partners, Inc.
831-726-8013
a...@a2tecnology.com
hawkVisionInfo.wordpress.com
universalConnector.wordpress.com


> From: Mark Schonewille 
> Reply-To: How to use Revolution 
> Date: Mon, 15 Mar 2010 17:23:15 +0100
> To: How to use Revolution 
> Subject: Re: InetBrowser and sound
> 
> Alex,
> 
> Are you positive that you are loading a new page in the same browser
> instance, rather than creating a new instance for each page?
> 
> Could you post your script?
> 
> --
> Best regards,
> 
> Mark Schonewille
> 
> Economy-x-Talk Consulting and Software Engineering
> Homepage: http://economy-x-talk.com
> Twitter: http://twitter.com/xtalkprogrammer
> 
> Economy-x-Talk is always looking for new software development
> projects. Feel free to contact me for a quote.
> 
> Op 15 mrt 2010, om 17:19 heeft Alex Adams het volgende geschreven:
> 
>> When I go to a page in the InetBrowser that has sound it starts
>> playing
>> fine, but when I close the InetBrowser window or load another page
>> the sound
>> does not stop playing.  In fact, if I go to a series of pages with
>> sound,
>> the sound tracks from all the pages play simultaneously.
>> 
>> Tacky...
>> 
>> Any ideas?
>> -- 
>> Alex Adams
> 
> 
> ___
> use-revolution mailing list
> use-revolution@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-revolution

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


InetBrowser and sound

2010-03-15 Thread Alex Adams
When I go to a page in the InetBrowser that has sound it starts playing
fine, but when I close the InetBrowser window or load another page the sound
does not stop playing.  In fact, if I go to a series of pages with sound,
the sound tracks from all the pages play simultaneously.

Tacky...

Any ideas?
-- 
Alex Adams

hawkVision ‹ tools for solving Wicked Problems

(a)2 Technology Partners, Inc.
831-726-8013
a...@a2tecnology.com
hawkVisionInfo.wordpress.com
universalConnector.wordpress.com

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


Re: Quartam Reports Image Path

2010-03-13 Thread Alex Adams
Jan,

I tried setting the defaultFolder to that in which the report file and the
image are located.  I did this at the beginning of the mouseUp handler in
the data broker button.  I then just put the name of the image file into to
source property of the image in the report file.  I also tried putting ./and
the image file name.  Neither worked.

Any ideas?
-- 
Alex Adams

hawkVision ‹ tools for solving Wicked Problems

(a)2 Technology Partners, Inc.
831-726-8013
a...@a2tecnology.com
hawkVisionInfo.wordpress.com
universalConnector.wordpress.com


> From: Jan Schenkel 
> Reply-To: How to use Revolution 
> Date: Sat, 13 Mar 2010 09:26:06 -0800 (PST)
> To: How to use Revolution 
> Subject: Re: Quartam Reports Image Path
> 
> --- On Fri, 3/12/10, Alex Adams  wrote:
>> I am including an icon in each
>> Quartam report that I am building.  The image
>> path stored in the report files are literal.  How do I
>> store a relative
>> path?
>> 
>> Thanks,
>> -- 
>> Alex Adams
>> 
> 
> Hi Alex,
> 
> You're not per se limited to absolute paths - if you specify a relative path
> in the filename field, the revEngine will look for your image in a few places.
> Check out the 'defaultFolder' property in the docs.
> 
> HTH,
> 
> Jan Schenkel
> =
> Quartam Reports & PDF Library for Revolution
> <http://www.quartam.com>
> 
> =
> "As we grow older, we grow both wiser and more foolish at the same time."  (La
> Rochefoucauld)
> 
> 
> 
> 
> ___
> use-revolution mailing list
> use-revolution@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-revolution

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


Quartam Reports Image Path

2010-03-12 Thread Alex Adams
I am including an icon in each Quartam report that I am building.  The image
path stored in the report files are literal.  How do I store a relative
path?

Thanks,
-- 
Alex Adams

hawkVision ‹ tools for solving Wicked Problems

(a)2 Technology Partners, Inc.
831-726-8013
a...@a2tecnology.com
hawkVisionInfo.wordpress.com
universalConnector.wordpress.com

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


Re: Row count in datagrid

2010-03-12 Thread Alex Adams
My mistake.  Once I rebuilt the list, it worked fine.

Thanks,
-- 
Alex Adams

hawkVision ‹ tools for solving Wicked Problems

(a)2 Technology Partners, Inc.
831-726-8013
a...@a2tecnology.com
hawkVisionInfo.wordpress.com
universalConnector.wordpress.com


> From: Alex Adams 
> Reply-To: How to use Revolution 
> Date: Fri, 12 Mar 2010 12:18:01 -0800
> To: How to use Revolution 
> Subject: Re: Row count in datagrid
> 
> put the dgNumberOfLines of group "dgConnectedList" of card
> "crdConnectedList" of stack "stkConnections" into rowCount
> Always equates to 0
> 
> What am I doing wrong?
> -- 
> Alex Adams
> 
> hawkVision ‹ tools for solving Wicked Problems
> 
> (a)2 Technology Partners, Inc.
> 831-726-8013
> a...@a2tecnology.com
> hawkVisionInfo.wordpress.com
> universalConnector.wordpress.com
> 
> 
>> From: zryip theSlug 
>> Reply-To: How to use Revolution 
>> Date: Fri, 12 Mar 2010 20:53:49 +0100
>> To: How to use Revolution 
>> Subject: Re: Row count in datagrid
>> 
>> 2010/3/12 zryip theSlug :
>>> 2010/3/12 Alex Adams :
>>>> Simple question.  How do I determine the row count in a datagrid?  I¹ve
>>>> searched through the manual, but I can¹t find it.
>>>> 
>>>> Thanks,
>>>> --
>>>> Alex Adams
>>> 
>>> 
>>> Hi Alex,
>>> 
>>> Have you tried :
>>> 
>>> put the number of lines of the dgProp["columns"] of group "myDataGrid"
>>> 
>>> Note : The columns property return a line delimited list of columns in
>>> your grid.
>> 
>> Why I have read columns ??
>> 
>> For row, have you tried the dgNumberOfLines property?
>> 
>> 
>> Regards,
>> -- 
>> -Zryip TheSlug- wish you the best! 8)
>> http://www.aslugontheroad.co.cc
>> ___
>> use-revolution mailing list
>> use-revolution@lists.runrev.com
>> Please visit this url to subscribe, unsubscribe and manage your subscription
>> preferences:
>> http://lists.runrev.com/mailman/listinfo/use-revolution
> 
> ___
> use-revolution mailing list
> use-revolution@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-revolution

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


Re: Row count in datagrid

2010-03-12 Thread Alex Adams
put the dgNumberOfLines of group "dgConnectedList" of card
"crdConnectedList" of stack "stkConnections" into rowCount
Always equates to 0

What am I doing wrong?
-- 
Alex Adams

hawkVision ‹ tools for solving Wicked Problems

(a)2 Technology Partners, Inc.
831-726-8013
a...@a2tecnology.com
hawkVisionInfo.wordpress.com
universalConnector.wordpress.com


> From: zryip theSlug 
> Reply-To: How to use Revolution 
> Date: Fri, 12 Mar 2010 20:53:49 +0100
> To: How to use Revolution 
> Subject: Re: Row count in datagrid
> 
> 2010/3/12 zryip theSlug :
>> 2010/3/12 Alex Adams :
>>> Simple question.  How do I determine the row count in a datagrid?  I¹ve
>>> searched through the manual, but I can¹t find it.
>>> 
>>> Thanks,
>>> --
>>> Alex Adams
>> 
>> 
>> Hi Alex,
>> 
>> Have you tried :
>> 
>> put the number of lines of the dgProp["columns"] of group "myDataGrid"
>> 
>> Note : The columns property return a line delimited list of columns in
>> your grid.
> 
> Why I have read columns ??
> 
> For row, have you tried the dgNumberOfLines property?
> 
> 
> Regards,
> -- 
> -Zryip TheSlug- wish you the best! 8)
> http://www.aslugontheroad.co.cc
> ___
> use-revolution mailing list
> use-revolution@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-revolution

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


Row count in datagrid

2010-03-12 Thread Alex Adams
Simple question.  How do I determine the row count in a datagrid?  I¹ve
searched through the manual, but I can¹t find it.

Thanks,
-- 
Alex Adams

hawkVision ‹ tools for solving Wicked Problems

(a)2 Technology Partners, Inc.
831-726-8013
a...@a2tecnology.com
hawkVisionInfo.wordpress.com
universalConnector.wordpress.com

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


Re: RevMobile first impressions?

2010-03-05 Thread Alex Shaw

Hi Sarah

Thanks for the all the updates.

For those who haven't seen it..
http://www.tuaw.com/2010/03/05/revmobile-write-iphone-and-ipad-apps-without-knowing-objective/?utm_source=feedburner&utm_medium=feed&utm_campaign=Feed%3A+weblogsinc%2Ftuaw+%28The+Unofficial+Apple+Weblog+%28TUAW%29%29

Hmm.. might be time to buy an iphone.

regards
alex

On 6/03/10 3:33 PM, Sarah Reichelt wrote:

I've now installed my test stack on my iPhone and some of the results
are a bit different:

I can list the files in the default folder (which is in the app
bundle) but I can't create a new file there.
I can't download either a file or a web page from the internet.
Multi-touch definitely works.
Shaking definitely works.
Rotation does nothing.
Accessing the photo library works but is quite slow to display a
selected picture.

The rest is all as I reported earlier.

Cheers,
Sarah

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


Re: socket error 54?

2010-02-17 Thread Alex Tweedly

Jim Bufalini wrote:

Alex Tweedly wrote:

  

What is error 54?
  

Error 54, sometimes known as 10054 or sometimes as 20054 is a hard one
to deal with. It means: Connection reset. (i.e. by the other guy) -



When I first saw the post by Richard, I wondered, because I have seen and
trap for errors like 10053 (connection to server dropped) and 10061 (no
server available on this port), etc. in my *ON socketError pSocket, pError*
handler. But, I had not seen an error of just 53 or 54 or... (or at least I
didn't think I had). 


Alex, Any way of knowing if an error is going to be reported as 10054, 20054
or just 54? What generates this socket error number? Rev? The platform? The
server? It makes a difference to my switch statement. ;-)

  
Don't know for sure, but I believeWin consistently reports socket error 
numbers as 100xx, while I think (maybe) Mac reports them as simply xx

Linux - no idea.

Maybe parse out and switch on the last two digits of the error number ??

-- Alex.

___
use-revolution mailing list
use-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: survey

2010-02-17 Thread Alex Tweedly

Mikey wrote:

Oh, here we go!  Nice catch Klaus.  I did also say "don't" though in my
original post, if we're gonna start tweaking each other over my original
tweak.

Have a great day, guys.

  
It was (IMHO) a fair tweak - I *should* have said "Sure you did, fairly 
recently." rather than "Sure you do."



BTW, is "fortnight" still used in jolly old Mother England?

  

Yes, still in common usage there, and also here in Scotland.

-- Alex.
___
use-revolution mailing list
use-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: socket error 54?

2010-02-17 Thread Alex Tweedly

Richard Gaskin wrote:

Bernard Devlin wrote:


It may be easier to just use my Dreamhost account for this, where it 
works great all the time with files of any size and type.


Or create a CGI on Dreamhost that will relay a file on to another site 
such as BH.


-- Alex.

___
use-revolution mailing list
use-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: socket error 54?

2010-02-16 Thread Alex Tweedly

Richard Gaskin wrote:



What is error 54?


"Connection reset by peer".

But does peer mean the server or your app?
Is it a timeout thing?


It is the server. Can be a timeout, can be policy, can be timeout 
induced by rate-limiting, can be ... darn hard to figure out :-(

Thanks, Sarah.

FWIW, I've found that I can upload the file to the same server without 
difficulty at home, it's only here in the office that the connection 
times out.


I think it may be a router thang, but I've reviewed those settings and 
I can't turn up anything that seems relevant.


But oddly enough, I find that I can upload the same file to Dreamhost 
without difficulty; it's only with Bluehost that I have this issue.


:(



btw - in my other email, I said it meant that you had received a RST 
packet; that's normally the cause, but that's not the *only* way it can 
happen.


Does it happen every time ?
At the same point in the file ?
Are you using same machine in both locations ? Same App, OS, etc. ?





___
use-revolution mailing list
use-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: survey

2010-02-16 Thread Alex Tweedly

Mike Kerner wrote:

Just a note - because I can google it if i really care, but what the hell -
oh sorry - what the bloody hell is a fortnight?

  

As other have said, two weeks.

Sorry, over here in the colonies we don't use such hooey.

  

Sure you do.

VMS (i.e. DEC systems, based in Mass) were well known for the joke of 
having timings defined in microfortnights (pretty close to one second).



-- Alex.
___
use-revolution mailing list
use-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: socket error 54?

2010-02-16 Thread Alex Tweedly

Richard Gaskin wrote:
I have a weird connection which drops my socket about 25MBs into a 
34MB upload using libURL.


The session transcript ends with:
socket error |6927
Error 54 reading socket

What is error 54?
Error 54, sometimes known as 10054 or sometimes as 20054 is a hard one 
to deal with. It means: Connection reset. (i.e. by the other guy) - i.e. 
you receiveed a reset (RST) packet. 


Connection reset by peer.

An existing connection was forcibly closed by the remote host.
This normally results if the peer application on the remote host
is suddenly stopped, the host is rebooted, the host or remote
network interface is disabled, or the remote host uses a hard
close (see *setsockopt*
<http://msdn.microsoft.com/en-us/library/ms740476%28VS.85%29.aspx>
for more information on the SO_LINGER option on the remote
socket). This error may also result if a connection was broken due
to keep-alive activity detecting a failure while one or more
operations are in progress. Operations that were in progress fail
with WSAENETRESET. Subsequent operations fail with WSAECONNRESET.



Can also happen if you go over a policy limit on uploads, or similar.

-- Alex.
___
use-revolution mailing list
use-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: Reading/Deleting Last Line Of File

2010-02-12 Thread Alex Tweedly

Richard Gaskin wrote:

Jim Bufalini wrote:


Richard Gaskin wrote:


But FWIW, I tried your version and it seemed to leave the file
unchanged


If your original file ends in a cr then Alex's code would end in 
absolutely

no change. ;-)


Thanks, Jim.  I tried it both ways; no change to the file's contents, 
although the mod date gets updated so I know it's trying.

I strongly suspect it only works on Windows :-(   Sorry.
I don't have either a Mac or Linux box to try it on, however I did just 
try it on the on-rev server (as an .irev script) and it also appears to 
leave the file unchanged there.


In fact, it gives an error ("error in offset expression") on the seek, 
because the test file is less than 1000 chars - an error which didn't 
get flagged up on Windows. I changed the line from

   seek tFileLength-K in file pFile
to
  if tFileLength-k > 0 then seek tFileLength-K in file pFile
to avoid the error. But it then leaves the file unchanged.

I suspect the *trick* of opening a file for append, then seeking back 
into the middle of the file before doing a write is OS-dependent. It's 
certainly not documented (either way), and I was surprised when Jim said 
that it could be done.
Intuitively, 'append' should mean that the existing file is unchangable 
- all you can do is add to it.


Playing around some more, it appears that the results of write to file 
in these odd cases are not always what you'd expect.


I would have expected the following two fragments to be equivalent


seek to 2 in file "b.txt"
write "x" to file "b.txt"

and


write "x" to file "b.txt" at 2
to be equivalent, but they are not. The latter truncates the file after 
the write, but the former does not (in Windows).


Could you try this in your multi-line msg box and let me know what it 
does on Mac ?

put "abcdefg" & CR into URL "file:b.txt"
put URL "file:b.txt"
open file "b.txt" for append
write "x" to file "b.txt"  at 2
close file "b.txt"
put URL "file:b.txt" after msg

on Win, it produces

abcdefg
abx

Thanks
-- Alex.







___
use-revolution mailing list
use-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: Reading/Deleting Last Line Of File

2010-02-12 Thread Alex Tweedly

Jim Bufalini wrote:

Richard Gaskin wrote:

  

But FWIW, I tried your version and it seemed to leave the file
unchanged



If your original file ends in a cr then Alex's code would end in absolutely
no change. ;-)
  
That's not what my testing showed (or appeared to show). Here's the 
short version of the test script, and the corresponding output
note the first example has a single final CR, the second has no CR and 
the third one has multiple CRs, and each is correctly truncated.


(I missed a few test cases here - empty file, single line of data, etc.  
but it is only "reasonably  tested")


The test stack can be downloaded from 
http://www.tweedly.org/deletelastline.rev
(btw - I don't currently have access to a mac, so it's only tested on 
Windows. Could that cause the different result for Richard ?)



on mouseUp
  
   put empty into field "F"

   put "abcdefg" & CR into t
   put "1234567" & CR after t
   put t into URL ("file:a,b.txt")
   put "abcdefg" & CR into t
   put "1234567"  after t
   put t into URL ("file:b.txt")
   put "abcdefg" & CR into t
   put "1234567" & CR &CR after t
   put t into URL ("file:c.txt")
   putfile "a,b.txt"
   deletelastline "a,b.txt"
   putfile "a,b.txt"

   putfile "b.txt"

   deletelastline "b.txt"
   putfile "b.txt"
   
   putfile "c.txt"

   deletelastline "c.txt"
   putfile "c.txt"
end mouseUp
 
on putfile p

   put "file " && p & CR after field "F"
   put URL ("file:" & P) after field "F"
   put "endoffile" & CR after field "F"
end putfile
 

giving


file  a,b.txt
abcdefg
1234567
endoffile
file  a,b.txt
abcdefg
endoffile
file  b.txt
abcdefg
1234567endoffile
file  b.txt
abcdefendoffile
file  c.txt
abcdefg
1234567

endoffile
file  c.txt
abcdefg
1234567
endoffile


-- Alex.
___
use-revolution mailing list
use-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: Reading/Deleting Last Line Of File

2010-02-12 Thread Alex Tweedly

Jim Bufalini wrote:


Just one thing Alex, you need to:

put URLDecode(the detailed files) into t

in case the file name has, for example, a space in it.
  

Thanks Jum, I didn't spot that.

But then, if the file name had a comma in it, I'd be caught out. I think 
what I needed was to URLEncode(pFile) to use in the filter :



on deletelastline pFile
   constant K = 1000
   put the detailed files into t
   filter t with URLEncode(pFile) & ",*"
   put item 2 of t into tFileLength
   
   open file pFile for read

   seek to tFileLength-K in  file pFile
   read from file pFile until end
   close file pFile
   
   put the number of chars in the last line of it into tNum
   
   open file pFile for append

   write empty to file pFile at (tFileLength-tNum-3)
   close file pFile
   
   end deletelastline

-- Alex.
___
use-revolution mailing list
use-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: Reading/Deleting Last Line Of File

2010-02-12 Thread Alex Tweedly

Richard Gaskin wrote:

That looks similar to what I posted here on the 9th:

   open file tFile for update
   seek relative -1000 in file tFile
   repeat
  read from file tFile until cr
  if it is not empty then
 put it after tBuffer
  else
 delete last line of tBuffer
 write tBuffer to file tFile
  end if
   end repeat
   close file tFile

Does that not do what you need?

No, it doesn't. If a file is opened for 'update' then any write to the 
file simply overwrites any existing characters at the appropriates 
position(s), and leaves everything following that unchanged. There is no 
EOF implied by a write in update mode. There is an EOF inserted after a 
write if the file is opened in 'append' mode - but then you cannot read 
from it.


(Actually, there is another additional reason - each time you do a 
'read' that updates the file pointer, so the subsequent write would 
begin at the file position immediately *after* the last read, not where 
the read had been done from; you would have needed another seek before 
write  (or do a 'write at x') to have a chance, but you'd still need Rev 
to provide access to truncate() after your write.)


-- Alex.
___
use-revolution mailing list
use-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: Reading/Deleting Last Line Of File

2010-02-12 Thread Alex Tweedly

Jeff Massung wrote:


I'm still new to Rev, but in other languages this is dead simple:


  

...

// nuke everything else at the end of the file
trunctate(fp, new_len);

  

...

Done.

Now, maybe this isn't as easy in Rev as it is in C and *many* other
languages. But it should be [if it isn't].
  
That is *exactly* the problem - Rev doesn't expose ftruncate() (or 
ftell() either), so what should be very simple becomes very difficult.


In C, or Python, or even shell it is simple, but Rev's incomplete 
interface to the file system causes the problem.


I opened  a RQCC report  (#1851) in 2004 to request the enhancement of 
providing a way to get the file position (i.e. ftell()). That report 
remains "Unconfirmed".


Given that response, I have not chosen to waste any time entering an 
enhancement request for truncate.


-- Alex.
___
use-revolution mailing list
use-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   9   10   >