Search Results

Search found 600 results on 24 pages for 'plist'.

Page 10/24 | < Previous Page | 6 7 8 9 10 11 12 13 14 15 16 17  | Next Page >

  • iOS TableView crash loading different data

    - by jollyr0ger
    Hi to all! I'm developing a simple iOS app where there is a table view with some categories (CategoryViewController). When clicking one of this category the view will be passed to a RecipesListController with another table view with recipes. This recipes are loaded from different plist based on the category clicked. The first time I click on a category, the recipes list is loaded and shown correctely. If i back to the category list and click any of the category (also the same again) the app crash. And I don't know how. The viewWillAppear is ececuted correctely but after crash. Can you help me? If you need the entire project I can zip it for you. Ok? Here is the code of the CategoryViewController.h #import <Foundation/Foundation.h> #import "RecipeRowViewController.h" @class RecipesListController; @interface CategoryViewController : UITableViewController { NSArray *recipeCategories; RecipesListController *childController; } @property (nonatomic, retain) NSArray *recipeCategories; @end The CategoryViewControoler.m #import "CategoryViewCotroller.h" #import "NavAppDelegate.h" #import "RecipesListController.h" @implementation CategoryViewController @synthesize recipeCategories; - (void)viewDidLoad { // Create the categories NSArray *array = [[NSArray alloc] initWithObjects:@"Antipasti", @"Focacce", @"Primi", @"Secondi", @"Contorni", @"Dolci", nil]; self.recipeCategories = array; [array release]; // Set background image UIImageView *bgImg = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"sfondo_app.png"]]; [self.tableView setBackgroundView:bgImg]; [bgImg release]; [self.tableView reloadData]; [super viewDidLoad]; } - (void)viewDidUnload { self.recipeCategories = nil; // [childController release]; [super viewDidUnload]; } - (void)dealloc { [recipeCategories release]; // [childController release]; [super dealloc]; } #pragma mark - #pragma mark Table data source methods - (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section { return [recipeCategories count]; } - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { static NSString *CellId = @"RecipesCategoriesCellId"; // Try to reuse a cell or create a new one UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellId]; if (cell == nil) { cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:CellId] autorelease]; } // Get the right value and assign to the cell NSUInteger row = [indexPath row]; NSString *rowString = [recipeCategories objectAtIndex:row]; cell.textLabel.text = rowString; cell.accessoryType = UITableViewCellAccessoryDisclosureIndicator; [rowString release]; return cell; } #pragma mark - #pragma mark Table view delegate methods - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath { if (childController == nil) { childController = [[RecipesListController alloc] initWithStyle:UITableViewStyleGrouped]; } childController.title = @"Ricette"; childController.category = [indexPath row]; [self.navigationController pushViewController:childController animated:YES]; } @end The RecipesListController.h #import <Foundation/Foundation.h> #import "RecipeRowViewController.h" #define kRecipeArrayLink 0 #define kRecipeArrayDifficulty 1 #define kRecipeArrayFoodType 2 #define kRecipeAntipasti 0 #define kRecipeFocacce 1 #define kRecipePrimi 2 #define kRecipeSecondi 3 #define kRecipeContorni 4 #define kRecipeDolci 5 @class DisclosureDetailController; @interface RecipesListController : UITableViewController { NSInteger category; NSDictionary *recipesArray; NSArray *recipesNames; NSArray *recipesLinks; DisclosureDetailController *childController; } @property (nonatomic) NSInteger category; @property (nonatomic, retain) NSDictionary *recipesArray; @property (nonatomic, retain) NSArray *recipesNames; @property (nonatomic, retain) NSArray *recipesLinks; @end The RecipesListcontroller.m #import "RecipesListController.h" #import "NavAppDelegate.h" #import "DisclosureDetailController.h" @implementation RecipesListController @synthesize category, recipesArray, recipesNames, recipesLinks; - (void)viewDidLoad { // Set background image UIImageView *bgImg = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"sfondo_app.png"]]; [self.tableView setBackgroundView:bgImg]; [bgImg release]; [self.tableView reloadData]; [super viewDidLoad]; } - (void)viewWillAppear:(BOOL)animated { if (self.recipesArray != nil) { // Release the arrays [self.recipesArray release]; [self.recipesNames release]; } // Load the dictionary NSString *path = nil; // Load a different dictionary, based on the category if (self.category == kRecipeAntipasti) { path = [[NSBundle mainBundle] pathForResource:@"recipes_antipasti" ofType:@"plist"]; } else if (self.category == kRecipeFocacce) { path = [[NSBundle mainBundle] pathForResource:@"recipes_focacce" ofType:@"plist"]; } else if (self.category == kRecipePrimi) { path = [[NSBundle mainBundle] pathForResource:@"recipes_primi" ofType:@"plist"]; } else if (self.category == kRecipeSecondi) { path = [[NSBundle mainBundle] pathForResource:@"recipes_secondi" ofType:@"plist"]; } else if (self.category == kRecipeContorni) { path = [[NSBundle mainBundle] pathForResource:@"recipes_contorni" ofType:@"plist"]; } else if (self.category == kRecipeDolci) { path = [[NSBundle mainBundle] pathForResource:@"recipes_dolci" ofType:@"plist"]; } NSDictionary *dict = [[NSDictionary alloc] initWithContentsOfFile:path]; self.recipesArray = dict; [dict release]; // Save recipes names NSArray *array = [[recipesArray allKeys] sortedArrayUsingSelector: @selector(compare:)]; self.recipesNames = array; [self.tableView reloadData]; [super viewWillAppear:animated]; } - (void)viewDidUnload { self.recipesArray = nil; self.recipesNames = nil; self.recipesLinks = nil; // [childController release]; [super viewDidUnload]; } - (void)dealloc { [recipesArray release]; [recipesNames release]; [recipesLinks release]; // [childController release]; [super dealloc]; } #pragma mark - #pragma mark Table data source methods - (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section { return [recipesNames count]; } - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { static NSString *RecipesListCellId = @"RecipesListCellId"; // Try to reuse a cell or create a new one UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:RecipesListCellId]; if (cell == nil) { cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:RecipesListCellId] autorelease]; } // Get the right value and assign to the cell NSUInteger row = [indexPath row]; NSString *rowString = [recipesNames objectAtIndex:row]; cell.textLabel.text = rowString; cell.accessoryType = UITableViewCellAccessoryDisclosureIndicator; [rowString release]; return cell; } #pragma mark - #pragma mark Table view delegate methods - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath { if (childController == nil) { childController = [[DisclosureDetailController alloc] initWithNibName:@"DisclosureDetail" bundle:nil]; } childController.title = @"Dettagli"; NSUInteger row = [indexPath row]; childController.recipeName = [recipesNames objectAtIndex:row]; NSArray *recipeRawArray = [recipesArray objectForKey:childController.recipeName]; childController.recipeLink = [recipeRawArray objectAtIndex:kRecipeArrayLink]; childController.recipeDifficulty = [recipeRawArray objectAtIndex:kRecipeArrayDifficulty]; [self.navigationController pushViewController:childController animated:YES]; } @end This is the crash log Program received signal: “EXC_BAD_ACCESS”. (gdb) bt #0 0x00f0da63 in objc_msgSend () #1 0x04b27ca0 in ?? () #2 0x00002665 in -[RecipesListController viewWillAppear:] (self=0x4b38a00, _cmd=0x6d81a2, animated=1 '\001') at /Users/claudiocanino/Documents/iOS/CottoMangiato/Classes/RecipesListController.m:67 #3 0x00370c9a in -[UINavigationController _startTransition:fromViewController:toViewController:] () #4 0x0036b606 in -[UINavigationController _startDeferredTransitionIfNeeded] () #5 0x0037283e in -[UINavigationController pushViewController:transition:forceImmediate:] () #6 0x04f49549 in -[UINavigationControllerAccessibility(SafeCategory) pushViewController:transition:forceImmediate:] () #7 0x0036b4a0 in -[UINavigationController pushViewController:animated:] () #8 0x00003919 in -[CategoryViewController tableView:didSelectRowAtIndexPath:] (self=0x4b27ca0, _cmd=0x6d19e3, tableView=0x500c200, indexPath=0x4b2d650) at /Users/claudiocanino/Documents/iOS/CottoMangiato/Classes/CategoryViewCotroller.m:104 #9 0x0032a794 in -[UITableView _selectRowAtIndexPath:animated:scrollPosition:notifyDelegate:] () #10 0x00320d50 in -[UITableView _userSelectRowAtPendingSelectionIndexPath:] () #11 0x000337f6 in __NSFireDelayedPerform () #12 0x00d8cfe3 in __CFRUNLOOP_IS_CALLING_OUT_TO_A_TIMER_CALLBACK_FUNCTION__ () #13 0x00d8e594 in __CFRunLoopDoTimer () #14 0x00ceacc9 in __CFRunLoopRun () #15 0x00cea240 in CFRunLoopRunSpecific () #16 0x00cea161 in CFRunLoopRunInMode () #17 0x016e0268 in GSEventRunModal () #18 0x016e032d in GSEventRun () #19 0x002c342e in UIApplicationMain () #20 0x00001c08 in main (argc=1, argv=0xbfffef58) at /Users/claudiocanino/Documents/iOS/CottoMangiato/main.m:15 Another bt log: (gdb) bt #0 0x00cd76a1 in __CFBasicHashDeallocate () #1 0x00cc2bcb in _CFRelease () #2 0x00002dd6 in -[RecipesListController setRecipesArray:] (self=0x6834d50, _cmd=0x4293, _value=0x4e3bc70) at /Users/claudiocanino/Documents/iOS/CottoMangiato/Classes/RecipesListController.m:16 #3 0x00002665 in -[RecipesListController viewWillAppear:] (self=0x6834d50, _cmd=0x6d81a2, animated=1 '\001') at /Users/claudiocanino/Documents/iOS/CottoMangiato/Classes/RecipesListController.m:67 #4 0x00370c9a in -[UINavigationController _startTransition:fromViewController:toViewController:] () #5 0x0036b606 in -[UINavigationController _startDeferredTransitionIfNeeded] () #6 0x0037283e in -[UINavigationController pushViewController:transition:forceImmediate:] () #7 0x091ac549 in -[UINavigationControllerAccessibility(SafeCategory) pushViewController:transition:forceImmediate:] () #8 0x0036b4a0 in -[UINavigationController pushViewController:animated:] () #9 0x00003919 in -[CategoryViewController tableView:didSelectRowAtIndexPath:] (self=0x4b12970, _cmd=0x6d19e3, tableView=0x5014400, indexPath=0x4b2bd00) at /Users/claudiocanino/Documents/iOS/CottoMangiato/Classes/CategoryViewCotroller.m:104 #10 0x0032a794 in -[UITableView _selectRowAtIndexPath:animated:scrollPosition:notifyDelegate:] () #11 0x00320d50 in -[UITableView _userSelectRowAtPendingSelectionIndexPath:] () #12 0x000337f6 in __NSFireDelayedPerform () #13 0x00d8cfe3 in __CFRUNLOOP_IS_CALLING_OUT_TO_A_TIMER_CALLBACK_FUNCTION__ () #14 0x00d8e594 in __CFRunLoopDoTimer () #15 0x00ceacc9 in __CFRunLoopRun () #16 0x00cea240 in CFRunLoopRunSpecific () #17 0x00cea161 in CFRunLoopRunInMode () #18 0x016e0268 in GSEventRunModal () #19 0x016e032d in GSEventRun () #20 0x002c342e in UIApplicationMain () #21 0x00001c08 in main (argc=1, argv=0xbfffef58) at /Users/claudiocanino/Documents/iOS/CottoMangiato/main.m:15 Thanks

    Read the article

  • Concerting an iTunes iphone OS 4.0 backup to 3.2

    - by Moitah
    Hello ! I use my 4.0 iPhone for both work and personal stuff. So iTunes keeps, every time I sync my iPhone, a backup in ~/Library/Application Support/MobileSync/Backup. I recently bought an iPad (OS 3.2). I'd like to be able to duplicate my iPhone backup, and restore it on the iPad (so I'll have all my apps settings, passwords, application positions, etc... from the iPhone on the iPad) So, I need to convert the backup from 4.0 to 3.2. I know this is not officially supported by Apple, but has any of you guys figured that out ? There are 5 easily editable files in the backup folder : Info.plist Manifest.mbdb Manifest.mbdx Manifest.plist Status.plist Thanks !

    Read the article

  • Adding rows to UItableview and passing data between Viewcontrollers

    - by Jonathan
    I have a list of websites in a plist, when the app loads this populates a tableview (which is inside a navigation controller) But I have added an add button to the navigation bar and then created another View Controller to deal with inputting of the new website (Like Title and URL). It is very similar to how the contacts app looks. There is a table view and when you tap add, the add UI slides up. I have got all this working great so far. My Problem is what happens when the user taps Done. I can add the website to the plist (each website is a dictionary in the plist with 2 keys, atm) But then how do I tell the tableView to update? The table view has not been removed from the main window, just the add view has been added on top of the "screen". Another way of asking is, when you tap Save on Add a Contact screen: (not my image) How does the new contact's data (Xyz's data) get shown on the tableview?

    Read the article

  • iphone: how do I obtain a list of all files with a given extension on the app's document folder?

    - by Mike
    I have saved all my files using something like this NSString *fileName = [NSString stringWithFormat:@"%@.plist", myName]; NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES); NSString *documentsDirectory = [paths objectAtIndex:0]; NSString *appFile = [documentsDirectory stringByAppendingPathComponent:fileName]; [myDict writeToFile:appFile atomically:YES]) //where myDic is a dictionary containing the value of all parameters I would like to save. All these files were saved with the .plist extension. The same directory contains several JPG and PNG files. Now, how do I retrieve the list of all .plist files on that directory? thanks for any help.

    Read the article

  • Is it possible to create a CImageList with alpha blending transparency?

    - by Sorin Sbarnea
    I would like to knwo if it is possible to create a CImageList with alpha blending transparency. Sample code that creates a CImageList with ugly transparency (no alpha blending) CGdiPlusBitmapResource m_pBitmap; m_pBitmap.Load(IDB_RIBBON_FILESMALL,_T("PNG"),AfxGetResourceHandle()); HBITMAP hBitmap; m_pBitmap.m_pBitmap->GetHBITMAP(RGB(0,0,0),&hBitmap ); CImageList *pList=new CImageList; CBitmap bm; bm.Attach(hBitmap); pList->Create(16, 16, ILC_COLOR32 | ILC_MASK, 0, 4); pList->Add(&bm, RGB(255,0,255));

    Read the article

  • iphone build error that makes me want to buy a nail gun

    - by sol
    I'm just trying to build a simple update (which I have done before) for an iphone app, but now for some reason I'm getting this error. Can anyone tell me what it means? Command/Developer/Library/Xcode/Plug-ins/CoreBuildTasks.xcplugin/Contents/Resources/copyplist failed with exit code 127 sh: plutil: command not found Here are the Build Results: CopyPNGFile /Users/me/path/build/Dist-iphoneos/MyApp.app/img_000.png images/img_000.png cd /Users/me/ setenv COPY_COMMAND /Developer/Library/PrivateFrameworks/DevToolsCore.framework/Resources/pbxcp setenv PATH "/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin:/Developer/usr/bin:/System/Library/Frameworks/JavaVM.frameworK/Versions/1.6/Home/" "/Developer/Platforms/iPhoneOS.platform/Developer/Library/Xcode/Plug-ins/iPhoneOS Build System Support.xcplugin/Contents/Resources/copypng" -compress "" /Users/path/images/img_000.png /Users/me/path/build/Dist-iphoneos/MyApp.app/img_000.png sh: dirname: command not found CopyPlistFile /Users/me/path/build/Dist-iphoneos/MyApp.app/Entitlements.plist Entitlements.plist cd /Users/me/ setenv PATH "/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin:/Developer/usr/bin:/System/Library/Frameworks/JavaVM.frameworK/Versions/1.6/Home/" /Developer/Library/Xcode/Plug-ins/CoreBuildTasks.xcplugin/Contents/Resources/copyplist --convert binary1 Entitlements.plist --outdir /Users/me/path/build/Dist-iphoneos/MyApp.app sh: plutil: command not found

    Read the article

  • Corrupt iPhone App Name

    - by vickirk
    I've done an adhoc build to test an application, but when I drag it into iTunes to add to my devices it is getting a corrupt name. It comes up with the name "Myapp Name <!DOCTYPE plist PUBLIC "-//APPLE//DTD PLIST 1.0//EN" http://www.apple.com/DTDs/PropertyList-1.0.dtd"" which continues with the whole plist I've tried the obvious, clean/rebuild/reboot. This worked fine last time I worked on the app and I've done nothing to project settings other than incement the version number and a couple of minor code changes. I've since update XCode to 3.2.1 and iTunes to 9.0.3. Anyone seen this before?

    Read the article

  • IOS where to put the configuration of facebook sdk

    - by Carol Smith
    I am trying to integrated my IOS 7 application with Facebook SDK I following this official tutorial https://developers.facebook.com/docs/ios/getting-started which states Configure the .plist Follow these three steps: Create a key called FacebookAppID with a string value, and add the app ID there. Create a key called FacebookDisplayName with a string value, and add the Display Name you configured in the App Dashboard. Create an array key called URL types with a single array sub-item called URL Schemes. Give this a single item with your app ID prefixed with fb. This is used to ensure the application will receive the callback URL of the web-based OAuth flow. The finished .plist should look something like this: My question is where to put these values? They already put this image, maybe it helps you to answer me Edit The problem that I don't have any plist file in my framework in xcode and I can't add a new one because if i did, I would have to add all the variables that you see in the image but the tutorial just stated about some of them

    Read the article

  • Localizing other pages in Settings.bundle

    - by joneswah
    I have other pages within my app preferences which are stored as separate files within the settings.bundle. It has come time to localize my app and I can only seem to get the Root values to localize. I was wondering whether there was a trick? The following image shows that my second screen is stored within a file called "MyPrefs.plist" and I have created a corresponding named file "MyPrefs.strings" in the en.lproj directory. Mirroring the same naming and location as the Root.plist and Root.strings. The values with the Root.plist are converted as expected but not in the extra screen. Is there any trick to localizing secondary screens with the settings.bundle?

    Read the article

  • How to change the app name in OSX menubar in a pure-Python application bundle?

    - by gyim
    I am trying to create a pure-Python application bundle for a wxPython app. I created the .app directory with the files described in Apple docs, with an Info.plist file etc. The only difference between a "normal" app and this bundle is that the entry point (CFBundleExecutable) is a script which starts with the following line: #!/usr/bin/env python2.5 Everything works fine except that the application name in the OSX menubar is still "Python" although I have set the CFBundleName in Info.plist (I copied the result of py2app, actually). The full Info.plist can be viewed here: http://tinyurl.com/32qgpjt How can I change this? I have read everywhere that the menubar name is only determined by CFBundleName. How is it possible that the Python interpreter can change this in runtime? Note: I was using py2app before, but the result was too large (50 MB instead of the current 100KB) and it was not even portable between Leopard and Snow Leopard... so it seems to be much easier to create a pure-Python app bundle "by hand" than transforming the output of py2app.

    Read the article

  • Sublime text 2 syntax highlighter?

    - by BigSack
    I have coded my first custom syntax highlighter for sublime text 2, but i don't know how to install it. It is based on notepad++ highlighter found here https://70995658-a-62cb3a1a-s-sites.googlegroups.com/site/lohanplus/files/smali_npp.xml?attachauth=ANoY7criVTO9bDmIGrXwhZLQ_oagJzKKJTlbNDGRzMDVpFkO5i0N6hk_rWptvoQC1tBlNqcqFDD5NutD_2vHZx1J7hcRLyg1jruSjebHIeKdS9x0JCNrsRivgs6DWNhDSXSohkP1ZApXw0iQ0MgqcXjdp7CkJJ6pY_k5Orny9TfK8UWn_HKFsmPcpp967NMPtUnd--ad-BImtkEi-fox2tjs7zc5LabkDQ%3D%3D&attredirects=0&d=1 <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> <plist version="1.0"> <dict> <key>fileTypes</key> <array> <string>smali</string> </array> <dict> <key>Word1</key> <string>add-double add-double/2addr add-float add-float/2addr add-int add-int/2addr add-int/lit16 add-int/lit8 add-long add-long/2addr aget aget-boolean aget-byte aget-char aget-object aget-short aget-wide and-int and-int/2addr and-int/lit16 and-int/lit8 and-long and-long/2addr aput aput-boolean aput-byte aput-char aput-object aput-short aput-wide array-length check-cast cmp-long cmpg-double cmpg-float cmpl-double cmpl-float const const-class const-string const-string-jumbo const-wide const-wide/16 const-wide/32 const-wide/high16 const/16 const/4 const/high16 div-double div-double/2addr div-float div-float/2addr div-int div-int/2addr div-int/lit16 div-int/lit8 div-long div-long/2addr double-to-float double-to-int double-to-long execute-inline fill-array-data filled-new-array filled-new-array/range float-to-double float-to-int float-to-long goto goto/16 goto/32 if-eq if-eqz if-ge if-gez if-gt if-gtz if-le if-lez if-lt if-ltz if-ne if-nez iget iget-boolean iget-byte iget-char iget-object iget-object-quick iget-quick iget-short iget-wide iget-wide-quick instance-of int-to-byte int-to-char int-to-double int-to-float int-to-long int-to-short invoke-direct invoke-direct-empty invoke-direct/range invoke-interface invoke-interface/range invoke-static invoke-static/range invoke-super invoke-super-quick invoke-super-quick/range invoke-super/range invoke-virtual invoke-virtual-quick invoke-virtual-quick/range invoke-virtual/range iput iput-boolean iput-byte iput-char iput-object iput-object-quick iput-quick iput-short iput-wide iput-wide-quick long-to-double long-to-float long-to-int monitor-enter monitor-exit move move-exception move-object move-object/16 move-object/from16 move-result move-result-object move-result-wide move-wide move-wide/16 move-wide/from16 move/16 move/from16 mul-double mul-double/2addr mul-float mul-float/2addr mul-int mul-int/2addr mul-int/lit8 mul-int/lit16 mul-long mul-long/2addr neg-double neg-float neg-int neg-long new-array new-instance nop not-int not-long or-int or-int/2addr or-int/lit16 or-int/lit8 or-long or-long/2addr rem-double rem-double/2addr rem-float rem-float/2addr rem-int rem-int/2addr rem-int/lit16 rem-int/lit8 rem-long rem-long/2addr return return-object return-void return-wide rsub-int rsub-int/lit8 sget sget-boolean sget-byte sget-char sget-object sget-short sget-wide shl-int shl-int/2addr shl-int/lit8 shl-long shl-long/2addr shr-int shr-int/2addr shr-int/lit8 shr-long shr-long/2addr sparse-switch sput sput-boolean sput-byte sput-char sput-object sput-short sput-wide sub-double sub-double/2addr sub-float sub-float/2addr sub-int sub-int/2addr sub-int/lit16 sub-int/lit8 sub-long sub-long/2addr throw throw-verification-error ushr-int ushr-int/2addr ushr-int/lit8 ushr-long ushr-long/2addr xor-int xor-int/2addr xor-int/lit16 xor-int/lit8 xor-long xor-long/2addr</string> </dict> <dict> <key>Word2</key> <string>v0 v1 v2 v3 v4 v5 v6 v7 v8 v9 v10 v11 v12 v13 v14 v15 v16 v17 v18 v19 v20 v21 v22 v23 v24 v25 v26 v27 v28 v29 v30 v31 v32 v33 v34 v35 v36 v37 v38 v39 v40 v41 v42 v43 v44 v45 v46 v47 v48 v49 v50 p0 p1 p2 p3 p4 p5 p6 p7 p8 p9 p10 p11 p12 p13 p14 p15 p16 p17 p18 p19 p20 p21 p22 p23 p24 p25 p26 p27 p28 p29 p30</string> </dict> <dict> <key>Word3</key> <string>array-data .catch .catchall .class .end .end\ local .enum .epilogue .field .implements .line .local .locals .parameter .prologue .registers .restart .restart\ local .source .subannotation .super</string> </dict> <dict> <key>Word4</key> <string>abstract bridge constructor declared-synchronized enum final interface native private protected public static strictfp synchronized synthetic system transient varargs volatile</string> </dict> <dict> <key>Word4</key> <string>(&quot;0)&quot;0</string> </dict> <dict> <key>Word5</key> <string>.method .annotation .sparse-switch .packed-switch</string> </dict> <dict> <key>word6</key> <string>.end\ method .end\ annotation .end\ sparse-switch .end\ packed-switch</string> </dict> <dict> <key>word7</key> <string>&quot; ( ) , ; { } &gt;</string> </dict> <key>uuid</key> <string>27798CC6-6B1D-11D9-B8FA-000D93589AF6</string> </dict> </plist>

    Read the article

  • Find out when all processes in (void) is done?

    - by Emil
    Hey. I need to know how you can find out when all processes (loaded) from a - (void) are done, if it's possible. Why? I'm loading in data for a UITableView, and I need to know when a Loading... view can be replaced with the UITableView, and when I can start creating the cells. This is my code: - (void) reloadData { NSAutoreleasePool *releasePool = [[NSAutoreleasePool alloc] init]; NSLog(@"Reloading data."); NSURL *urlPosts = [NSURL URLWithString:[NSString stringWithFormat:@"%@", URL]]; NSError *lookupError = nil; NSString *data = [[NSString alloc] initWithContentsOfURL:urlPosts encoding:NSUTF8StringEncoding error:&lookupError]; postsData = [data componentsSeparatedByString:@"~"]; [data release], data = nil; urlPosts = nil; self.numberOfPosts = [[postsData objectAtIndex:0] intValue]; self.postsArrayID = [[postsData objectAtIndex:1] componentsSeparatedByString:@"#"]; self.postsArrayDate = [[postsData objectAtIndex:2] componentsSeparatedByString:@"#"]; self.postsArrayTitle = [[postsData objectAtIndex:3] componentsSeparatedByString:@"#"]; self.postsArrayComments = [[postsData objectAtIndex:4] componentsSeparatedByString:@"#"]; self.postsArrayImgSrc = [[postsData objectAtIndex:5] componentsSeparatedByString:@"#"]; NSMutableArray *writeToPlist = [NSMutableArray array]; NSMutableArray *writeToNoImagePlist = [NSMutableArray array]; NSMutableArray *imagesStored = [NSMutableArray arrayWithContentsOfFile:[rootPath stringByAppendingPathComponent:@"imagesStored.plist"]]; int loop = 0; for (NSString *postID in postsArrayID) { if ([imagesStored containsObject:[NSString stringWithFormat:@"%@.png", postID]]){ NSLog(@"Allready stored, jump to next. ID: %@", postID); continue; } NSLog(@"%@.png", postID); NSData *imageData = [NSData dataWithContentsOfURL:[NSURL URLWithString:[postsArrayImgSrc objectAtIndex:loop]]]; // If image contains anything, set cellImage to image. If image is empty, try one more time or use noImage.png, set in IB if (imageData == nil){ NSLog(@"imageData is empty before trying .jpeg"); // If image == nil, try to replace .jpg with .jpeg, and if that worked, set cellImage to that image. If that is also nil, use noImage.png, set in IB. imageData = [NSData dataWithContentsOfURL:[NSURL URLWithString:[[postsArrayImgSrc objectAtIndex:loop] stringByReplacingOccurrencesOfString:@".jpg" withString:@".jpeg"]]]; } if (imageData != nil){ NSLog(@"imageData is NOT empty when creating file"); [fileManager createFileAtPath:[rootPath stringByAppendingPathComponent:[NSString stringWithFormat:@"images/%@.png", postID]] contents:imageData attributes:nil]; [writeToPlist addObject:[NSString stringWithFormat:@"%@.png", postID]]; } else { [writeToNoImagePlist addObject:[NSString stringWithFormat:@"%@", postID]]; } imageData = nil; loop++; NSLog(@"imagePlist: %@\nnoImagePlist: %@", writeToPlist, writeToNoImagePlist); } NSMutableArray *writeToAllPlist = [NSMutableArray arrayWithArray:writeToPlist]; [writeToPlist addObjectsFromArray:[NSArray arrayWithContentsOfFile:nowPlist]]; [writeToAllPlist addObjectsFromArray:[NSArray arrayWithContentsOfFile:[rootPath stringByAppendingPathComponent:@"imagesStored.plist"]]]; [writeToNoImagePlist addObjectsFromArray:[NSArray arrayWithContentsOfFile:[rootPath stringByAppendingPathComponent:@"noImage.plist"]]]; [writeToPlist writeToFile:nowPlist atomically:YES]; [writeToAllPlist writeToFile:[rootPath stringByAppendingPathComponent:@"imagesStored.plist"] atomically:YES]; [writeToNoImagePlist writeToFile:[rootPath stringByAppendingPathComponent:@"noImage.plist"] atomically:YES]; [releasePool release]; }

    Read the article

  • User directive in nginx generates error despite running as UID root

    - by Joost Schuur
    I'm running nginx on a MacOS X machine, installed with brew, and when I launch nginx, even with sudo, I get the following warning in my log file over and over again: 4/21/11 2:03:42 AM org.nginx[3788] nginx: [warn] the "user" directive makes sense only if the master process runs with super-user privileges, ignored in /usr/local/etc/nginx/conf/nginx.conf:2 From nginx.conf: user jschuur staff; I'm already launching nginx with sudo, since I want the thing to listen on port 80. Shouldn't that be enough to give it the proper super user privileges? The nginx binary as it's installed: jschuur@Glenna:sbin ? master ls -la total 4544 drwxr-xr-x 3 jschuur staff 102 Apr 12 20:53 . drwxrwxr-x 15 jschuur staff 510 Apr 12 15:25 .. -rwxr-xr-x 1 jschuur staff 2325648 Apr 12 20:39 nginx FWIW, I recompiled the binary to set passenger up and moved it around from it's original location into /usr/local/sbin. Update: As it turns out MacOS X was restarting nginx after I'd stopped it, because the launchd plist in ~/Library/LaunchAgents had set it to 'KeepAlive'. However, because I installed this plist into my local user's LaunchAgents folder as opposed to /Library/LaunchAgents (or better yet /Library/LaunchDaemons, which run before you even log on), it wasn't executed as root. Because of an error about not having permissions to use port 80, it actually exited right away, but still wrote to the same log file as the nginx process I started with sudo. I had thought the errors stemming from the automatic restart were actually coming from my manual restart via sudo. So, bottom line, problem solved. The real problem here was the homebrew instructions specifically asking you to install the plist file into an area that wouldn't allow a local site to use port 80.

    Read the article

  • What could cause this difference in behaviour from iphone OS3.0 to iOS4.0?

    - by frankodwyer
    I am getting a strange EXC_BAD_ACCESS error when running my app on iOS4. The app has been pretty solid on OS3.x for some time - not even seeing crash logs in this area of the code (or many at all) in the wild. I've tracked the error down to this code: main class: - (void) sendPost:(PostRequest*)request { NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; NSURLResponse* response; NSError* error; NSData *serverReply = [NSURLConnection sendSynchronousRequest:request.request returningResponse:&response error:&error]; ServerResponse* serverResponse=[[ServerResponse alloc] initWithResponse:response error:error data:serverReply]; [request.objectToNotifyWhenDone performSelectorOnMainThread:request.targetToNotifyWhenDone withObject:serverResponse waitUntilDone:YES]; [pool drain]; } (Note: sendPost is run on a separate thread for each invocation of it. PostRequest is just a class to encapsulate a request and a selector to notify when complete) ServerResponse.m: @synthesize response; @synthesize replyString; @synthesize error; @synthesize plist; - (ServerResponse*) initWithResponse:(NSURLResponse*)resp error:(NSError*)err data:(NSData*)serverReply { self.response=resp; self.error=err; self.plist=nil; self.replyString=nil; if (serverReply) { self.replyString = [[[NSString alloc] initWithBytes:[serverReply bytes] length:[serverReply length] encoding: NSASCIIStringEncoding] autorelease]; NSPropertyListFormat format; NSString *errorStr; plist = [NSPropertyListSerialization propertyListFromData:serverReply mutabilityOption:NSPropertyListImmutable format:&format errorDescription:&errorStr]; } return self; } ServerResponse.h: @property (nonatomic, retain) NSURLResponse* response; @property (nonatomic, retain) NSString* replyString; @property (nonatomic, retain) NSError* error; @property (nonatomic, retain) NSDictionary* plist; - (ServerResponse*) initWithResponse:(NSURLResponse*)response error:(NSError*)error data:(NSData*)serverReply; This reliably crashes with a bad access in the line: self.error=err; ...i.e. in the synthesized property setter! I'm stumped as to why this should be, given the code worked on the previous OS and hasn't changed since (even the binary compiled with the previous SDK crashes the same way, but not on OS3.0) - and given it is a simple property method. Any ideas? Could the NSError implementation have changed between releases or am I missing something obvious?

    Read the article

  • Objective-C memory leak in loading remote content

    - by Ican Zilb
    I try to load a plist file from my server. I can think of 2 ways to do that, but for both Instruments says there's huge memory leak : NSData* plistData = [NSData dataWithContentsOfURL:url]; and NSDictionary* updateDigest = [NSDictionary dictionaryWithContentsOfURL: [NSURL URLWithString:updateURL] ]; The backtrace of the memory leak leads to __CFURLCache in CFNetwork and I am wondering if something can be done to fix the leak? Any other way to load a remote plist xml, without the memory leakage ? Thanks

    Read the article

  • iphone: Adding UIRequiredDeviceCapabilitie

    - by pion
    I am reading the "Device Support - Setting Required Hardware Capabilities" on http://developer.apple.com/iphone/library/documentation/iPhone/Conceptual/iPhoneOSProgrammingGuide/AdvancedFeatures/AdvancedFeatures.html I want to add still-camera capability by doing the following: Open my Info.plist Click + Add UIRequiredDeviceCapabilities on the Key column Add still-camera on the Value column Save the updated Info.plist Is this the correct way? Thanks in advance for your help.

    Read the article

  • How to keep iPhone app out of iPad store?

    - by Eric
    I have an iPhone app that I have started to turn into a universal app, however the process is not complete and I want to release an update to the iPhone version. I know that you can specify device capabilities in the Info.plist file to restrict your app to certain devices, but how can I do this to prevent the unfinished universal version from appearing in the iPad store? Is checking the LSRequiresiPhoneOS BOOL entry (in the Info.plist file) enough? Thanks!

    Read the article

  • Can you append a NSMutableArray to a file?

    - by Emil
    Hi. I am trying to write some data from an NSMutableArray to a plist, while keep the old plists content. The function writeToFile:atomically: overwrites the old contents with the new, I want to append the objects in the new array to the plist. How can this be done? Thank you.

    Read the article

  • Cocoa : Once and for all, how to really reset the standardUserDefaults

    - by Korion
    I tried using -resetStandardUserDefaults, I tried removing the plist file, none of those really do what I need. I want to reset my preferences completely, as if the app re-installed. Is there a good solution to this? I tried : NSString *appDomain = [[NSBundle mainBundle] bundleIdentifier]; [[NSUserDefaults standardUserDefaults] removePersistentDomainForName:appDomain]; But Xcode complains. Apparently, it doesn't like that the plist file has disappeared.

    Read the article

  • How to install launch agent on Mac os x 10.5 / 10.6

    - by Unicorn
    I have developed a launchAgent in cocoa. It works fine for me on dev environment, by placing the plist file in location /Library/LaunchAgents/.To distribute and install this on other laptops, I created the package using package maker tool. As part of installation process I want to change permission of the plist file and copy it to /Library/LaunchAgents location. Could any one tell me how can i achieve this ? Thanks in advance for help....Any help will be appreciated ..!!!!

    Read the article

  • How to let the UITable sorted by number?

    - by Tattat
    I loaded a plist from the UITable, but there is something wrong. my plist file is some data like that: 3 3uyyhuhu34 ..... 5 5uyyhuhu34 ..... 11 11uyyhuhu34 ..... I found that the list is sorted from 11, then 3, after that is 5. But I want to sorted from 3, 5 to 11. What can I do to change the behaviors? thx

    Read the article

  • populate UITableView from json

    - by mcgrailm
    Hello all working on my building my first iDevice app and I am trying to populate a UITableView with data from json result I can get it to load from plist array no propblem and I can even see my json the problem I'm having is that the UITableView never gets to see the json results please bare with me as this is first time with obj-c or anything like it in my .h file @interface TableViewViewController : UIViewController <UITableViewDataSource, UITableViewDelegate> { NSArray *exercises; NSMutableData *responseData; } in my .m file - (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section { return exercises.count; } - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { //create a cell UITableViewCell *cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:@"cell"]; // fill it with contnets cell.textLabel.text = [exercises objectAtIndex:indexPath.row]; // return it return cell; } // Implement viewDidLoad to do additional setup after loading the view, typically from a nib. - (void)viewDidLoad { responseData = [[NSMutableData data] retain]; NSURLRequest *request = [NSURLRequest requestWithURL:[NSURL URLWithString:@"http://url_to_json"]]; [[NSURLConnection alloc] initWithRequest:request delegate:self ]; // load from plist //NSString *myfile = [[NSBundle mainBundle] pathForResource:@"exercise" ofType:@"plist"]; //exercises = [[NSArray alloc] initWithContentsOfFile:myfile]; [super viewDidLoad]; } - (void)connection:(NSURLConnection *)connection didReceiveResponse:(NSURLResponse *)response { [responseData setLength:0]; } - (void)connection:(NSURLConnection *)connection didReceiveData:(NSData *)data { [responseData appendData:data]; } - (void)connection:(NSURLConnection *)connection didFailWithError:(NSError *)error { NSLog(@"Connection failed: %@", [error description]); } - (void)connectionDidFinishLoading:(NSURLConnection *)connection { [connection release]; NSString *responseString = [[NSString alloc] initWithData:responseData encoding:NSUTF8StringEncoding]; [responseData release]; NSDictionary *dictionary = [responseString JSONValue]; NSArray *response = [dictionary objectForKey:@"response"]; exercises = [[NSArray alloc] initWithArray:response]; }

    Read the article

  • Loading data from a dictionary of dictionaries into an array in Objective C for an iphone app

    - by Kat
    I have a UINavigationController consisting of a tableview I want to load some data into. I have a dictionary plist containing Dictionaries for each Train Line which in turn have dictionaries for each station with the relevant information along with one string lineName. I need to collect the station Names keys and add them to an array to populate my table (This is working). The line names are stored as a string in my lines dictionary with the key being "lineName" Root->| | |->TrainLine1(Dictionary)->| | |-> lineName (String) | |-> Station1 (Dictionary) | |-> Station2 (Dictionary) | | |->TrainLine2(Dictionary)->| | |-> lineName (String) | |-> Station1 (Dictionary) | |-> Station2 (Dictionary) Am I going about this the wrong way? Should I reorganise my plist? The code below crashes the app. - (void)viewDidLoad { self.title = @"Train Lines"; NSString *path = [[NSBundle mainBundle] pathForResource:@"lineDetails" ofType:@"plist"]; NSDictionary *dictionary = [[NSDictionary alloc] initWithContentsOfFile:path]; NSMutableArray *array = [[NSMutableArray alloc] init]; NSMutableArray *lineNameArray = [[NSMutableArray alloc] init]; NSString *key; for (key in dictionary) { NSMutableDictionary *secondDictionary = [NSDictionary dictionaryWithDictionary:[dictionary valueForKey:key]]; [lineNameArray addObject:key]; NSLog(@"Adding this in array:%@", key); [array addObject:[secondDictionary objectForKey:kLineNameKey]]; } self.trainLines = array; self.trainLineKeys = lineNameArray; NSLog(@"Array contents:%@", self.trainLineKeys); [lineNameArray release]; [array release]; [dictionary release]; [super viewDidLoad]; }

    Read the article

< Previous Page | 6 7 8 9 10 11 12 13 14 15 16 17  | Next Page >