Search Results

Search found 6 results on 1 pages for 'yakattak'.

Page 1/1 | 1 

  • cat on Mac OS X never exits

    - by Yakattak
    I'm a bit of a UNIX noob, but I'm trying to run the cat command to make a simple text file and it works great, however cat is never exited after making the file. For instance, I type cat ~/mytextfile.txt and hit enter, the file is created but my cursor remains on a blank line.

    Read the article

  • Push/Present Modal View Controller

    - by Yakattak
    I have a table in my view controller (let's call it TVC1). I have rows in TVC1 that are used so the user can input some more data in addition to the data on TVC1. So, when someone taps a specific row in TVC1, it will show another view controller (let's call it TVC2). However, when TVC2 is shown, all of the data in TVC1 is cleared. How can I save the data in TVC1? Should I do it through the app delegate? DescriptionInputViewController *descriptionController = [[DescriptionInputViewController alloc] initWithNibName:@"DescriptionInputView" bundle:nil]; [self presentModalViewController:navController animated:YES]; [self.navigationController pushViewController:descriptionController animated:YES]; [descriptionController release];

    Read the article

  • Memory leak when returning object

    - by Yakattak
    I have this memory leak that has been very stubborn for the past week or so. I have a class method I use in a class called "ArchiveManager" that will unarchive a specific .dat file for me, and return an array with it's contents. Here is the method: +(NSMutableArray *)unarchiveCustomObject { NSMutableArray *array = [NSMutableArray arrayWithArray:[NSKeyedUnarchiver unarchiveObjectWithFile:/* Archive Path */]]; return array; } I understand I don't have ownership of it at this point, and I return it. CustomObject *myObject = [[ArchiveManager unarchiveCustomObject] objectAtIndex:0]; Then, later when I unarchive it in a view controller to be used (I don't even create an array of it, nor do I make a pointer to it, I just reference it to get something out of the array returned by unarchiveCustomIbject (objectAtIndex). This is where Instruments is calling a memory leak, yet I don't see how this can leak! Any ideas? Thanks in advance. Edit: CustomObject initWithCoder added: -(id)initWithCoder:(NSCoder *)aDecoder { if (self = [super init]) { self.string1 = [aDecoder decodeObjectForKey:kString1]; self.string2 = [aDecoder decodeObjectForKey:kString2]; self.string3 = [aDecoder decodeObjectForKey:kString3]; UIImage *picture = [[UIImage alloc] initWithData:[aDecoder decodeObjectForKey:kPicture]]; self.picture = picture; self.array = [aDecoder decodeObjectForKey:kArray]; [picture release]; } return self; }

    Read the article

  • Extracting a .app from a zip file in Python, using ZipFile

    - by Yakattak
    I'm trying to extract new revisions of Chromium.app from their snapshots, and I can download the file fine, but when it comes to extracting it, ZipFile either extracts the chrome-mac folder within as a file, says that directories don't exist, etc. I am very new to python, so these errors make little sense to me. Here is what I have so far. import urllib2 response = urllib2.urlopen('http://build.chromium.org/buildbot/snapshots/chromium-rel-mac/LATEST') latestRev = response.read() print latestRev # we have the revision, now we need to download the zip and extract it latestZip = urllib2.urlopen('http://build.chromium.org/buildbot/snapshots/chromium-rel-mac/%i/chrome-mac.zip' % (int(latestRev)), '~/Desktop/ChromiumUpdate/%i-update' % (int(latestRev))) #declare some vars that hold paths n shit workingDir = '/Users/slehan/Desktop/ChromiumUpdate/' chromiumZipPath = '%s%i-update.zip' % (workingDir, (int(latestRev))) chromiumAppPath = 'chrome-mac/' #the path of the chromium executable within the zip file chromiumAppExtracted = '%s/Chromium.app' % (workingDir) # path of the extracted executable output = open(chromiumZipPath, 'w') #delete any current file there output.write(latestZip.read()) output.close() # we have the .zip now we need to extract the Chromium.app file, it's in ziproot/chrome-mac/Chromium.app import zipfile, os zippedFile = open(chromiumZipPath) zippedChromium = zipfile.ZipFile(zippedFile, 'r') zippedChromium.extract(chromiumAppPath, workingDir) #print zippedChromium.namelist() zippedChromium.close() #zippedChromium.close() Any ideas?

    Read the article

1