Giving showWebPopup a dismiss or cancel button

It would be nice if
native.showWebPopup( inUrl,webOptions )
could run inside a window or display that was slightly less than full screen size so there could also be a dismiss button.

At present there is no way (that I have found) for the user to dismiss the web popup when finished and return to the program.

the only alternative is to use native.showWebPopup( url ) to take you to safari
then when the user is done, return to the program which will hopefully be at the same screen

I would prefer screen shifting to dismiss the web popup.

But at present, there is not code way for a user action to trigger system.cancelWebPopup() is there?
William

[import]uid: 5404 topic_id: 587 reply_id: 300587[/import]

I am running into the same issue. If anyone has a work around for this at present it would be greatly appreciated, thanks! [import]uid: 6317 topic_id: 587 reply_id: 2820[/import]

Download the new beta 4 SDK. You can do it now. [import]uid: 4883 topic_id: 587 reply_id: 2826[/import]

oh? is there an example of this functionality? changing the size of the popup window? i didnt see anywhere in the API how to do it [import]uid: 6317 topic_id: 587 reply_id: 2827[/import]

The new command is native.showWebPopup(x, y, x.size, y.size, “page.html”, {baseUrl = system.ResourceDirectory, urlRequest = functionToBeCalled})

in order to cancel the popup, all you have to do is to create a button calling a function that run the native.cancelWebPopup command.

Alex [import]uid: 4883 topic_id: 587 reply_id: 2832[/import]

oh great thanks, is there any way to rotate this window? [import]uid: 6317 topic_id: 587 reply_id: 2837[/import]

Never tried but you can try the following:

local window = display.newGroup()  
local test = native.showWebPopup(x, y, x.size, y.size, "page.html", {baseUrl = system.ResourceDirectory, urlRequest = functionToBeCalled})  
window:insert(test)  
transition.to(window, {time=150, rotation=90})  

let me know if it worked.
Alex [import]uid: 4883 topic_id: 587 reply_id: 2843[/import]

didn’t work. cant seem to find any way to rotate the webpopup window. [import]uid: 6317 topic_id: 587 reply_id: 2849[/import]

Are you using Beta4 and a build.settings file? [import]uid: 5712 topic_id: 587 reply_id: 2850[/import]

yes [import]uid: 6317 topic_id: 587 reply_id: 2852[/import]