More than one browser object on a card?

LiveCode is the premier environment for creating multi-platform solutions for all major operating systems - Windows, Mac OS X, Linux, the Web, Server environments and Mobile platforms. Brand new to LiveCode? Welcome!

Moderators: Klaus, FourthWorld, heatherlaine, robinmiller, kevinmiller

Post Reply
sritcp
Posts: 368
Joined: Tue Jun 05, 2012 5:38 pm
Location: Alexandria, Virginia

More than one browser object on a card?

Post by sritcp » Wed Jun 19, 2019 9:44 pm

I understand that the browser displays above all other controls regardless of its layer number.
Does that mean you cannot have more than one (non-overlapping) browser widgets on a card?

I am having problems with two browser widgets on a card (one of them part of a group, which stays invisible and is invoked by a button). It works once when you open the stack, but fails when you return to the card.

I will upload a simplified stack on request.

Regards,
Sri

richmond62
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 3805
Joined: Fri Feb 19, 2010 10:17 am
Location: Bulgaria

Re: More than one browser object on a card?

Post by richmond62 » Wed Jun 19, 2019 10:21 pm

I will upload a simplified stack on request.
Do that then, instead of just writing about it. 8)

sritcp
Posts: 368
Joined: Tue Jun 05, 2012 5:38 pm
Location: Alexandria, Virginia

Re: More than one browser object on a card?

Post by sritcp » Wed Jun 19, 2019 11:07 pm

Hi Richmond:

I had not posted the stack to begin with because the answer might simply be that more than one browser widget is not allowed on a card - no need to investigate further.

In any case, when I try to upload, it says "invalid file extension: .livecode". When I click "Add File" under "Attachments", the .livecode files are grayed out. What do I need to do?

Regards,
Sri

sritcp
Posts: 368
Joined: Tue Jun 05, 2012 5:38 pm
Location: Alexandria, Virginia

Re: More than one browser object on a card?

Post by sritcp » Wed Jun 19, 2019 11:16 pm

Ok, I got it! I needed to zip it.

Open the stack; card 1 is a dummy with a button to go to card 2.
Card 2 has two browsers - one on the card, the other inside a group on the card.
They are set to sample .pdf files online.
If the pdf files show on the first go-around, please navigate to the first card and navigate back.
The browsers don't show, although you can see a blip when they load the file.

Regards,
Sri
Attachments
TwoBrowsers.livecode.zip
(1.26 KiB) Downloaded 23 times

[-hh]
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 2182
Joined: Thu Feb 28, 2013 11:52 pm
Location: Göttingen, DE

Re: More than one browser object on a card?

Post by [-hh] » Thu Jun 20, 2019 12:34 am

Of course you can have several browser widgets on the same card.
You can also layer and overlap them (or the enclosing group).
I use this in a sample stack for putting "controls" over a browser widget.

What you describe doesn't happen here.
So this may be a bug with a certain LC version on a certain platform.
Did you already try with 9.0.5 and/or 9.5.0?
What is your version/platform?
shiftLock happens

sritcp
Posts: 368
Joined: Tue Jun 05, 2012 5:38 pm
Location: Alexandria, Virginia

Re: More than one browser object on a card?

Post by sritcp » Thu Jun 20, 2019 1:11 am

Sorry, forgot to mention.
I am using LC 9.0.2 on Mac 10.14.5

sritcp
Posts: 368
Joined: Tue Jun 05, 2012 5:38 pm
Location: Alexandria, Virginia

Re: More than one browser object on a card?

Post by sritcp » Thu Jun 20, 2019 2:02 am

Tried it on 9.0.4
Same result.
Didn't try with 9.0.5 etc. I generally like to keep away from release candidates and previews.

Once the browsers vanish, I can get back one of them (the one within a group), by clicking the visibility button on the Project Browser (by hiding and showing). The other browser (not inside a group) just blips once (showing that it is loading) and it is gone.

Regards,
Sri

sritcp
Posts: 368
Joined: Tue Jun 05, 2012 5:38 pm
Location: Alexandria, Virginia

Re: More than one browser object on a card?

Post by sritcp » Thu Jun 20, 2019 2:21 am

I have figured out the issue, I think.
The group (with the browser) has to start out hidden in my program and is shown when a button is clicked. This seems to be the issue. If the card opens with the group showing, there is no problem, But when the group is hidden and is then shown, both browsers stumble.

I can script around this problem and just show the grouped browser on a separate card. I'd still like to know why this happens.

Regards,
Sri

Post Reply

Return to “Getting Started with LiveCode - Experienced Developers”