Progress Bar Updates

7 messages Options
Embed this post
Permalink
Bill Vlahos

Progress Bar Updates

Reply Threaded More More options
Print post
Permalink
I've successfully used libURLSetStatusCallback for getting the status  
when downloading from a web server and updating a progress bar.  
However, when I try it for opening a file from a file server it  
doesn't work. Below is the code for the file server open in a button.

global vSyslogFile

on mouseUp
    answer file "Open Syslog File:"
    if it is not empty then
       libURLSetStatusCallback "myProgress",the long ID of me
       show sb 1 -- progress bar
       put URL ("file:" & it) into vSyslogFile
       hide sb 1
    end if
end mouseUp

on myProgress theURL,theStatus
   if "loading" is item 1 of theStatus then set the thumbpos of sb 1  
to (item 2 of theStatus/item 3 of theStatus)*(the endvalue of sb 1-
startvalue of sb 1)
end myProgress

Does this not work for these kinds of put URL commands?

Bill Vlahos
_________________
InfoWallet (http://www.infowallet.com): Remember the important details  
of life.

_______________________________________________
use-revolution mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution
Alex Tweedly

Re: Progress Bar Updates

Reply Threaded More More options
Print post
Permalink
Bill Vlahos wrote:

> I've successfully used libURLSetStatusCallback for getting the status
> when downloading from a web server and updating a progress bar.
> However, when I try it for opening a file from a file server it
> doesn't work. Below is the code for the file server open in a button.
>
> global vSyslogFile
>
> on mouseUp
>    answer file "Open Syslog File:"
>    if it is not empty then
>       libURLSetStatusCallback "myProgress",the long ID of me
>       show sb 1 -- progress bar
>       put URL ("file:" & it) into vSyslogFile
>       hide sb 1
>    end if
> end mouseUp
>
> on myProgress theURL,theStatus
>   if "loading" is item 1 of theStatus then set the thumbpos of sb 1 to
> (item 2 of theStatus/item 3 of theStatus)*(the endvalue of sb
> 1-startvalue of sb 1)
> end myProgress
>
> Does this not work for these kinds of put URL commands?

No, it doesn't. The docs for it say
> Summary:
> Sets up a callback message to be sent periodically during uploads and
> downloads.
When you do, e.g.,     put URL ("file:abc.txt") into temp
control doesn't return to you until the put is complete.

-- Alex.

_______________________________________________
use-revolution mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution
Sarah Reichelt-2

Re: Progress Bar Updates

Reply Threaded More More options
Print post
Permalink
In reply to this post by Bill Vlahos
On Fri, Nov 6, 2009 at 4:31 AM, Bill Vlahos <[hidden email]> wrote:
> I've successfully used libURLSetStatusCallback for getting the status when
> downloading from a web server and updating a progress bar. However, when I
> try it for opening a file from a file server it doesn't work.


Have a look at this revLesson:
<http://lessons.runrev.com/spaces/lessons/buckets/784/lessons/7285-How-to-show-the-progress-of-a-download>

Cheers,
Sarah
_______________________________________________
use-revolution mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution
Josh Mellicker

Re: Progress Bar Updates

Reply Threaded More More options
Print post
Permalink
Although not at all as comprehensive as Sarah's, this code updates a  
human-readable time left and download speed status text under the bar:

http://revcoders.org/calctimeremaining/


On Nov 5, 2009, at 2:49 PM, Sarah Reichelt wrote:

> On Fri, Nov 6, 2009 at 4:31 AM, Bill Vlahos <[hidden email]> wrote:
>> I've successfully used libURLSetStatusCallback for getting the  
>> status when
>> downloading from a web server and updating a progress bar. However,  
>> when I
>> try it for opening a file from a file server it doesn't work.
>
>
> Have a look at this revLesson:
> <http://lessons.runrev.com/spaces/lessons/buckets/784/lessons/7285-How-to-show-the-progress-of-a-download 
> >
>
> Cheers,
> Sarah
> _______________________________________________
> use-revolution mailing list
> [hidden email]
> Please visit this url to subscribe, unsubscribe and manage your  
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-revolution

_______________________________________________
use-revolution mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution
Rick Harrison

Reading/Writing On-Rev Files

Reply Threaded More More options
Print post
Permalink
In reply to this post by Bill Vlahos
Hi there,

I have a standalone stack I have uploaded to
On-Rev which is supposed to read in some
external files which are also on On-Rev.
Those files are located in the same folder
as the standalone application on On-Rev.

The problem is - what is the pathname to use?

If I look at the default folder it is pointing to the
user's desktop machine rev-plugin.  I need
the path to the On-Rev folders.

Ideas?  Suggestions?

Thanks in advance,

Rick
_______________________________________________
use-revolution mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution
J. Landman Gay

Re: Reading/Writing On-Rev Files

Reply Threaded More More options
Print post
Permalink
Rick Harrison wrote:
> Hi there,
>
> I have a standalone stack I have uploaded to
> On-Rev which is supposed to read in some
> external files which are also on On-Rev.
> Those files are located in the same folder
> as the standalone application on On-Rev.
>
> The problem is - what is the pathname to use?

Get the filename of your main stack, then parse it to replace the item
after the last slash with the file you want to access.

--
Jacqueline Landman Gay         |     [hidden email]
HyperActive Software           |     http://www.hyperactivesw.com
_______________________________________________
use-revolution mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution
Rick Harrison

Re: Reading/Writing On-Rev Files

Reply Threaded More More options
Print post
Permalink
Hi Jacqueline,

I used:

    put the filename of this stack into VarShowStackName
    answer "VarShowStackName = " & VarShowStackName

It returns nothing in the standalone.

As a desktop application it works fine.

Am I missing some library?

Suggestions?

Rick


On Nov 6, 2009, at 5:42 PM, J. Landman Gay wrote:

> Rick Harrison wrote:
>> Hi there,
>> I have a standalone stack I have uploaded to
>> On-Rev which is supposed to read in some
>> external files which are also on On-Rev.
>> Those files are located in the same folder
>> as the standalone application on On-Rev.
>> The problem is - what is the pathname to use?
>
> Get the filename of your main stack, then parse it to replace the  
> item after the last slash with the file you want to access.
>
> --
> Jacqueline Landman Gay         |     [hidden email]
> HyperActive Software           |     http://www.hyperactivesw.com
> _______________________________________________
> use-revolution mailing list
> [hidden email]
> Please visit this url to subscribe, unsubscribe and manage your  
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-revolution

__________________________________
Rick Harrison

You can buy my $10 music album "Funny Time Machine" digital CD on the  
iTunes Store Now!

To visit the iTunes Store now to listen to samples of my CD please  
click on the
following link.  (Please note you must have iTunes installed on your  
computer for this link to work.)

http://phobos.apple.com/WebObjects/MZStore.woa/wa/viewAlbum?playListId=213668290


_______________________________________________
use-revolution mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution