Re: Couple of questions about the browser widget

2017-08-16 Thread Terry Judd via use-livecode
Yeah, there’s no problem with the browser display here either – it sizes 
correctly and no scrollbars are displayed. The issue is purely to do with the 
checkboxes in the property inspector being non-responsive. I’ll bug report it 
when I have a bit of spare time tomorrow.

Terry...

On 17/08/2017 9:23 am, "use-livecode on behalf of Mike Bonner via use-livecode" 
 wrote:

Strange.  when I run my little test stack and set the height of the browser
+ the 23 extra pixels, the vertical scrollbar goes away on its own.  Gotta
get my other machines back up and running so I can test on them.  Why there
would be scrollbars for a page with nothing in it is beyond me.
Out of curiosity.. If you nudge the width and height of the widget when
empty, do the scrollbars go away?  On my system (win 10, and lc 9 dp8)  I
have no control over whether the scrollbars appear or not either, other
than sizing the widget to the point where all the content fits.  But they
do poof for me when the sizes are right.

The checkboxes for me on 9 dp8 are checked. One can uncheck them but it
doesn't take.  I do think the widget just lets webkit handle it the default
way.. Scrollbars as needed. But if that's the case, having check-boxes in
the inspector that do nothing would be a bug of a type also.



On Wed, Aug 16, 2017 at 5:04 PM, Terry Judd via use-livecode <
use-livecode@lists.runrev.com> wrote:

> Hi Mike - I don’t think it’s an issue in my case. I’m displaying pretty
> simple pages – just text and images, no columns or fancy layouts. Nothing
> that is displayed will be wider than the browser (images are resized 
before
> being loaded to ensure this) so no horizontal scrolling will be required
> under any circumstances.
>
> Anyway, you don’t seem to be able to toggle either scrollbar off either
> using the property inspector or via script, even when the browser widget
> has no content (no htmlText or url assigned). Given that I’m setting the
> height of the widget so that it doesn’t need to scroll vertically and
> horizontal scrolling is irrelevant then the inability to toggle these
> properties isn’t a problem. Still, it seems like a bug? Interestingly,
> under 8.1.4 both vScrollbar and hScrollbar are checked in the property
> inspector (and stuck like that) while on 8.1.6 they are both unchecked 
(and
> stuck like that).
>
> Regards,
>
> Terry...
>
> On 17/08/2017 6:33 am, "use-livecode on behalf of Mike Bonner via
> use-livecode"  use-livecode@lists.runrev.com> wrote:
>
> hmm.  If the width of the page fits without need of a horizontal
> scrollbar,
> it should disappear, so maybe your code should check to see if its
> false
> first, then add the 23 pixels or not, depending. (I also can't test to
> see
> if its 23 on every platform at the moment)
>
> I'm wondering if you're just not allowed to set a bar to false when 
the
> content is too wide or high and vice versa.
>
> On Wed, Aug 16, 2017 at 2:10 PM, Terry Judd via use-livecode <
> use-livecode@lists.runrev.com> wrote:
>
> > Perfect! Interesting about the hScrollbar setting – I seem to be
> unable to
> > deselect that (or vScrollbar) in the property editor – or change
> them via
> > script (both are stuck on true).
> >
> > Thanks,
> >
> > Terry...
> >
> > On 16/08/2017 11:49 pm, "use-livecode on behalf of Mike Bonner via
> > use-livecode"  > use-livecode@lists.runrev.com> wrote:
> >
> > Ty HH and jonathan, its working now for me.
> >
> > Terry:
> > I have this in my temporary file..
> > 
> > Hi!
> > 
> > window.onload = function(e) {
> > liveCode.lcHeight(document.body.scrollHeight);
> > }
> >
> > 
> > 
> > 
> > 
> >
> > It loads my picture fine, and (now that i have capitalization
> right..
> > DOH)
> > it sends a livecode message called lcHeight which is in the
> > javascripthandlers for the widget it loads into.
> >
> > For the handler in LC I have this..
> >
> > command lcHeight pHeight
> >  set the height of widget 1 to pHeight + 23 -- +23 because I
> have
> > the
> > horizontal scrollbar showing
> >  set the topleft of widget 1 to the topleft of this card
> > end lcHeight
> >
> > 

Re: Couple of questions about the browser widget

2017-08-16 Thread Mike Bonner via use-livecode
Strange.  when I run my little test stack and set the height of the browser
+ the 23 extra pixels, the vertical scrollbar goes away on its own.  Gotta
get my other machines back up and running so I can test on them.  Why there
would be scrollbars for a page with nothing in it is beyond me.
Out of curiosity.. If you nudge the width and height of the widget when
empty, do the scrollbars go away?  On my system (win 10, and lc 9 dp8)  I
have no control over whether the scrollbars appear or not either, other
than sizing the widget to the point where all the content fits.  But they
do poof for me when the sizes are right.

The checkboxes for me on 9 dp8 are checked. One can uncheck them but it
doesn't take.  I do think the widget just lets webkit handle it the default
way.. Scrollbars as needed. But if that's the case, having check-boxes in
the inspector that do nothing would be a bug of a type also.



On Wed, Aug 16, 2017 at 5:04 PM, Terry Judd via use-livecode <
use-livecode@lists.runrev.com> wrote:

> Hi Mike - I don’t think it’s an issue in my case. I’m displaying pretty
> simple pages – just text and images, no columns or fancy layouts. Nothing
> that is displayed will be wider than the browser (images are resized before
> being loaded to ensure this) so no horizontal scrolling will be required
> under any circumstances.
>
> Anyway, you don’t seem to be able to toggle either scrollbar off either
> using the property inspector or via script, even when the browser widget
> has no content (no htmlText or url assigned). Given that I’m setting the
> height of the widget so that it doesn’t need to scroll vertically and
> horizontal scrolling is irrelevant then the inability to toggle these
> properties isn’t a problem. Still, it seems like a bug? Interestingly,
> under 8.1.4 both vScrollbar and hScrollbar are checked in the property
> inspector (and stuck like that) while on 8.1.6 they are both unchecked (and
> stuck like that).
>
> Regards,
>
> Terry...
>
> On 17/08/2017 6:33 am, "use-livecode on behalf of Mike Bonner via
> use-livecode"  use-livecode@lists.runrev.com> wrote:
>
> hmm.  If the width of the page fits without need of a horizontal
> scrollbar,
> it should disappear, so maybe your code should check to see if its
> false
> first, then add the 23 pixels or not, depending. (I also can't test to
> see
> if its 23 on every platform at the moment)
>
> I'm wondering if you're just not allowed to set a bar to false when the
> content is too wide or high and vice versa.
>
> On Wed, Aug 16, 2017 at 2:10 PM, Terry Judd via use-livecode <
> use-livecode@lists.runrev.com> wrote:
>
> > Perfect! Interesting about the hScrollbar setting – I seem to be
> unable to
> > deselect that (or vScrollbar) in the property editor – or change
> them via
> > script (both are stuck on true).
> >
> > Thanks,
> >
> > Terry...
> >
> > On 16/08/2017 11:49 pm, "use-livecode on behalf of Mike Bonner via
> > use-livecode"  > use-livecode@lists.runrev.com> wrote:
> >
> > Ty HH and jonathan, its working now for me.
> >
> > Terry:
> > I have this in my temporary file..
> > 
> > Hi!
> > 
> > window.onload = function(e) {
> > liveCode.lcHeight(document.body.scrollHeight);
> > }
> >
> > 
> > 
> > 
> > 
> >
> > It loads my picture fine, and (now that i have capitalization
> right..
> > DOH)
> > it sends a livecode message called lcHeight which is in the
> > javascripthandlers for the widget it loads into.
> >
> > For the handler in LC I have this..
> >
> > command lcHeight pHeight
> >  set the height of widget 1 to pHeight + 23 -- +23 because I
> have
> > the
> > horizontal scrollbar showing
> >  set the topleft of widget 1 to the topleft of this card
> > end lcHeight
> >
> > On Wed, Aug 16, 2017 at 6:42 AM, Terry Judd via use-livecode <
> > use-livecode@lists.runrev.com> wrote:
> >
> > > Thanks hh that's really helpful stuff. Thanks also to Jonathan
> and
> > Mike.
> > >
> > > Regards,
> > >
> > > Terry...
> > >
> > > Sent from my iPad
> > >
> > > > On 16 Aug 2017, at 9:00 pm, hh via use-livecode <
> > > use-livecode@lists.runrev.com> wrote:
> > > >
> > > > Additional to Jonathan's instructions.
> > > >
> > > > Basic:
> > > > http://forums.livecode.com/viewtopic.php?f=7=29589
> > > >
> > > > Medium: Get MouseEvents from browser widget
> > > > http://forums.livecode.com/viewtopic.php?p=154496#p154496
> > > >
> > > > and others there (7 Browser Widget usage examples) 

Re: Couple of questions about the browser widget

2017-08-16 Thread Terry Judd via use-livecode
Hi Mike - I don’t think it’s an issue in my case. I’m displaying pretty simple 
pages – just text and images, no columns or fancy layouts. Nothing that is 
displayed will be wider than the browser (images are resized before being 
loaded to ensure this) so no horizontal scrolling will be required under any 
circumstances.

Anyway, you don’t seem to be able to toggle either scrollbar off either using 
the property inspector or via script, even when the browser widget has no 
content (no htmlText or url assigned). Given that I’m setting the height of the 
widget so that it doesn’t need to scroll vertically and horizontal scrolling is 
irrelevant then the inability to toggle these properties isn’t a problem. 
Still, it seems like a bug? Interestingly, under 8.1.4 both vScrollbar and 
hScrollbar are checked in the property inspector (and stuck like that) while on 
8.1.6 they are both unchecked (and stuck like that).

Regards,

Terry...

On 17/08/2017 6:33 am, "use-livecode on behalf of Mike Bonner via use-livecode" 
 wrote:

hmm.  If the width of the page fits without need of a horizontal scrollbar,
it should disappear, so maybe your code should check to see if its false
first, then add the 23 pixels or not, depending. (I also can't test to see
if its 23 on every platform at the moment)

I'm wondering if you're just not allowed to set a bar to false when the
content is too wide or high and vice versa.

On Wed, Aug 16, 2017 at 2:10 PM, Terry Judd via use-livecode <
use-livecode@lists.runrev.com> wrote:

> Perfect! Interesting about the hScrollbar setting – I seem to be unable to
> deselect that (or vScrollbar) in the property editor – or change them via
> script (both are stuck on true).
>
> Thanks,
>
> Terry...
>
> On 16/08/2017 11:49 pm, "use-livecode on behalf of Mike Bonner via
> use-livecode"  use-livecode@lists.runrev.com> wrote:
>
> Ty HH and jonathan, its working now for me.
>
> Terry:
> I have this in my temporary file..
> 
> Hi!
> 
> window.onload = function(e) {
> liveCode.lcHeight(document.body.scrollHeight);
> }
>
> 
> 
> 
> 
>
> It loads my picture fine, and (now that i have capitalization right..
> DOH)
> it sends a livecode message called lcHeight which is in the
> javascripthandlers for the widget it loads into.
>
> For the handler in LC I have this..
>
> command lcHeight pHeight
>  set the height of widget 1 to pHeight + 23 -- +23 because I have
> the
> horizontal scrollbar showing
>  set the topleft of widget 1 to the topleft of this card
> end lcHeight
>
> On Wed, Aug 16, 2017 at 6:42 AM, Terry Judd via use-livecode <
> use-livecode@lists.runrev.com> wrote:
>
> > Thanks hh that's really helpful stuff. Thanks also to Jonathan and
> Mike.
> >
> > Regards,
> >
> > Terry...
> >
> > Sent from my iPad
> >
> > > On 16 Aug 2017, at 9:00 pm, hh via use-livecode <
> > use-livecode@lists.runrev.com> wrote:
> > >
> > > Additional to Jonathan's instructions.
> > >
> > > Basic:
> > > http://forums.livecode.com/viewtopic.php?f=7=29589
> > >
> > > Medium: Get MouseEvents from browser widget
> > > http://forums.livecode.com/viewtopic.php?p=154496#p154496
> > >
> > > and others there (7 Browser Widget usage examples) ...
> > >
> > > ___
> > > 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
> >
> ___
> 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 

Re: Couple of questions about the browser widget

2017-08-16 Thread Jonathan Lynch via use-livecode
Maybe Try this:



body {
overflow: hidden;
}



Also, the internal width or height of content in the browser is not necessarily 
the same as the width as measured by LC.

Things like the screen pixel scale can have an effect.

Sent from my iPhone

> On Aug 16, 2017, at 4:33 PM, Mike Bonner via use-livecode 
>  wrote:
> 
> hmm.  If the width of the page fits without need of a horizontal scrollbar,
> it should disappear, so maybe your code should check to see if its false
> first, then add the 23 pixels or not, depending. (I also can't test to see
> if its 23 on every platform at the moment)
> 
> I'm wondering if you're just not allowed to set a bar to false when the
> content is too wide or high and vice versa.
> 
> On Wed, Aug 16, 2017 at 2:10 PM, Terry Judd via use-livecode <
> use-livecode@lists.runrev.com> wrote:
> 
>> Perfect! Interesting about the hScrollbar setting – I seem to be unable to
>> deselect that (or vScrollbar) in the property editor – or change them via
>> script (both are stuck on true).
>> 
>> Thanks,
>> 
>> Terry...
>> 
>> On 16/08/2017 11:49 pm, "use-livecode on behalf of Mike Bonner via
>> use-livecode" > use-livecode@lists.runrev.com> wrote:
>> 
>>Ty HH and jonathan, its working now for me.
>> 
>>Terry:
>>I have this in my temporary file..
>>
>>Hi!
>>
>>window.onload = function(e) {
>>liveCode.lcHeight(document.body.scrollHeight);
>>}
>> 
>>
>>
>>
>>
>> 
>>It loads my picture fine, and (now that i have capitalization right..
>> DOH)
>>it sends a livecode message called lcHeight which is in the
>>javascripthandlers for the widget it loads into.
>> 
>>For the handler in LC I have this..
>> 
>>command lcHeight pHeight
>> set the height of widget 1 to pHeight + 23 -- +23 because I have
>> the
>>horizontal scrollbar showing
>> set the topleft of widget 1 to the topleft of this card
>>end lcHeight
>> 
>>On Wed, Aug 16, 2017 at 6:42 AM, Terry Judd via use-livecode <
>>use-livecode@lists.runrev.com> wrote:
>> 
>>> Thanks hh that's really helpful stuff. Thanks also to Jonathan and
>> Mike.
>>> 
>>> Regards,
>>> 
>>> Terry...
>>> 
>>> Sent from my iPad
>>> 
 On 16 Aug 2017, at 9:00 pm, hh via use-livecode <
>>> use-livecode@lists.runrev.com> wrote:
 
 Additional to Jonathan's instructions.
 
 Basic:
 http://forums.livecode.com/viewtopic.php?f=7=29589
 
 Medium: Get MouseEvents from browser widget
 http://forums.livecode.com/viewtopic.php?p=154496#p154496
 
 and others there (7 Browser Widget usage examples) ...
 
 ___
 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
>>> 
>>___
>>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
>> 
> ___
> 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: Couple of questions about the browser widget

2017-08-16 Thread Mike Bonner via use-livecode
hmm.  If the width of the page fits without need of a horizontal scrollbar,
it should disappear, so maybe your code should check to see if its false
first, then add the 23 pixels or not, depending. (I also can't test to see
if its 23 on every platform at the moment)

I'm wondering if you're just not allowed to set a bar to false when the
content is too wide or high and vice versa.

On Wed, Aug 16, 2017 at 2:10 PM, Terry Judd via use-livecode <
use-livecode@lists.runrev.com> wrote:

> Perfect! Interesting about the hScrollbar setting – I seem to be unable to
> deselect that (or vScrollbar) in the property editor – or change them via
> script (both are stuck on true).
>
> Thanks,
>
> Terry...
>
> On 16/08/2017 11:49 pm, "use-livecode on behalf of Mike Bonner via
> use-livecode"  use-livecode@lists.runrev.com> wrote:
>
> Ty HH and jonathan, its working now for me.
>
> Terry:
> I have this in my temporary file..
> 
> Hi!
> 
> window.onload = function(e) {
> liveCode.lcHeight(document.body.scrollHeight);
> }
>
> 
> 
> 
> 
>
> It loads my picture fine, and (now that i have capitalization right..
> DOH)
> it sends a livecode message called lcHeight which is in the
> javascripthandlers for the widget it loads into.
>
> For the handler in LC I have this..
>
> command lcHeight pHeight
>  set the height of widget 1 to pHeight + 23 -- +23 because I have
> the
> horizontal scrollbar showing
>  set the topleft of widget 1 to the topleft of this card
> end lcHeight
>
> On Wed, Aug 16, 2017 at 6:42 AM, Terry Judd via use-livecode <
> use-livecode@lists.runrev.com> wrote:
>
> > Thanks hh that's really helpful stuff. Thanks also to Jonathan and
> Mike.
> >
> > Regards,
> >
> > Terry...
> >
> > Sent from my iPad
> >
> > > On 16 Aug 2017, at 9:00 pm, hh via use-livecode <
> > use-livecode@lists.runrev.com> wrote:
> > >
> > > Additional to Jonathan's instructions.
> > >
> > > Basic:
> > > http://forums.livecode.com/viewtopic.php?f=7=29589
> > >
> > > Medium: Get MouseEvents from browser widget
> > > http://forums.livecode.com/viewtopic.php?p=154496#p154496
> > >
> > > and others there (7 Browser Widget usage examples) ...
> > >
> > > ___
> > > 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
> >
> ___
> 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
>
___
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: Couple of questions about the browser widget

2017-08-16 Thread Terry Judd via use-livecode
Perfect! Interesting about the hScrollbar setting – I seem to be unable to 
deselect that (or vScrollbar) in the property editor – or change them via 
script (both are stuck on true).

Thanks,

Terry...

On 16/08/2017 11:49 pm, "use-livecode on behalf of Mike Bonner via 
use-livecode"  wrote:

Ty HH and jonathan, its working now for me.

Terry:
I have this in my temporary file..

Hi!

window.onload = function(e) {
liveCode.lcHeight(document.body.scrollHeight);
}






It loads my picture fine, and (now that i have capitalization right.. DOH)
it sends a livecode message called lcHeight which is in the
javascripthandlers for the widget it loads into.

For the handler in LC I have this..

command lcHeight pHeight
 set the height of widget 1 to pHeight + 23 -- +23 because I have the
horizontal scrollbar showing
 set the topleft of widget 1 to the topleft of this card
end lcHeight

On Wed, Aug 16, 2017 at 6:42 AM, Terry Judd via use-livecode <
use-livecode@lists.runrev.com> wrote:

> Thanks hh that's really helpful stuff. Thanks also to Jonathan and Mike.
>
> Regards,
>
> Terry...
>
> Sent from my iPad
>
> > On 16 Aug 2017, at 9:00 pm, hh via use-livecode <
> use-livecode@lists.runrev.com> wrote:
> >
> > Additional to Jonathan's instructions.
> >
> > Basic:
> > http://forums.livecode.com/viewtopic.php?f=7=29589
> >
> > Medium: Get MouseEvents from browser widget
> > http://forums.livecode.com/viewtopic.php?p=154496#p154496
> >
> > and others there (7 Browser Widget usage examples) ...
> >
> > ___
> > 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
>
___
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: Couple of questions about the browser widget

2017-08-16 Thread Mike Bonner via use-livecode
Ty HH and jonathan, its working now for me.

Terry:
I have this in my temporary file..

Hi!

window.onload = function(e) {
liveCode.lcHeight(document.body.scrollHeight);
}






It loads my picture fine, and (now that i have capitalization right.. DOH)
it sends a livecode message called lcHeight which is in the
javascripthandlers for the widget it loads into.

For the handler in LC I have this..

command lcHeight pHeight
 set the height of widget 1 to pHeight + 23 -- +23 because I have the
horizontal scrollbar showing
 set the topleft of widget 1 to the topleft of this card
end lcHeight

On Wed, Aug 16, 2017 at 6:42 AM, Terry Judd via use-livecode <
use-livecode@lists.runrev.com> wrote:

> Thanks hh that's really helpful stuff. Thanks also to Jonathan and Mike.
>
> Regards,
>
> Terry...
>
> Sent from my iPad
>
> > On 16 Aug 2017, at 9:00 pm, hh via use-livecode <
> use-livecode@lists.runrev.com> wrote:
> >
> > Additional to Jonathan's instructions.
> >
> > Basic:
> > http://forums.livecode.com/viewtopic.php?f=7=29589
> >
> > Medium: Get MouseEvents from browser widget
> > http://forums.livecode.com/viewtopic.php?p=154496#p154496
> >
> > and others there (7 Browser Widget usage examples) ...
> >
> > ___
> > 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
>
___
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: Couple of questions about the browser widget

2017-08-16 Thread Terry Judd via use-livecode
Thanks hh that's really helpful stuff. Thanks also to Jonathan and Mike.

Regards,

Terry...

Sent from my iPad

> On 16 Aug 2017, at 9:00 pm, hh via use-livecode 
>  wrote:
> 
> Additional to Jonathan's instructions.
> 
> Basic:
> http://forums.livecode.com/viewtopic.php?f=7=29589
> 
> Medium: Get MouseEvents from browser widget
> http://forums.livecode.com/viewtopic.php?p=154496#p154496
> 
> and others there (7 Browser Widget usage examples) ...
> 
> ___
> 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: Couple of questions about the browser widget

2017-08-16 Thread hh via use-livecode
Additional to Jonathan's instructions.

Basic:
http://forums.livecode.com/viewtopic.php?f=7=29589

Medium: Get MouseEvents from browser widget
http://forums.livecode.com/viewtopic.php?p=154496#p154496

and others there (7 Browser Widget usage examples) ...

___
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: Couple of questions about the browser widget

2017-08-16 Thread Jonathan Lynch via use-livecode
If you post the line that sends a message from JS to LC, we should be able to 
tell you what is wrong.

The code looks like this:
JS

liveCode.myHandler('JSMessage','test');


LC

On myHandler pMessage, pData
If pMessage = "JSMessage" then
Answer pData
End if
End myHandler

This will produce an LC answer dialog that says "test"

The keys to making this work:

1. the JS object is "liveCode" not "LiveCode" or "livecode" - JS is case 
sensitive.

2. The method, in this case "myHandler", becomes the LC handler, so make sure 
the LC handler is in the message path for the browser widget.

3. Make sure the JS script is firing - you can put in a line like 
"alert('hello');" to make sure JS is getting to that point in the script. Alert 
is like answer in LC.

4. Make sure your JS command lines end with a semicolon, but the structure 
lines do not, like this:

function LCTest() {
liveCode.myHandler('JSMessage','test');
}

Also, you can find example stacks that demonstrate this stuff - the JS to LC 
stack on LiveCode Share shows how to get messages with data into and back out 
of the browser widget. For advanced image techniques, Hermann has posted many 
excellent stacks.

Sent from my iPhone

> On Aug 15, 2017, at 10:10 PM, Terry Judd via use-livecode 
>  wrote:
> 
> Hi Mike – yeah thanks, the temp file approach for setting the browser widget 
> and getting an image to display works well so maybe easiest to go that way. 
> I’m still steeling myself for a foray into javascript so haven’t tried 
> anything on that front yet. I’ve got some Dropbox library related stuff to 
> distract me first though.
> 
> Regards,
> 
> Terry...
> 
> On 16/08/2017 10:53 am, "use-livecode on behalf of Mike Bonner via 
> use-livecode"  use-livecode@lists.runrev.com> wrote:
> 
>I haven't managed yet. (can't get it to fire, but hey.. did I mention i'm
>no good at javascript?)
> 
>Also I noticed, setting the htmltext of the widget seems to run through a
>urlencode. (I had a sample page in a field and was setting the htmltext to
>it, but it got totally munged.. So I've been creating a temp file and
>setting the url which works..)
> 
>To show an image you can use something like this..
> 
>
> 
>(windows of course) Getting the javascripthandlers to work might take the
>input of another. I can't seem to make it go. (Note also, I looked in the
>dictionary for the browser widget and used the example code there for the
>"set the javascripthandlers..' part.. but the example needs to be fixed.
>You need to specify the widget.
>set the javascripthandlers of widget "mywidge" to "whatever*
> 
> 
> 
>On Tue, Aug 15, 2017 at 6:34 PM, Terry Judd via use-livecode <
>use-livecode@lists.runrev.com> wrote:
> 
>> Thanks for your help Mike – I’m no good at Javascript either ;) but
>> thankfully there is plenty of stuff out there on the web written by people
>> that are. I’ll give it a go and see if I can make it work.
>> 
>> Regards,
>> 
>> Terry...
>> 
>> On 16/08/2017 10:23 am, "use-livecode on behalf of Mike Bonner via
>> use-livecode" > use-livecode@lists.runrev.com> wrote:
>> 
>>For the second question, if your htmltext contains a javascript
>> function
>>that returns document.body.scrollHeight you should be able to get the
>>height that way.I'm not any good at javascript, but how it would
>>probably work would be to have something like this..
>> 
>>window.onload = function(e){
>> livecode.myHeight('lcHeight",document.body.scrollHeight)
>> }
>> 
>>Then have an lcHeight handler defined in your stack to receive the
>> message.
>> 
>>command lcHeight pHeight
>>   -- do something with pHeight
>>end lcheight
>> 
>>Then of course you have to declare the handler..
>> 
>>set the javascripthandlers to "lcHeight"
>> 
>>I haven't actually done this, but think the idea is close enough to
>> get you
>>there.
>> 
>>On Tue, Aug 15, 2017 at 5:55 PM, Terry Judd via use-livecode <
>>use-livecode@lists.runrev.com> wrote:
>> 
>>> I’m thinking about replacing a field object that contains text,
>> inline
>>> images and simple tables with the browser widget but there are a
>> couple of
>>> issues I’d need to work through first and would welcome any
>> suggestions or
>>> ideas.
>>> 
>>> The first one concerns displaying local images – either stored
>>> (permanently or temporarily) within the stack itself or in the local
>>> documents/whatever folder. I’d like to set the htmlText of the
>> browser
>>> rather than a url. If that’s the case, how do I refer to the image
>> in order
>>> for it to be displayed?
>>> 
>>> The second one is whether it is possible to get the
>> ‘formattedHeight’ of
>>> the browser content. I’d ideally like to combine the browser with a
>> couple
>>> of other grouped controls so that I 

Re: Couple of questions about the browser widget

2017-08-15 Thread Terry Judd via use-livecode
Hi Mike – yeah thanks, the temp file approach for setting the browser widget 
and getting an image to display works well so maybe easiest to go that way. I’m 
still steeling myself for a foray into javascript so haven’t tried anything on 
that front yet. I’ve got some Dropbox library related stuff to distract me 
first though.

Regards,

Terry...

On 16/08/2017 10:53 am, "use-livecode on behalf of Mike Bonner via 
use-livecode"  wrote:

I haven't managed yet. (can't get it to fire, but hey.. did I mention i'm
no good at javascript?)

Also I noticed, setting the htmltext of the widget seems to run through a
urlencode. (I had a sample page in a field and was setting the htmltext to
it, but it got totally munged.. So I've been creating a temp file and
setting the url which works..)

To show an image you can use something like this..



(windows of course) Getting the javascripthandlers to work might take the
input of another. I can't seem to make it go. (Note also, I looked in the
dictionary for the browser widget and used the example code there for the
"set the javascripthandlers..' part.. but the example needs to be fixed.
You need to specify the widget.
set the javascripthandlers of widget "mywidge" to "whatever*



On Tue, Aug 15, 2017 at 6:34 PM, Terry Judd via use-livecode <
use-livecode@lists.runrev.com> wrote:

> Thanks for your help Mike – I’m no good at Javascript either ;) but
> thankfully there is plenty of stuff out there on the web written by people
> that are. I’ll give it a go and see if I can make it work.
>
> Regards,
>
> Terry...
>
> On 16/08/2017 10:23 am, "use-livecode on behalf of Mike Bonner via
> use-livecode"  use-livecode@lists.runrev.com> wrote:
>
> For the second question, if your htmltext contains a javascript
> function
> that returns document.body.scrollHeight you should be able to get the
> height that way.I'm not any good at javascript, but how it would
> probably work would be to have something like this..
>
> window.onload = function(e){
>  livecode.myHeight('lcHeight",document.body.scrollHeight)
>  }
>
> Then have an lcHeight handler defined in your stack to receive the
> message.
>
> command lcHeight pHeight
>-- do something with pHeight
> end lcheight
>
> Then of course you have to declare the handler..
>
> set the javascripthandlers to "lcHeight"
>
> I haven't actually done this, but think the idea is close enough to
> get you
> there.
>
> On Tue, Aug 15, 2017 at 5:55 PM, Terry Judd via use-livecode <
> use-livecode@lists.runrev.com> wrote:
>
> > I’m thinking about replacing a field object that contains text,
> inline
> > images and simple tables with the browser widget but there are a
> couple of
> > issues I’d need to work through first and would welcome any
> suggestions or
> > ideas.
> >
> > The first one concerns displaying local images – either stored
> > (permanently or temporarily) within the stack itself or in the local
> > documents/whatever folder. I’d like to set the htmlText of the
> browser
> > rather than a url. If that’s the case, how do I refer to the image
> in order
> > for it to be displayed?
> >
> > The second one is whether it is possible to get the
> ‘formattedHeight’ of
> > the browser content. I’d ideally like to combine the browser with a
> couple
> > of other grouped controls so that I can scroll them as a single
> object. Is
> > that doable?
> >
> > Regards,
> >
> > Terry...
> > ___
> > 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
>
>
> ___
> 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: Couple of questions about the browser widget

2017-08-15 Thread Mike Bonner via use-livecode
I haven't managed yet. (can't get it to fire, but hey.. did I mention i'm
no good at javascript?)

Also I noticed, setting the htmltext of the widget seems to run through a
urlencode. (I had a sample page in a field and was setting the htmltext to
it, but it got totally munged.. So I've been creating a temp file and
setting the url which works..)

To show an image you can use something like this..



(windows of course) Getting the javascripthandlers to work might take the
input of another. I can't seem to make it go. (Note also, I looked in the
dictionary for the browser widget and used the example code there for the
"set the javascripthandlers..' part.. but the example needs to be fixed.
You need to specify the widget.
set the javascripthandlers of widget "mywidge" to "whatever*



On Tue, Aug 15, 2017 at 6:34 PM, Terry Judd via use-livecode <
use-livecode@lists.runrev.com> wrote:

> Thanks for your help Mike – I’m no good at Javascript either ;) but
> thankfully there is plenty of stuff out there on the web written by people
> that are. I’ll give it a go and see if I can make it work.
>
> Regards,
>
> Terry...
>
> On 16/08/2017 10:23 am, "use-livecode on behalf of Mike Bonner via
> use-livecode"  use-livecode@lists.runrev.com> wrote:
>
> For the second question, if your htmltext contains a javascript
> function
> that returns document.body.scrollHeight you should be able to get the
> height that way.I'm not any good at javascript, but how it would
> probably work would be to have something like this..
>
> window.onload = function(e){
>  livecode.myHeight('lcHeight",document.body.scrollHeight)
>  }
>
> Then have an lcHeight handler defined in your stack to receive the
> message.
>
> command lcHeight pHeight
>-- do something with pHeight
> end lcheight
>
> Then of course you have to declare the handler..
>
> set the javascripthandlers to "lcHeight"
>
> I haven't actually done this, but think the idea is close enough to
> get you
> there.
>
> On Tue, Aug 15, 2017 at 5:55 PM, Terry Judd via use-livecode <
> use-livecode@lists.runrev.com> wrote:
>
> > I’m thinking about replacing a field object that contains text,
> inline
> > images and simple tables with the browser widget but there are a
> couple of
> > issues I’d need to work through first and would welcome any
> suggestions or
> > ideas.
> >
> > The first one concerns displaying local images – either stored
> > (permanently or temporarily) within the stack itself or in the local
> > documents/whatever folder. I’d like to set the htmlText of the
> browser
> > rather than a url. If that’s the case, how do I refer to the image
> in order
> > for it to be displayed?
> >
> > The second one is whether it is possible to get the
> ‘formattedHeight’ of
> > the browser content. I’d ideally like to combine the browser with a
> couple
> > of other grouped controls so that I can scroll them as a single
> object. Is
> > that doable?
> >
> > Regards,
> >
> > Terry...
> > ___
> > 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
>
>
> ___
> 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: Couple of questions about the browser widget

2017-08-15 Thread Terry Judd via use-livecode
Thanks for your help Mike – I’m no good at Javascript either ;) but thankfully 
there is plenty of stuff out there on the web written by people that are. I’ll 
give it a go and see if I can make it work.

Regards,

Terry...

On 16/08/2017 10:23 am, "use-livecode on behalf of Mike Bonner via 
use-livecode"  wrote:

For the second question, if your htmltext contains a javascript function
that returns document.body.scrollHeight you should be able to get the
height that way.I'm not any good at javascript, but how it would
probably work would be to have something like this..

window.onload = function(e){
 livecode.myHeight('lcHeight",document.body.scrollHeight)
 }

Then have an lcHeight handler defined in your stack to receive the message.

command lcHeight pHeight
   -- do something with pHeight
end lcheight

Then of course you have to declare the handler..

set the javascripthandlers to "lcHeight"

I haven't actually done this, but think the idea is close enough to get you
there.

On Tue, Aug 15, 2017 at 5:55 PM, Terry Judd via use-livecode <
use-livecode@lists.runrev.com> wrote:

> I’m thinking about replacing a field object that contains text, inline
> images and simple tables with the browser widget but there are a couple of
> issues I’d need to work through first and would welcome any suggestions or
> ideas.
>
> The first one concerns displaying local images – either stored
> (permanently or temporarily) within the stack itself or in the local
> documents/whatever folder. I’d like to set the htmlText of the browser
> rather than a url. If that’s the case, how do I refer to the image in 
order
> for it to be displayed?
>
> The second one is whether it is possible to get the ‘formattedHeight’ of
> the browser content. I’d ideally like to combine the browser with a couple
> of other grouped controls so that I can scroll them as a single object. Is
> that doable?
>
> Regards,
>
> Terry...
> ___
> 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


___
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: Couple of questions about the browser widget

2017-08-15 Thread Mike Bonner via use-livecode
For the second question, if your htmltext contains a javascript function
that returns document.body.scrollHeight you should be able to get the
height that way.I'm not any good at javascript, but how it would
probably work would be to have something like this..

window.onload = function(e){
 livecode.myHeight('lcHeight",document.body.scrollHeight)
 }

Then have an lcHeight handler defined in your stack to receive the message.

command lcHeight pHeight
   -- do something with pHeight
end lcheight

Then of course you have to declare the handler..

set the javascripthandlers to "lcHeight"

I haven't actually done this, but think the idea is close enough to get you
there.

On Tue, Aug 15, 2017 at 5:55 PM, Terry Judd via use-livecode <
use-livecode@lists.runrev.com> wrote:

> I’m thinking about replacing a field object that contains text, inline
> images and simple tables with the browser widget but there are a couple of
> issues I’d need to work through first and would welcome any suggestions or
> ideas.
>
> The first one concerns displaying local images – either stored
> (permanently or temporarily) within the stack itself or in the local
> documents/whatever folder. I’d like to set the htmlText of the browser
> rather than a url. If that’s the case, how do I refer to the image in order
> for it to be displayed?
>
> The second one is whether it is possible to get the ‘formattedHeight’ of
> the browser content. I’d ideally like to combine the browser with a couple
> of other grouped controls so that I can scroll them as a single object. Is
> that doable?
>
> Regards,
>
> Terry...
> ___
> 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

Couple of questions about the browser widget

2017-08-15 Thread Terry Judd via use-livecode
I’m thinking about replacing a field object that contains text, inline images 
and simple tables with the browser widget but there are a couple of issues I’d 
need to work through first and would welcome any suggestions or ideas.

The first one concerns displaying local images – either stored (permanently or 
temporarily) within the stack itself or in the local documents/whatever folder. 
I’d like to set the htmlText of the browser rather than a url. If that’s the 
case, how do I refer to the image in order for it to be displayed?

The second one is whether it is possible to get the ‘formattedHeight’ of the 
browser content. I’d ideally like to combine the browser with a couple of other 
grouped controls so that I can scroll them as a single object. Is that doable?

Regards,

Terry...
___
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