bbtouch preferences
Posted: 05 September 2008 02:50 PM   [ Ignore ]
New Member
Rank
Total Posts:  88
Joined  2008-05-17

Does anyone know where bbtouch stores its preferences? It doesn’t seem to be in a user specific location as it carries through different user accounts. Whatever settings I used before have left it in an unusable state, I’d like to get a fresh start. A spotlight search for bbtouch doesn’t turn up anything outside of the opentouch project folder.

I’m betting the answer is in here but I can’t figure it out: 

#import "BBApplicationSupport.h"


@implementation BBApplicationSupport

// access to the app support folder
// if it doesnt exist it makes it
+(NSString*)applicationSupportFolder 
{    
    NSArray 
*paths NSSearchPathForDirectoriesInDomains(NSApplicationSupportDirectoryNSUserDomainMaskYES);
    
NSString *basePath = ([paths count] 0) ? [paths objectAtIndex:0] NSTemporaryDirectory();
    
// got the app support directory, now check to make sure there is a folder for us
    
NSString dir [basePath stringByAppendingPathComponent:@"BBTouch"];
    if (!
[[NSFileManager defaultManager] fileExistsAtPath:dir isDirectory:NULL]{
        [[NSFileManager defaultManager] createDirectoryAtPath
:dir attributes:nil];
    
}    
    
return dir;
}

// this only returns a valid string if the path exisits, otherwise you get a nil
+(NSString*)pathForApplicationSupportFileWithName:(NSString*)name
{
    NSString 
directory [BBApplicationSupport applicationSupportFolder];
    
NSString filePath [directory stringByAppendingPathComponent:name];
    if (
[[NSFileManager defaultManager] fileExistsAtPath:filePath]{
        
return filePath;
    
}
    
return nil;
}

@end

 Signature 

Nuigroup wiki

Profile
 
 
Posted: 05 September 2008 04:26 PM   [ Ignore ]   [ # 1 ]
New Member
Rank
Total Posts:  12
Joined  2008-08-07

I’ve found them in /Users/<User>/Library/Application Support/BBTouch

Profile
 
 
Posted: 05 September 2008 05:34 PM   [ Ignore ]   [ # 2 ]
New Member
Rank
Total Posts:  88
Joined  2008-05-17

sure enough! I wonder why that folder didn’t show up in my search.

 Signature 

Nuigroup wiki

Profile