The Jiggy Help Thread

Discussion in 'Jiggy Runtime Development' started by nambrot, Mar 26, 2008.

  1. nambrot New Member

    Member Since:
    Nov 18, 2007
    Message Count:
    142
    HI,
    The toolchain forum is so full with JIggy Thread, so i would think that one summarized Jiggy Thread is better. If somebody need help with jiggy Code or sth. like that just post it. Because together we are more productive.
    So i Think: Why not beginning^^
    I am currently try to develop an Offline Maps Reader, so that ipodTouch User can use Maps even offline, more effecitve.
    i have the 2D Array of this:

    Code:
    var content = FileManager.directoryContents("/private/var/root/Library/Caches/MapTiles/", false); 
    var sicher = FileManager.fileExists("/private/var/root/Library/Caches/MapTiles/MapTiles.sqlitedb");
    var var1 = log(content.toSource());
    
    var1 is now the 2D Array with all what i need. How do i get an 1d Array with just the FileNames?
  2. curthard89 New Member

    Member Since:
    Sep 15, 2007
    Message Count:
    178
    Device:
    iPhone 3GS (Black)
    var var1 = [];

    for( var i in content ) {
    var1.push( content[ i ]['path'] );
    }
  3. nambrot New Member

    Member Since:
    Nov 18, 2007
    Message Count:
    142
    hey thx
    that helps very much, no i have an array with all the Cache Files
    Continue Questioning:
    Are There Any Templates or pre-made codes for Settings with the iphone typic Design?
    And arent there any other Commands for FileManager as rename or copy? I could only find move.
    edit:
    Here's another problem:
    Code:
    //Keyboard
    var keyboard = new UIKeyboard();
    keyboard.preferredKeyboardType = 0;
    keyboard.setDefaultReturnKeyType( 0 );
    keyboard.showPreferredLayout();
    keyboard.activate();
    
    //Textfield
    var textfeld = new UITextField ( [30 ,140 +10*var1.length, window.bounds[ 2 ] - 60 , 40 ]);
    textfeld.setPadding(1,1,1,1);
    textfeld.text="";
    textfeld.setFont( new Font( "Trebuchet MS" , 2 , 19 ) );
    textfeld.setBorderStyle(2);
    textfeld.placeholder = "Type A File Name Here";
    window.addSubview( textfeld );
    //textfeld.onShouldInsertText("window.addSubview( keyboard );" , 1);
    How can i let the keyboard Pop Up when i want to insert sth. into the Textfield?
    How do i use the Events?
    So i want to use onShouldInsertText and onClearButtonClicked to use the filename.
    How?
  4. curthard89 New Member

    Member Since:
    Sep 15, 2007
    Message Count:
    178
    Device:
    iPhone 3GS (Black)
    there are no templates, and filemanager only does what the docs say im afraid, if you want design etc,

    http://www.geekygoodness.com

    go there and download some of there apps, open them up and view the main.js.
  5. nambrot New Member

    Member Since:
    Nov 18, 2007
    Message Count:
    142
    ip hope i havrent scare you, i meant the typical design of the iPhone settings menues.
    Is It UIPreferencesTable.
    The Keyboard-Textfield problem has been solved.
    Hope tomorrow i can show you the app.
    you HAve an ipod touch?
  6. curthard89 New Member

    Member Since:
    Sep 15, 2007
    Message Count:
    178
    Device:
    iPhone 3GS (Black)
    yes its uiprefstable,

    i recomend downloading one of there apps anyway, theres a custom js library for jiggy in it and it makes using the tables a breeze.

    and i have ipod t and iphone
  7. Zdrasti New Member

    Member Since:
    Mar 1, 2008
    Message Count:
    16
    exit, open and save commands.

    How can I put a save, open or exit feature in a jiggy app?

    I mean, what is the command?
  8. nambrot New Member

    Member Since:
    Nov 18, 2007
    Message Count:
    142
    what do you want to save or open?
    and exit, its the Homebutton isnt it?
  9. curthard89 New Member

    Member Since:
    Sep 15, 2007
    Message Count:
    178
    Device:
    iPhone 3GS (Black)
    saving isnt as simple as pressing save and hope it works, you have to loop through the ceklls in the tables etc pulling out the data, saving it to sql or defaults or plist. i cannot give u the code because its different for every app
  10. nambrot New Member

    Member Since:
    Nov 18, 2007
    Message Count:
    142
    edit: has been solved
    i gonna publish it tomorrow
    does sb. know how to publish Jiggy Apps?
    the whole folder or just the main.js.?
    How can i import it into a repo?