Widgets 19.1 and 19.2 question
Welcome, Guest. Please login or register.
Did you miss your activation email?
October 09, 2015, 11:17:06 PM
Home Help Search chat Login Register 
News: Read this please.The Great Kangaroo Escape Looking for reviews of the 4th ed on Amazon!   Twitter:  @skochan

+ Official Forum for Programming in Objective-C (the iPhone Programming Language) - Stephen Kochan
|-+ Old Stuff
| |-+ Chapter Study
| | |-+ Chapter 19 - Archiving
| | | |-+ 19.1 and 19.2 question
Pages: [1] Go Down
Author Topic: 19.1 and 19.2 question (Read 1160 times)
Posts: 4


on: August 08, 2011, 05:12:28 PM

I run 19.1 from Xcode:

int main (int argc, const char * argv[])

    NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init];
    NSDictionary *glossary = [NSDictionary dictionaryWithObjectsAndKeys:
                              @"A class defined so other classes can inherit from it.",
                              @"abstract class",
                              @"To implement all the methods defined in a protocol",
                              @"Storing an object for later use.",
                              nil ];
    if ([glossary writeToFile:@"glossary" atomically:YES] == NO)
        NSLog(@"save to file failed!");
    [pool drain];
    return 0;

and it took me awhile to find, but it creates the glossary file in the Debug file along with the .exe. So i tried taking the .exe out of the debug folder and onto my desktop to see if it would create another glossary file, but it didn't. Then i tried building it without running it, still it wouldn't create the glossary file anywhere.

But if i run 19.2:

int main (int argc, const char * argv[])

    NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init];
    NSDictionary *glossary;
    glossary = [NSDictionary dictionaryWithContentsOfFile:@"glossary"];
    for ( NSString *key in glossary )
        NSLog(@"%@: %@", key, [glossary objectForKey:key]);   
    [pool drain];
    return 0;

it can read the glossary file no matter where i put the .exe.
So I guess my question is, where are these XML property list files saved? And how accessible are they to different programs I build. I hope this makes sense.
Thank you
Hero Member
Posts: 3114

Reply #1 on: August 11, 2011, 10:36:47 PM


I'm confused about how you build and ran the program.  The best way to control where the application is running is by running it from inside Terminal.  And the best way to control where the glossary is created and/or read from is by using a full path to the glossary file (and not a relative path like in the example), or to set the current directory path first inside the app to set the context for any future relative file references.


Posts: 1

[url=] [/url]


Reply #2 on: December 29, 2011, 12:44:42 PM

I mean play the MTS/AVCHD files without any jittery.  Im not worried on which player to use VLC does the job, but the question is more of what card is needed?  do I really need a graphics/video card?  if so what should I look for NVIDIA ? which one?

Pages: [1] Go Up
Jump to:

Login with username, password and session length

Powered by MySQL Powered by PHP Powered by SMF 1.1.11 | SMF © 2006-2009, Simple Machines LLC Valid XHTML 1.0! Valid CSS!
Entire forum contents (c) 2009 All rights reserved.