How to have one WebView var for multiple links

Discussion in 'Jiggy Runtime Development' started by Omer, Jun 23, 2008.

  1. Omer

    Omer New Member

    Joined:
    Oct 14, 2007
    Messages:
    175
    Likes Received:
    0
    Device:
    iPhone 3GS (Black)
    instead of doing var Browser = new WebView( [ 0 , 24 , 320 , mainView.bounds[3]-88 ] );
    var Browser1 = new WebView( [ 0 , 24 , 320 , mainView.bounds[3]-88 ] );
    var Browser2 = new WebView( [ 0 , 24 , 320 , mainView.bounds[3]-88 ] );
    var Browser3 = new WebView( [ 0 , 24 , 320 , mainView.bounds[3]-88 ] );
    var Browser4 = new WebView( [ 0 , 24 , 320 , mainView.bounds[3]-88 ] );
    var Browser5 = new WebView( [ 0 , 24 , 320 , mainView.bounds[3]-88 ] );
    var Browser6 = new WebView( [ 0 , 24 , 320 , mainView.bounds[3]-88 ] );
    var Browser7 = new WebView( [ 0 , 24 , 320 , mainView.bounds[3]-88 ] );
    var Browser8 = new WebView( [ 0 , 24 , 320 , mainView.bounds[3]-88 ] );
    var Browser9 = new WebView( [ 0 , 24 , 320 , mainView.bounds[3]-88 ] );
    var Browser10 = new WebView( [ 0 , 24 , 320 , mainView.bounds[3]-88 ] );
    var Browser11 = new WebView( [ 0 , 24 , 320 , mainView.bounds[3]-88 ] );
    var Browser12 = new WebView( [ 0 , 24 , 320 , mainView.bounds[3]-88 ] );
    var Browser13 = new WebView( [ 0 , 24 , 320 , mainView.bounds[3]-88 ] );
    var Browser14 = new WebView( [ 0 , 24 , 320 , mainView.bounds[3]-88 ] );
    var Browser15 = new WebView( [ 0 , 24 , 320 , mainView.bounds[3]-88 ] );
    var Browser16 = new WebView( [ 0 , 24 , 320 , mainView.bounds[3]-88 ] );
    var Browser17 = new WebView( [ 0 , 24 , 320 , mainView.bounds[3]-88 ] );
    var Browser18 = new WebView( [ 0 , 24 , 320 , mainView.bounds[3]-88 ] );

    how would i need only one, since it doesn't work with only one. i had to set 18 things, but now it loads REALLY slow
  2. Ryan

    Ryan Well-Known Member

    Joined:
    Jan 19, 2008
    Messages:
    4,129
    Likes Received:
    28
    Device:
    Nexus 4
    u only need 1 var.....

    then just refer to it over and over again.

    just use

    var Browser = new WebView( [ 0 , 24 , 320 , mainView.bounds[3]-88 ] );

    then when u need to use a browser use Browser
  3. Omer

    Omer New Member

    Joined:
    Oct 14, 2007
    Messages:
    175
    Likes Received:
    0
    Device:
    iPhone 3GS (Black)
    Go try it. it doesn't work.

Share This Page