"mainView not defined"

Discussion in 'Jiggy Runtime Development' started by 34highlighter, Jul 14, 2008.

  1. 34highlighter

    34highlighter New Member

    Joined:
    Jun 10, 2008
    Messages:
    182
    Likes Received:
    0
    Device:
    iPod touch
    im trying to make the nav bar for an app but it keeps saying mainView not defined heres my code

    var bar = new UINavigationBar( [ 0 , 0 , 20 , 48 ] );
    navbar.showButtonsWithLeftTitle( "About" , "null" , false );

    mainView.addSubview( bar );

    var itemOne = new UINavigationItem( "testbar" );
    bar.pushNavigationItem( itemOne );
  2. technoman

    technoman New Member

    Joined:
    Jan 27, 2008
    Messages:
    49
    Likes Received:
    0
    u need to declare this before u use main view....

    var mainView = new UIView();
    window.setContentView( mainView );
    hope this helps....
  3. PAEz

    PAEz New Member

    Joined:
    Jan 29, 2008
    Messages:
    201
    Likes Received:
    10
    "window is not defined"....

    Please Register or Log in to view images



    var mainWindow = new IUIWindow();
    var mainView = new UIView( mainWindow.bounds );
    mainWindow.setContentView( mainView );
  4. 34highlighter

    34highlighter New Member

    Joined:
    Jun 10, 2008
    Messages:
    182
    Likes Received:
    0
    Device:
    iPod touch
    i tried those codes mainview works but the bar and all the buttons r smushed into the side =/

    edit:nvm i got it to work thank you

Share This Page