Jiggy External text.

Discussion in 'Jiggy Runtime Development' started by eli312, Jun 17, 2008.

  1. eli312

    eli312 New Member

    Joined:
    May 11, 2008
    Messages:
    15
    Likes Received:
    0
    hey.
    I was wondering what the easiest way is to load text external from say a txt. file ?

    and just sorta a bit extra what is the easiest way to put text onto an app like give infomation and such like.

    sorry if this does not exactly make sense im quite new to all this.

    Thanks
  2. pabloppp

    pabloppp New Member

    Joined:
    Feb 21, 2008
    Messages:
    53
    Likes Received:
    0
    Try This

    Code:
    var data = new Data();
    
    data.loadFromFile("text.txt");
    var text = data.asString();
    It works for me...
  3. eli312

    eli312 New Member

    Joined:
    May 11, 2008
    Messages:
    15
    Likes Received:
    0
    sorry for being sorta noobish but is there something else i am missing and need to add to get it to show up on my ipods screen?
  4. ricardofelix95

    ricardofelix95 Banned

    Joined:
    Mar 16, 2008
    Messages:
    2,702
    Likes Received:
    4
    im sorry to say but i don recommend u to make jiggy apps
  5. eli312

    eli312 New Member

    Joined:
    May 11, 2008
    Messages:
    15
    Likes Received:
    0
    Why is that?
  6. pabloppp

    pabloppp New Member

    Joined:
    Feb 21, 2008
    Messages:
    53
    Likes Received:
    0
    Code:
    var data = new Data();
    
    data.loadFromFile( "text.txt");
    var text = data.asString();
    
    var popup = new UIAlertSheet( "Text:", [ text ] , 1 );
    popup.popupAlertAnimated( true );
    
    PD: ricardofelix95 try to help instead of criticize...
  7. Brill301

    Brill301 Member

    Joined:
    Dec 19, 2007
    Messages:
    441
    Likes Received:
    14
    Device:
    iPhone 4 (Black)
    yo

    you were a 'noob' once to...
  8. eli312

    eli312 New Member

    Joined:
    May 11, 2008
    Messages:
    15
    Likes Received:
    0
  9. Ryan

    Ryan Well-Known Member

    Joined:
    Jan 19, 2008
    Messages:
    4,129
    Likes Received:
    28
    Device:
    Nexus 4
    this should help.


    var daata = new Data();
    daata.loadFromFile(Bundle.pathForResource("test.txt"));
    log("Data= " + daata.asString());


    var atextbox = new UITextView( [ 20 , 52 , window.bounds[2]-40 , 150 ] );
    atextbox.text = daata.asString();
    atextbox.editable = false;

    mainView.addSubview( atextbox );

Share This Page