Re: Local files in browser widget

2019-07-15 Thread J. Landman Gay via use-livecode
Thanks Ralph, I did create a 64-bit apk with LC 9.5. I've had a couple 
of people try my test app. It works on a Pixel 2, and a Moto-something, 
and my Huawei tablet. So far it only fails on my Pixel.


If anyone out there happens to have an (original) Pixel phone and is 
willing to do a quick test, that'd be great. The apk has a single 
browser widget with a lot of text, and the test would be to see if you 
can scroll to the bottom. I'm hoping the problem is my particular setup 
and not the Pixel model itself.


On 7/14/19 7:44 PM, Ralph DiMola wrote:

Are you using 9.5? If not maybe a 64 bit build might work???

Ralph DiMola
IT Director
Evergreen Information Services
rdim...@evergreeninfo.net

-Original Message-
From: use-livecode [mailto:use-livecode-boun...@lists.runrev.com] On Behalf
Of J. Landman Gay via use-livecode
Sent: Sunday, July 14, 2019 4:27 PM
To: How to use LiveCode
Cc: J. Landman Gay
Subject: Re: Local files in browser widget

I'm making progress but still having trouble with the browser widget on
Android. To date:

1. Chopped up the huge file into multiple smaller files. They have all been
tagged so that links automatically load the correct file when clicked. This
works.

2. The app now copies all the files in its resources folder to the documents
folder. This works.

3. When loading the first file of the set, it works perfectly. When tapping
a link that loads another file in the set, things happen sometimes.

On my Huawei tablet, everything works great. But on my Pixel, after
scrolling two or three screens, everything freezes. Not only does the
browser refuse to scroll (even backwards, where it's already been,) but HTML
links don't respond, and buttons and other controls are inert. The backKey
is also frozen, so the only option is to exit via the Home hardware button
and remove the app from RAM. This is 100% reproducible.

My Pixel is running Android 9 Pie and the Huawei has Android 8 Oreo. The
Huawei also has newer hardware than the Pixel. Is the browser widget
compatible with Android 9? Or is it a hardware problem?




--
Jacqueline Landman Gay | jac...@hyperactivesw.com
HyperActive Software   | http://www.hyperactivesw.com

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


RE: Local files in browser widget

2019-07-14 Thread Ralph DiMola via use-livecode
Are you using 9.5? If not maybe a 64 bit build might work???

Ralph DiMola
IT Director
Evergreen Information Services
rdim...@evergreeninfo.net

-Original Message-
From: use-livecode [mailto:use-livecode-boun...@lists.runrev.com] On Behalf
Of J. Landman Gay via use-livecode
Sent: Sunday, July 14, 2019 4:27 PM
To: How to use LiveCode
Cc: J. Landman Gay
Subject: Re: Local files in browser widget

I'm making progress but still having trouble with the browser widget on
Android. To date:

1. Chopped up the huge file into multiple smaller files. They have all been
tagged so that links automatically load the correct file when clicked. This
works.

2. The app now copies all the files in its resources folder to the documents
folder. This works.

3. When loading the first file of the set, it works perfectly. When tapping
a link that loads another file in the set, things happen sometimes.

On my Huawei tablet, everything works great. But on my Pixel, after
scrolling two or three screens, everything freezes. Not only does the
browser refuse to scroll (even backwards, where it's already been,) but HTML
links don't respond, and buttons and other controls are inert. The backKey
is also frozen, so the only option is to exit via the Home hardware button
and remove the app from RAM. This is 100% reproducible.

My Pixel is running Android 9 Pie and the Huawei has Android 8 Oreo. The
Huawei also has newer hardware than the Pixel. Is the browser widget
compatible with Android 9? Or is it a hardware problem?

-- 
Jacqueline Landman Gay | jac...@hyperactivesw.com
HyperActive Software   | http://www.hyperactivesw.com

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


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


Re: Local files in browser widget

2019-07-14 Thread J. Landman Gay via use-livecode
I'm making progress but still having trouble with the browser widget on 
Android. To date:


1. Chopped up the huge file into multiple smaller files. They have all 
been tagged so that links automatically load the correct file when 
clicked. This works.


2. The app now copies all the files in its resources folder to the 
documents folder. This works.


3. When loading the first file of the set, it works perfectly. When 
tapping a link that loads another file in the set, things happen sometimes.


On my Huawei tablet, everything works great. But on my Pixel, after 
scrolling two or three screens, everything freezes. Not only does the 
browser refuse to scroll (even backwards, where it's already been,) but 
HTML links don't respond, and buttons and other controls are inert. The 
backKey is also frozen, so the only option is to exit via the Home 
hardware button and remove the app from RAM. This is 100% reproducible.


My Pixel is running Android 9 Pie and the Huawei has Android 8 Oreo. The 
Huawei also has newer hardware than the Pixel. Is the browser widget 
compatible with Android 9? Or is it a hardware problem?


--
Jacqueline Landman Gay | jac...@hyperactivesw.com
HyperActive Software   | http://www.hyperactivesw.com

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


RE: Local files in browser widget

2019-07-12 Thread Ralph DiMola via use-livecode
I was looking at my code that works. I move the file into the documents folder 
and do "file:" documents folder&"mydoc.html"

Ralph DiMola
IT Director
Evergreen Information Services
rdim...@evergreeninfo.net

-Original Message-
From: use-livecode [mailto:use-livecode-boun...@lists.runrev.com] On Behalf Of 
J. Landman Gay via use-livecode
Sent: Friday, July 12, 2019 3:47 PM
To: How to use LiveCode
Cc: J. Landman Gay
Subject: Re: Local files in browser widget

On 7/12/19 1:52 PM, Klaus major-k via use-livecode wrote:
> Hi Jaques,
> 
>> Am 12.07.2019 um 20:43 schrieb J. Landman Gay via use-livecode 
>> :
>>
>> On 7/12/19 9:10 AM, Devin Asay via use-livecode wrote:
>>> On Jul 11, 2019, at 9:34 PM, J. Landman Gay via use-livecode 
>>>  wrote:
>>>>
>>>> I think I asked this before but it isn't working now. I thought 
>>>> specialFolderPath("resources") was okay for read-only files. It fails on 
>>>> Android.
>>>>
>>>> put specialFolderPath("resources") & "/tFolder/tFile.html" into 
>>>> tPath set the url of widget "browser" to ("file://" & tPath)
>>>>
>>>> I get an error that the file was not found. It's there, the folder was 
>>>> included in the Copy Files pane in standalone settings. When I insert an 
>>>> answer dialog to view the path, there's a string that ends with 
>>>> "...base.apk/tFolder/tFile.html" so I think that's right.
>>>>
>>>> Do I need more or fewer slashes?
>>> J,
>>> I don’t think you need the slashes after file: at all. (“file:” & 
>>> specialFolderPath(“resources”) & “/tFolder/tFile.hmtl”) should do it.
>>> Also check case on folder and file names. Case matters in mobile file 
>>> systems in my experience.
>>
>> Thanks Devin, but unfortunately it still doesn't work. Capitalization is 
>> correct (all lower case.) I also tried adding the internet library and 
>> tsNet, even though I don't use those, just to see if they were required. 
>> Still no go.
> 
> just to be sure, did you:
> ...
> replace SPACE with "%20" in tPath
> ...
> ?

I didn't, but there are no spaces in the file name.

But I've just found something interesting. Devin was right, I don't need any 
slashes to read the resources folder in the apk. But I can't use it as a URL in 
a browser. I can use it to copy the file from the resources folder to the 
documents folder, but it fails if I directly set the URL of the browser widget.

   put specialFolderPath("resources") & "/tFolder/tFile" into tSourcePath
   answer (there is a file tSourcePath) -> TRUE
   set the URL of widget "browser" to ("file:" & tSourcePath) -> file not found
   put specialFolderPath("documents") & "/tFolder/" into tDir
   if there is no folder tDir then create folder tDir
   put tDir & tFile into tLocalPath
   put url ("file:" & tSourcePath) into url ("file://" & tLocalPath)
   set the URL of widget "browser" to ("file://" & tLocalPath) -> OK

Maybe browsers can't read files inside packages?

-- 
Jacqueline Landman Gay | jac...@hyperactivesw.com
HyperActive Software   | http://www.hyperactivesw.com


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


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

Re: Local files in browser widget

2019-07-12 Thread J. Landman Gay via use-livecode

On 7/12/19 1:52 PM, Klaus major-k via use-livecode wrote:

Hi Jaques,


Am 12.07.2019 um 20:43 schrieb J. Landman Gay via use-livecode 
:

On 7/12/19 9:10 AM, Devin Asay via use-livecode wrote:

On Jul 11, 2019, at 9:34 PM, J. Landman Gay via use-livecode 
 wrote:


I think I asked this before but it isn't working now. I thought 
specialFolderPath("resources") was okay for read-only files. It fails on 
Android.

put specialFolderPath("resources") & "/tFolder/tFile.html" into tPath
set the url of widget "browser" to ("file://" & tPath)

I get an error that the file was not found. It's there, the folder was included in the 
Copy Files pane in standalone settings. When I insert an answer dialog to view the path, 
there's a string that ends with "...base.apk/tFolder/tFile.html" so I think 
that's right.

Do I need more or fewer slashes?

J,
I don’t think you need the slashes after file: at all. (“file:” & 
specialFolderPath(“resources”) & “/tFolder/tFile.hmtl”) should do it.
Also check case on folder and file names. Case matters in mobile file systems 
in my experience.


Thanks Devin, but unfortunately it still doesn't work. Capitalization is 
correct (all lower case.) I also tried adding the internet library and tsNet, 
even though I don't use those, just to see if they were required. Still no go.


just to be sure, did you:
...
replace SPACE with "%20" in tPath
...
?


I didn't, but there are no spaces in the file name.

But I've just found something interesting. Devin was right, I don't need 
any slashes to read the resources folder in the apk. But I can't use it 
as a URL in a browser. I can use it to copy the file from the resources 
folder to the documents folder, but it fails if I directly set the URL 
of the browser widget.


  put specialFolderPath("resources") & "/tFolder/tFile" into tSourcePath
  answer (there is a file tSourcePath) -> TRUE
  set the URL of widget "browser" to ("file:" & tSourcePath) -> file 
not found

  put specialFolderPath("documents") & "/tFolder/" into tDir
  if there is no folder tDir then create folder tDir
  put tDir & tFile into tLocalPath
  put url ("file:" & tSourcePath) into url ("file://" & tLocalPath)
  set the URL of widget "browser" to ("file://" & tLocalPath) -> OK

Maybe browsers can't read files inside packages?

--
Jacqueline Landman Gay | jac...@hyperactivesw.com
HyperActive Software   | http://www.hyperactivesw.com


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

Re: Local files in browser widget

2019-07-12 Thread Klaus major-k via use-livecode
Hi Jaques,

> Am 12.07.2019 um 20:43 schrieb J. Landman Gay via use-livecode 
> :
> 
> On 7/12/19 9:10 AM, Devin Asay via use-livecode wrote:
>> On Jul 11, 2019, at 9:34 PM, J. Landman Gay via use-livecode 
>>  wrote:
>>> 
>>> I think I asked this before but it isn't working now. I thought 
>>> specialFolderPath("resources") was okay for read-only files. It fails on 
>>> Android.
>>> 
>>> put specialFolderPath("resources") & "/tFolder/tFile.html" into tPath
>>> set the url of widget "browser" to ("file://" & tPath)
>>> 
>>> I get an error that the file was not found. It's there, the folder was 
>>> included in the Copy Files pane in standalone settings. When I insert an 
>>> answer dialog to view the path, there's a string that ends with 
>>> "...base.apk/tFolder/tFile.html" so I think that's right.
>>> 
>>> Do I need more or fewer slashes?
>> J,
>> I don’t think you need the slashes after file: at all. (“file:” & 
>> specialFolderPath(“resources”) & “/tFolder/tFile.hmtl”) should do it.
>> Also check case on folder and file names. Case matters in mobile file 
>> systems in my experience.
> 
> Thanks Devin, but unfortunately it still doesn't work. Capitalization is 
> correct (all lower case.) I also tried adding the internet library and tsNet, 
> even though I don't use those, just to see if they were required. Still no go.

just to be sure, did you:
...
replace SPACE with "%20" in tPath
...
?

> -- 
> Jacqueline Landman Gay | jac...@hyperactivesw.com
> HyperActive Software   | http://www.hyperactivesw.com

Best

Klaus

--
Klaus Major
https://www.major-k.de
kl...@major-k.de


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

Re: Local files in browser widget

2019-07-12 Thread J. Landman Gay via use-livecode

On 7/12/19 9:10 AM, Devin Asay via use-livecode wrote:

On Jul 11, 2019, at 9:34 PM, J. Landman Gay via use-livecode 
 wrote:


I think I asked this before but it isn't working now. I thought 
specialFolderPath("resources") was okay for read-only files. It fails on 
Android.

put specialFolderPath("resources") & "/tFolder/tFile.html" into tPath
set the url of widget "browser" to ("file://" & tPath)

I get an error that the file was not found. It's there, the folder was included in the 
Copy Files pane in standalone settings. When I insert an answer dialog to view the path, 
there's a string that ends with "...base.apk/tFolder/tFile.html" so I think 
that's right.

Do I need more or fewer slashes?


J,

I don’t think you need the slashes after file: at all. (“file:” & 
specialFolderPath(“resources”) & “/tFolder/tFile.hmtl”) should do it.

Also check case on folder and file names. Case matters in mobile file systems 
in my experience.


Thanks Devin, but unfortunately it still doesn't work. Capitalization is 
correct (all lower case.) I also tried adding the internet library and 
tsNet, even though I don't use those, just to see if they were required. 
Still no go.



--
Jacqueline Landman Gay | jac...@hyperactivesw.com
HyperActive Software   | http://www.hyperactivesw.com


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

Re: Local files in browser widget

2019-07-12 Thread Devin Asay via use-livecode
On Jul 11, 2019, at 9:34 PM, J. Landman Gay via use-livecode 
 wrote:
> 
> I think I asked this before but it isn't working now. I thought 
> specialFolderPath("resources") was okay for read-only files. It fails on 
> Android.
> 
> put specialFolderPath("resources") & "/tFolder/tFile.html" into tPath
> set the url of widget "browser" to ("file://" & tPath)
> 
> I get an error that the file was not found. It's there, the folder was 
> included in the Copy Files pane in standalone settings. When I insert an 
> answer dialog to view the path, there's a string that ends with 
> "...base.apk/tFolder/tFile.html" so I think that's right.
> 
> Do I need more or fewer slashes?

J,

I don’t think you need the slashes after file: at all. (“file:” & 
specialFolderPath(“resources”) & “/tFolder/tFile.hmtl”) should do it.

Also check case on folder and file names. Case matters in mobile file systems 
in my experience.

D


Devin Asay
Director
Office of Digital Humanities
Brigham Young University

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