Re: put put

2009-12-17 Thread Malte Pfaff-Brill
Just for the record: It was a server side problem. The server required 
connection: keep alive in the http headers to fully download the pdf file.

Thanks for the help though.

All the best,

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


Re: put put

2009-12-09 Thread Malte Pfaff-Brill

Ok,

I don´t get it. It does not seem a general problem, which makes it  
even stranger. At least I know now it does not have to do with the 4.0  
engine. Also happens with a 3.5 standalone.


The scenario is as follows. rev client communicates with a server. It  
fails most of the time on one XP and at least one Win 7 machines. A  
whole bunch of other XP machines and Vista machines are known to work.  
If it fails, it is the download process that does (thanks for the  
suggestion Dave). I get all kinds of fun errors. First: error 10038 on  
socket, which if I understand it correctly means, I am not  
communicating with a socket at all. Next error: No headers sent. Next  
the result is empty, but only half of the data is received (exactly  
the half). This is s weird. The only scenario where I could  
reproduce it, without having to open a teamviewer session is a machine  
that hosts both server and client. Now it gets strange. If I connect  
from a remote machine to said server (while the same IP is used) all  
works fine on the remote machine. If I connect the "broken" machine to  
a remote server, it also works. also there are at least 10 other  
machines (both Macs and PCs) where the same scenario (one machine  
hosts server and client) just works perfectly... I have no idea...  
Just standing here shrugging. I will now try to load URL first and  
then write from the cachedUrls. If that´s no worky I give up  
suspecting that the wee free men got hold of the machine and just left  
some critters in there. Tis not me. I start doubting it is rev, though  
I can access the documents with a webbrowser. Overcaffeinated.  
Clueless... *shrug*


Thanks for your time.

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


Re: put put

2009-12-08 Thread Dave Cragg
Malte, I think there may be a few minor changes in the version shipping with 
Rev 4. (But nothing that obviously changes previous working.)

In your code, I'd suggest you split the following line:

> put URL tPath into URL ("binFile:"& tTempPath)

into two parts, and add error checking after each part.

put URL tPath into tData
if the result is not empty then
  answer the result -- or whatever
else
  put tData into URL ("binFile:"& tTempPath)
  if the result is not empty then
  answer the result -- or whatever
  end if
end if

In that way you can see if the problem concerns the download or saving to file.

Cheers
Dave



On 8 Dec 2009, at 15:18, Malte Pfaff-Brill wrote:

> I think something is fishy with libURL in Rev 4. Some script that used to 
> work in previous versions now breaks with the current engine.
> 
> local tPath, tTempPath
>put getServerUrl()&"test.pdf" into tPath
>put the tempname & ".pdf" into tTempPath
>libURLSetStatusCallback "dataupdate",the long id of sb 1 of stack 
> "progressupdate"
>send "init" to stack "progressUpdate"
>set the filetype to "prvwPDF "
>put URL tPath into URL ("binFile:"& tTempPath)
>libURLSetStatusCallback
>close stack "progressUpdate"
>launch document tTempPath
> 
> This works sometimes(on Windows XP), most of the time it does not and we end 
> up with half downloaded files or 0 byte files. Rather strange, because until 
> now it used to work. Has anyone else seen strangeness with put? Any 
> workarounds we could try?
> 
> Cheers,
> 
> Malte
> ___
> use-revolution mailing list
> use-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: put put

2009-12-08 Thread Andre Garzia
Malte,

do you still have the dps of version 4? Try building with dp-3 or dp-4 but
not with gm-1 see if it goes away...

Cheers
andre

On Tue, Dec 8, 2009 at 1:18 PM, Malte Pfaff-Brill wrote:

> I think something is fishy with libURL in Rev 4. Some script that used to
> work in previous versions now breaks with the current engine.
>
> local tPath, tTempPath
>put getServerUrl()&"test.pdf" into tPath
>put the tempname & ".pdf" into tTempPath
>libURLSetStatusCallback "dataupdate",the long id of sb 1 of stack
> "progressupdate"
>send "init" to stack "progressUpdate"
>set the filetype to "prvwPDF "
>put URL tPath into URL ("binFile:"& tTempPath)
>libURLSetStatusCallback
>close stack "progressUpdate"
>launch document tTempPath
>
> This works sometimes(on Windows XP), most of the time it does not and we
> end up with half downloaded files or 0 byte files. Rather strange, because
> until now it used to work. Has anyone else seen strangeness with put? Any
> workarounds we could try?
>
> Cheers,
>
> Malte
> ___
> use-revolution mailing list
> use-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


Re: put put

2009-12-08 Thread Malte Pfaff-Brill
I think something is fishy with libURL in Rev 4. Some script that used  
to work in previous versions now breaks with the current engine.


local tPath, tTempPath
put getServerUrl()&"test.pdf" into tPath
put the tempname & ".pdf" into tTempPath
libURLSetStatusCallback "dataupdate",the long id of sb 1 of stack  
"progressupdate"

send "init" to stack "progressUpdate"
set the filetype to "prvwPDF "
put URL tPath into URL ("binFile:"& tTempPath)
libURLSetStatusCallback
close stack "progressUpdate"
launch document tTempPath

This works sometimes(on Windows XP), most of the time it does not and  
we end up with half downloaded files or 0 byte files. Rather strange,  
because until now it used to work. Has anyone else seen strangeness  
with put? Any workarounds we could try?


Cheers,

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


Re: Put Put

2009-12-07 Thread DunbarX
Andre.

It wasn't me. I just butted in.

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


Re: Put Put

2009-12-07 Thread Andre Garzia
Craig,

put should be blocking, actually, I know it is blocking! I've been blocked
by it many times. I don't know why you're experiencing that behaviour at all
but I am trying to work around it. I don't know how familiar you are with
liburl callbacks. You can basically tell it to execute a command and when
that command completes execute something else. In your case you could use
liburlftpupload call and pass the callback you want to execute when it
complete. Bonus point this is asynchronous so there's no blocking and it
doesn't need to have one. You still face the previous request not completed
if the thing hangs out forever but I do think it will queue the transactions
so that multiple calls just fill a queue but I can recall if that works with
ftp calls.

Andre

On Mon, Dec 7, 2009 at 4:59 PM,  wrote:

>
> In a message dated 12/7/09 1:54:15 PM, an...@andregarzia.com writes:
>
> Andre.
>
> I am always trying to change my habits, to use "send in time" instead of
> wait. But here I intended it to be used well before the handler actually
> does
> anything, likely right after the "case" statement. A simple block of errant
> keypresses, and no danger, as you pointed out, of anything running amok.
>
> I get it, though.
>
> > Craig,
> >
> > never use a wait call while there's a network transaction going on.
> LibURL
> > does not like wait commands.
> >
> > Andre
> >
>
> ___
> use-revolution mailing list
> use-revolution@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-revolution
>



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


Re: Put Put

2009-12-07 Thread DunbarX

In a message dated 12/7/09 1:54:15 PM, an...@andregarzia.com writes:

Andre.

I am always trying to change my habits, to use "send in time" instead of 
wait. But here I intended it to be used well before the handler actually does 
anything, likely right after the "case" statement. A simple block of errant 
keypresses, and no danger, as you pointed out, of anything running amok.

I get it, though.

> Craig,
> 
> never use a wait call while there's a network transaction going on. LibURL
> does not like wait commands.
> 
> Andre
> 

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


Re: Put Put

2009-12-07 Thread Andre Garzia
Craig,

never use a wait call while there's a network transaction going on. LibURL
does not like wait commands.

Andre

On Mon, Dec 7, 2009 at 4:47 PM,  wrote:

> I am a newbie here, but would inserting a "wait for messages" prevent the
> errant keypress?
>
> But is that slightly different than what you really want, which is to
> ignore double keypresses? In HC I would have said:
>
> ...
> wait 15
> if the mouseClick then exit yourHandler
> ...
>
> This works in rev, too.
>
> Craig Newman
> ___
> use-revolution mailing list
> use-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


Re: Put Put

2009-12-07 Thread DunbarX
I am a newbie here, but would inserting a "wait for messages" prevent the 
errant keypress?

But is that slightly different than what you really want, which is to 
ignore double keypresses? In HC I would have said:

...
wait 15
if the mouseClick then exit yourHandler
...

This works in rev, too.

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


Re: Put Put

2009-12-07 Thread Andre Garzia
Dan,

this is me guessing here, but why don't you use a script local variable like

local lRunning

on doSave
 if lRunning is true then
  send "doSave" to me in 200 millisecs
 end if
 put true into lRunning
 put "ftp://admin:passw...@123.456.789.012/UploadTest.txt"; into ftpPath
 --use a valid path
 put "This is a test" into url ftpPath
 if the result <> "" then
   put false into lRunning
   answer the result
 end if
put false into lRunning
end doSave

With such script you can be sure that no doSaves can work at the same time,
of course, you can enter a loop if doSave never returns...



On Mon, Dec 7, 2009 at 4:34 PM, Dan Friedman wrote:

> Hiya...
>
> Isn't the "put" command blocking?  I find that if I call a 'put' to write
> to a server twice in fast succession, the second 'put' is handled BEFORE the
> first one is complete.  For example:
>
> I made a new stack with this script:
>
> on doSave
>  put "ftp://admin:passw...@123.456.789.012/UploadTest.txt"; into ftpPath
>  --use a valid path
>  put "This is a test" into url ftpPath
>  if the result <> "" then
>answer the result
>  end if
> end doSave
>
> Then, I added a menu with a Command-S "Save" option with this script:
>
> on menuPick pWhich
>  switch pWhich
>  case "Save"
>doSave
>break
>  case "Quit"
>--Insert script for Quit menu item here
>break
>  end switch
> end menuPick
>
> Then, type Command-S twice - quickly.  POOF!  You get "error Previous
> request not complete".  Shouldn't the first Save complete before the second
> one is even dealt with?  What am I doing wrong?
>
> Thanks in advance,
> -Dan___
> use-revolution mailing list
> use-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