Client Command "readfile"

Das Goravani goravanis at gmail.com
Mon Apr 25 15:35:52 UTC 2022


Dear Paul,

I’m doing the readfile command exactly as you laid out. It’s pretty simple actually, though it has little parts you have to tend to here, and there, but I have done them all. Still it isn’t working. I will try to get into the errortext portion to see if I can learn anything, but in fact it doesn’t seem like the filereadcomplette method is being called at all. So I might not get error text either. I thought about the File control, using it instead, that is a bit not intuitive for me, but it too seems do able, understandable, not that hard. I wish this readfile would work though. 

Das

> On Apr 25, 2022, at 2:33 AM, Paul Mulroney via omnisdev-en <omnisdev-en at lists.omnis-dev.com> wrote:
> 
> Hi Das,
> 
> I've not used the readfile client command, but we have used the file control component to upload/download files to/from the browser to the server.
> 
> Reading the docs, it seems that the readfile client command should be called in response to an evDrop event - if you drag a file from the file system onto a jsClient component, you will get an evDrop event in the object's $event.  If the pDragType is kDragFiles, then you know it's a file being dropped.
> 
> Then you do $cinst.$clientcommand('readfile',lrow) to trigger the transfer to the server
> Then the top level form will get a $filereadcomplete message.
> 
> The $filereadcomplete method has two parameters - ident and errortext.  If it didn't upload properly, the errortext parameter should have some info in it.
> 
> It seems a little fiddly to setup, but hopefully this helps!
> 
> Regards,
> Paul.
> 
> 
>> On 24 Apr 2022, at 3:50 am, Das Goravani <goravanis at gmail.com> wrote:
>> 
>> 
>> I have a client command that I’m sending. It’s the "readfile" type. It is supposed to run $filereadcomplete after it reads in the file.
>> I have a "Sound bell" in that $filereadcomplete method, and I’m not hearing any bells.
>> 
>> I am issuing the client command from an $event of a list on the form.
>> 
>> This is my client command:
>> 
>> Calculate lrow as row(iIdent,'iBinData',kTrue)
>> Do $cinst.$clientcommand("readfile",lrow) Returns #F
>> 
>> iIdent is the ident that the drop gives.
>> iBinData is the name of the field I want it read into.
>> kTrue just says I want base64
>> 
>> $filereadcomplete is a built in method that I overrode to make it a client executed method I could put code in. 
>> 
>> There I have sound bell and a little bit of code
>> 
>> The net result is not happening. The base64 is not appearing. I know I can’t trust the bell on client executed methods with Safari. So I’m not trusting it. 
>> 
>> The other way I check is did the base64 make it into my list and no it is not. 
>> 
>> So something isn’t working. 
>> 
>> Any ideas?
>> 
>> _____________________________________________________________
>> Manage your list subscriptions at https://lists.omnis-dev.com
>> Start a new message -> mailto:omnisdev-en at lists.omnis-dev.com 
> 
> 
> 
> 
>  <https://www.logicaldevelopments.com.au/>	Paul W Mulroney
> Logical Developments
> Customised Software Solutions
> Ph: 08 9458 3889
> 	We Don't Do Simple Pty Ltd
> trading as
> Logical Developments
> ACN 161 009 374
> 	  <https://www.facebook.com/logicaldevelopmentswa/>   <https://twitter.com/WeDontDoSimple>   <https://www.linkedin.com/company/logicaldevelopments/>   <https://www.youtube.com/channel/UCPldVVgWR05WX3cVrR5WUQw>
> _____________________________________________________________
> Manage your list subscriptions at https://lists.omnis-dev.com
> Start a new message -> mailto:omnisdev-en at lists.omnis-dev.com 



More information about the omnisdev-en mailing list