Titanium Community Questions & Answer Archive

We felt that 6+ years of knowledge should not die so this is the Titanium Community Questions & Answer Archive

iPad Popover

Has anyone gotten the popover to work? I keep crashing with this:

var b1 = Titanium.UI.createButton({
    title:'FOO',
    height:40,
    width:200,
    top:400
});

var view_p = Ti.UI.createView({
    backgroundColor:'#ffffff',
    backgroundColor:'#363636',
    borderColor:'#363636',
    borderWidth:2,
    width:350,
    height:200,
    top:50,
    left:10


});

win6.add(b1);

b1.addEventListener('click', function()
{
var popover = Ti.UI.iPad.createPopover({height:100,width:100});
popover.add(view_p);
popover.show({view_p:b1});
});
— asked April 14th 2010 by Mark Smillie
  • ipad
  • popover
0 Comments

3 Answers

  • Accepted Answer

    Hey Mark,

    Try changing that second to last line to popover.show({view:b1}); and see if that does anything good for you. I just tried something similar and it seemed to work.

    — answered April 14th 2010 by Dan Giulvezan
    permalink
    0 Comments
  • I see this in the debug…

    Popovers cannot be presented from a view which does not have a window.

    but I do have a window Win6???

    — answered April 14th 2010 by Mark Smillie
    permalink
    0 Comments
  • I see this in the debug…

    Popovers cannot be presented from a view which does not have a window.

    but I do have a window Win6???

    — answered April 14th 2010 by Mark Smillie
    permalink
    0 Comments
The ownership of individual contributions to this community generated content is retained by the authors of their contributions.
All trademarks remain the property of the respective owner.