Pop-up in Browser widget resizing stack

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: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
Morphy
Posts: 2
Joined: Mon Oct 12, 2020 3:47 pm

Pop-up in Browser widget resizing stack

Post by Morphy » Mon Oct 12, 2020 4:12 pm

I am using the standard tools palette Internet Browser to display a series of online musical playlists via a Google search that is from WMFU radio. When the user chooses a pop-up player for a particular track I would like a new window to show that player. However I cannot get the browser to communicate any information out so that I can activate a second window. I have tried , for example, browserNewUrlWindow and assigning a script via "set the behaviour of widget "Browser".

At the moment the pop-up stays in the same browser window, which could be ok, but when the pop-up link is clicked on the stack size diminishes to less than half the required size (!) and no locking of the stack either in code or IDE will stop that. Curious.

So any help with either creating a separate pop-up or stablising the pop-up in the existing browser window would be greatly appreciated.

IMac 10 14 6 LIvecode Community Plus 9 0 4

Morphy
Posts: 2
Joined: Mon Oct 12, 2020 3:47 pm

Re: Pop-up in Browser widget resizing stack

Post by Morphy » Tue Oct 13, 2020 2:27 pm

I used Message Watcher to discover that when the pop-up link was clicked several geometry/resizeStack calls appeared. I think this is LC's attempt at understanding the fact that the pop-up dimensions are smaller then the previous page. On desktop the pop-up sits over the playlists as a neat player. When the pop-up is constrained to the same window as the playlist its reduced size is some how converted to a resizeStack call. I just used Klaus' code, here: 30765, to prevent the resizing:

on resizeStack
put the loc of this stack into tLoc
lock screen
set the width of this stack to 500
set the height of this stack to 500
set the loc of this stack to tLoc
unlock screen
end resizeStack

Job done.

Post Reply

Return to “Getting Started with LiveCode - Experienced Developers”