Multiple Web Popups

Hi,
Is there any way to create multiple web popups? I have set up a web popup and when a button is pressed, the web popup is supposed to close and a different one needs to open. However, any time that I go to build the app, it fails in the Xcode simulator. If I ignore the part the opens the new popup, there is no problem when building on the simulator. Here is the code:

[lua]display.setStatusBar( display.HiddenStatusBar )

currentTab = “home”

native.showWebPopup( 0, 0, display.contentWidth, display.contentHeight-60, “index.html”, {hasBackground=false, baseUrl=system.ResourceDirectory} )
local tab_bar = display.newImageRect( “tab_bar.png”, display.contentWidth, 80 )
tab_bar.x = display.contentWidth / 2
tab_bar.y = display.contentHeight-15

local selector = display.newImageRect( “select.png”, display.contentWidth/5, display.contentHeight / 8 )
selector.x = display.contentWidth / 7
selector.y = display.contentHeight-27

function calendar_button_press( )

if (currentTab == “calendar”) then

else
transition.to( selector, { time=200, alpha=1, x=((display.contentWidth / 7) * 3.48) } )
native.cancelWebPopup()
native.showWebPopup( 0, 0, display.contentWidth, display.contentHeight-60, “index.html”, {hasBackground=false, baseUrl=system.ResourceDirectory} )
currentTab = “calendar”
end

end

function home_button_press( )

if (currentTab == “home”) then

else
transition.to( selector, { time=200, alpha=1, x=(display.contentWidth / 7) } )
currentTab = “home”
end

end

function website_button_press( )

if (currentTab == “website”) then

else
transition.to( selector, { time=200, alpha=1, x=((display.contentWidth / 7) * 6) } )
native.cancelWebPopup()
native.showWebPopup( 0, 0, display.contentWidth, (display.contentHeight-60), “http://www.baptistbiblehour.org”, {urlRequest=listener} )

currentTab = “website”
end

end

local home_button = display.newImageRect( “home.png”, display.contentWidth/7, display.contentHeight / 11 )
home_button.x = display.contentWidth / 7
home_button.y = display.contentHeight-27
home_button:addEventListener( “touch”, home_button_press )

local calendar_button = display.newImageRect( “calendar.png”, display.contentWidth/7, display.contentHeight / 11 )
calendar_button.x = (display.contentWidth / 7) * 3.48
calendar_button.y = display.contentHeight-27
calendar_button:addEventListener( “touch”, calendar_button_press )

local website_button = display.newImageRect( “internet.png”, display.contentWidth/7, display.contentHeight / 11 )
website_button.x = (display.contentWidth / 7) * 6
website_button.y = display.contentHeight-27
website_button:addEventListener( “touch”, website_button_press )[/lua]

Thanks,

-David [import]uid: 10942 topic_id: 5182 reply_id: 305182[/import]

Anyone? I’ve been staring at my code, looking for something that could even remotely be wrong… Nothing seems to do the trick :confused: Both of the web popup calls work individually, but when they are in the same lua file, they cause the app to not open in the Xcode Simulator. Interestingly, it runs just fine in the Corona Simulator without displaying any errors in the terminal. [import]uid: 10942 topic_id: 5182 reply_id: 17384[/import]

From what I’ve read on the native.showWebPopup page, only one pop-up can be displayed at a time. [import]uid: 13264 topic_id: 5182 reply_id: 24476[/import]