Re: Local Image Paths in HTML for Browser Widget Fails

2018-01-09 Thread J. Landman Gay via use-livecode

On 1/8/18 9:16 PM, Sannyasin Brahmanathaswami via use-livecode wrote:
Nope… no way. On mobile, there are major issues with certain mobile controls. 


You might be able to use the native "busy" indicator on mobile, which 
doesn't interact with the stack content:


mobileBusyIndicatorStart
mobileBusyIndicatorStop

(There's a handler in the mobileControls library in SivaSiva that 
handles this for both desktop and mobile, actually.)


--
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 Image Paths in HTML for Browser Widget Fails

2018-01-08 Thread Sannyasin Brahmanathaswami via use-livecode
Nope… no way. On mobile, there are major issues with certain mobile controls. 
e.g. scrolling group becomes a mobile scroller on a phone… this "lies on top of 
everything" and I believe the browser is also generating a mobile control 
instance as well. I don't understand it 100% (not even 10%) but my guess is the 
pixel map for the rect of the display, for some mobile controls, cannot accept 
input from another object, within those same bounds/coords.

Especially on Android "all hell breaks" loose on the screen. You would have to 
see some of the bizarre abstract art that suddenly appears on the screen, very 
wild "early cubist" stuff with squares-tiles of colors and blocks 


On 1/7/18, 6:16 PM, "use-livecode on behalf of Mike Bonner via use-livecode" 
 wrote:

ok, nevermind, you can't overlay the browser widget I guess.  Is there a
way?



___
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 Image Paths in HTML for Browser Widget Fails

2018-01-08 Thread hh via use-livecode
Yet another option.

For a *true* progress animation (no gif) use
https://github.com/HubSpot/pace
That's what I use with my HTML5 demo pages.

For example (with a selfmade LiveCode theme)
http://hh.on-rev.com/html5/SVG2PNG_HTML5-9.0.0-dp-4hhX.html
Instead you could use your own logo for rotating.


___
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 Image Paths in HTML for Browser Widget Fails

2018-01-07 Thread Mike Bonner via use-livecode
ok, nevermind, you can't overlay the browser widget I guess.  Is there a
way?

On Sun, Jan 7, 2018 at 9:14 PM, Mike Bonner  wrote:

> 2 possible options I can see.. either have a 2nd browser widget with that
> page in it, and enable/disable hide/show or just move it out of the
> screenrect..  Though it sounds like all you're doing is putting an animated
> gif that you want to show during page load.   Can't you just pop it into an
> image object, and then overlay it however you like on top of the browser
> widget. hide/show/enable/disable as needed?
>
> On Sun, Jan 7, 2018 at 7:25 PM, Sannyasin Brahmanathaswami via
> use-livecode  wrote:
>
>> @ Mike… thanks…
>>
>> duh! (as he slaps himself on the side of the head)  I was mixing up the
>> props
>>
>> the htmltext # with
>> the url
>>
>> this is all static content so all that was needed was,
>>
>> assets
>>/info
>>   web-loading.html
>>
>> 
>> > height="128" alt="ajax_loader_big">
>> 
>>
>> and then this
>>
>> command setWebURL
>>put path_Assets() & "info/web-loading.html" into tLocalPath
>>set the uirl of widget "body"  to tLocalPath
>> end setWebURL
>>
>>
>> "of course"
>>
>> @ HH, thanks for the base64 method… I can use that in other instances.
>>
>> @ All, this really doesn’t get me what I want though, because as soon as
>> we set the URL of the browser widget to the intended remote web page, our
>> local page is of course "disconnected" the loader image is gone and the
>> user is *still* staring at a blank screen waiting.
>>
>> I must have been working too late and didn't see either of these to
>> things, which, are of course obvious.  I'll start another thread on loading
>> web pages/user notifications.
>>
>> On 1/6/18, 10:15 AM, "use-livecode on behalf of Mike Bonner via
>> use-livecode" > use-livecode@lists.runrev.com> wrote:
>>
>> Then load the file as a url appearing like so..
>>
>> "file:///path/to/your/html/file/myfile.html"
>>
>> At this point the browser widget has a path location so any relative
>> addressing should work.
>>
>> ___
>> 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 Image Paths in HTML for Browser Widget Fails

2018-01-07 Thread Mike Bonner via use-livecode
2 possible options I can see.. either have a 2nd browser widget with that
page in it, and enable/disable hide/show or just move it out of the
screenrect..  Though it sounds like all you're doing is putting an animated
gif that you want to show during page load.   Can't you just pop it into an
image object, and then overlay it however you like on top of the browser
widget. hide/show/enable/disable as needed?

On Sun, Jan 7, 2018 at 7:25 PM, Sannyasin Brahmanathaswami via use-livecode
 wrote:

> @ Mike… thanks…
>
> duh! (as he slaps himself on the side of the head)  I was mixing up the
> props
>
> the htmltext # with
> the url
>
> this is all static content so all that was needed was,
>
> assets
>/info
>   web-loading.html
>
> 
>  height="128" alt="ajax_loader_big">
> 
>
> and then this
>
> command setWebURL
>put path_Assets() & "info/web-loading.html" into tLocalPath
>set the uirl of widget "body"  to tLocalPath
> end setWebURL
>
>
> "of course"
>
> @ HH, thanks for the base64 method… I can use that in other instances.
>
> @ All, this really doesn’t get me what I want though, because as soon as
> we set the URL of the browser widget to the intended remote web page, our
> local page is of course "disconnected" the loader image is gone and the
> user is *still* staring at a blank screen waiting.
>
> I must have been working too late and didn't see either of these to
> things, which, are of course obvious.  I'll start another thread on loading
> web pages/user notifications.
>
> On 1/6/18, 10:15 AM, "use-livecode on behalf of Mike Bonner via
> use-livecode"  use-livecode@lists.runrev.com> wrote:
>
> Then load the file as a url appearing like so..
>
> "file:///path/to/your/html/file/myfile.html"
>
> At this point the browser widget has a path location so any relative
> addressing should work.
>
> ___
> 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 Image Paths in HTML for Browser Widget Fails

2018-01-07 Thread Sannyasin Brahmanathaswami via use-livecode
@ Mike… thanks…

duh! (as he slaps himself on the side of the head)  I was mixing up the props 

the htmltext # with
the url

this is all static content so all that was needed was, 

assets
   /info
  web-loading.html



 

and then this

command setWebURL
   put path_Assets() & "info/web-loading.html" into tLocalPath
   set the uirl of widget "body"  to tLocalPath 
end setWebURL


"of course"

@ HH, thanks for the base64 method… I can use that in other instances.

@ All, this really doesn’t get me what I want though, because as soon as we set 
the URL of the browser widget to the intended remote web page, our local page 
is of course "disconnected" the loader image is gone and the user is *still* 
staring at a blank screen waiting.

I must have been working too late and didn't see either of these to things, 
which, are of course obvious.  I'll start another thread on loading web 
pages/user notifications.

On 1/6/18, 10:15 AM, "use-livecode on behalf of Mike Bonner via use-livecode" 
 wrote:

Then load the file as a url appearing like so..

"file:///path/to/your/html/file/myfile.html"

At this point the browser widget has a path location so any relative
addressing should work.

___
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 Image Paths in HTML for Browser Widget Fails

2018-01-06 Thread hh via use-livecode
Yet another option.

1. Put ONCE the loader into a custom property

on mouseUp
  answer file "input your loader.gif"
  if it is empty then exit mouseUp
  put base64Encode(url("binfile:"&it)) into ii
  replace linefeed with empty in ii
  set the loader of this card to compress(ii)
end mouseUp
-- this has now at about the original size of the gif

2. Display the loader as follows.

on mouseUp
  set the htmltext of widget "browser" to \
""
end mouseUp
-- optionally add width and height attributes


___
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 Image Paths in HTML for Browser Widget Fails

2018-01-06 Thread Mike Bonner via use-livecode
It may be easier if you hit the file directly..

Build up your path string to the html file and put it into a variable
(including the file itself)

Then rather than grabbing the contents of the file, first edit and hard
code a relative path to your image in the file itself.

Then load the file as a url appearing like so..

"file:///path/to/your/html/file/myfile.html"

At this point the browser widget has a path location so any relative
addressing should work.


It doesn't work to relative reference when you set the htmltext unless you
give a proper frame of reference.  IE by setting the defaultfolder to the
location of the html file.  (I think it will work that way)  Otherwise the
browser widget has no frame of reference to locate things.

As far as why your line:
put path_Assets() & "img/global-icons/ajax_loader_big.gif" into imgPath
 and then pasting it in, isn't working..  Not sure, seems like it should
work.

After load is complete, have you looked at the htmltext of the widget to
see exactly what is showing up as the src in the img tag?

On Sat, Jan 6, 2018 at 12:45 PM, Sannyasin Brahmanathaswami via
use-livecode  wrote:

> I'm trying to send some local html to the browser widget to display a
> local loading GIF until the page "comes down" from the cloud. This needs to
> work on mobile too.
>
> the directory structure
>
> main app folder
>/assets
>   /img
>   /global-icons
>   ajax_loader_big.gif"
>   /info
> web-loading.html
> views
>view_Browser.livecode # Card 1 has the browser widget…
>
> I have this in the preopenstack handler
>
> setWebURL
>
> command setWebURL
>put path_Assets() & "info/web-loading.html" into tLocalPath
>put url ("binfile://" & tLocalPath) into tLoader
>put path_Assets() & "img/global-icons/ajax_loader_big.gif" into
> imgPath
>replace "##IMAGE-PATH##" with imgPath in tLoader
>set the htmlText of widget "body" to tLoader   # html is set, but
> img not found
>put tLoader # let's see what we are getting..
> end setWebURL
>
> path_Assets() function returns the  specialFolderPath("resources") &
> "assets/"
>
> it is working for the html itself, but inside html both of these fail
>
> # full URL from "root"  which would translate correctly on mobile to the
> app package…
>
>  alt="ajax_loader_big">
>
> # I manually tried a relative path
>
> 
>  height="128" alt="ajax_loader_big">
> 
>
> The html is found because we see in the browser widget the broken image
> icon with the name "ajax_loader_big" so the path function works, html is
> set as expected, but the browser widget can't find the image locally.
>
> I can "proof" this locally by moving a copy of web-loading.html into the
> same folder as the stack..
> drag and drop onto a browser from that location, which is the same
> location as the stack with the browser widget…
>
> both of these work
>
> src="/Users/Brahmanathaswami/Documents/_Siva-Siva-App/
> assets/img/global-icons/ajax_loader_big.gif"
> src="../assets/img/global-icons/ajax_loader_big.gif"
>
> I could have sworn I had this working last year, but not today.  At that
> time we were working right in the same directory… so I tried this:
>
> views
>/img
>ajax_loader_big.gif
>view_Browser.livecode
>web-loading.html
>
> src="img/ajax_loader_big.gif"  in the html for the browser widget but it
> still can't find it
>
> What am I missing?  Why can't the browser widget find the image?
>
> BR
>
>
>
>
>
> ___
> 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

Local Image Paths in HTML for Browser Widget Fails

2018-01-06 Thread Sannyasin Brahmanathaswami via use-livecode
I'm trying to send some local html to the browser widget to display a local 
loading GIF until the page "comes down" from the cloud. This needs to work on 
mobile too.

the directory structure

main app folder
   /assets
  /img
  /global-icons
  ajax_loader_big.gif"
  /info
web-loading.html
views
   view_Browser.livecode # Card 1 has the browser widget…

I have this in the preopenstack handler

setWebURL

command setWebURL
   put path_Assets() & "info/web-loading.html" into tLocalPath
   put url ("binfile://" & tLocalPath) into tLoader
   put path_Assets() & "img/global-icons/ajax_loader_big.gif" into imgPath
   replace "##IMAGE-PATH##" with imgPath in tLoader
   set the htmlText of widget "body" to tLoader   # html is set, but img 
not found
   put tLoader # let's see what we are getting..
end setWebURL

path_Assets() function returns the  specialFolderPath("resources") & "assets/"

it is working for the html itself, but inside html both of these fail

# full URL from "root"  which would translate correctly on mobile to the app 
package…



# I manually tried a relative path





The html is found because we see in the browser widget the broken image icon 
with the name "ajax_loader_big" so the path function works, html is set as 
expected, but the browser widget can't find the image locally.

I can "proof" this locally by moving a copy of web-loading.html into the same 
folder as the stack..
drag and drop onto a browser from that location, which is the same location as 
the stack with the browser widget…

both of these work

src="/Users/Brahmanathaswami/Documents/_Siva-Siva-App/assets/img/global-icons/ajax_loader_big.gif"
src="../assets/img/global-icons/ajax_loader_big.gif"

I could have sworn I had this working last year, but not today.  At that time 
we were working right in the same directory… so I tried this:

views
   /img
   ajax_loader_big.gif
   view_Browser.livecode
   web-loading.html

src="img/ajax_loader_big.gif"  in the html for the browser widget but it still 
can't find it

What am I missing?  Why can't the browser widget find the image?

BR





___
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