Re: SKIndexAddDocument crashing

2013-11-14 Thread Aaron Burghardt
On Nov 8, 2013, at 9:27 AM, Mark Wright blue.bucon...@virgin.net wrote: It doesn’t crash if you replace the crashing line with: SKIndexAddDocumentWithText(searchIndexFile, doc, NULL, false); For the record, this doesn't crash but it doesn't index the content, either. it is up to the

Re: addsubview

2012-04-24 Thread Aaron Burghardt
On Apr 20, 2012, at 10:49 AM, koko k...@highrolls.net wrote: Ah, ain't Cocoa a great, modern (85?) environment. Ah yes, snarky potshots are time-proven way to get help from a forum. May I suggest you consider an alternative approach: http://www.catb.org/~esr/faqs/smart-questions.html.

Re: How to store main window frame to user defaults?

2011-04-28 Thread Aaron Burghardt
Use NSStringFromRect() and NSRectFromString() to convert to/from a string to store in the defaults. However, it might be easier to set frameAutosaveName and let the window save and restore the frame itself. Just enter the key in the autosave attribute in Interface Builder and it should work.

Re: How to store main window frame to user defaults?

2011-04-28 Thread Aaron Burghardt
On Apr 28, 2011, at 7:42 AM, Vyacheslav Karamov wrote: It works! Thank you! P.S. But I still can't understand why frame saving code doesn't work from [NSWindow close] 28-Apr-11 14:35, Matt Gough пишет: How about calling just calling [NSWindow setFrameAutosaveName:@YourAutosaveName]

Re: Debugging a sleepless Mac

2011-03-16 Thread Aaron Burghardt
On Mar 16, 2011, at 8:37 AM, Matt Gough wrote: So it seems that something else is preventing idle sleep, but I've no idea how to find the culprit. Is there some defaults setting I can use that will log what the OS wants to do at sleep time and what is blocking it? Leaving a Terminal

Re: Debugging a sleepless Mac

2011-03-16 Thread Aaron Burghardt
On Mar 16, 2011, at 2:50 PM, Laurent Daudelin wrote: Just calling UpdateSystemActivity() once every minute is enough to prevent sleeping. no need to keep the system busy nor to install PMNotification visible in pmset. And checking if a running process call this function from time to time

Re: data over USB to iPhone

2011-01-16 Thread Aaron Burghardt
Libimobiledevice is an open source project to replicate most of iTunes' functionality for managing devices. It has a lot of dependencies on other open source projects, though, so it takes some patience to build it: http://www.libimobiledevice.org/ usbmuxd is a small intermediary that

Re: execute system(some script) on behalf of root from non-root app

2011-01-06 Thread Aaron Burghardt
On Jan 6, 2011, at 11:01 AM, eveningnick eveningnick wrote: Executing arbitrary scripts as root is also a potentially major security hole. Your goal should be to do as little as possible as root (or other elevated privileges), and with as little flexibility as possible. Security is

Re: Foundation vs Core Foundation

2010-11-29 Thread Aaron Burghardt
On Nov 29, 2010, at 4:18 PM, Jon Sigman wrote: It sounds like Foundation is the safer way to go, especially to safeguard future functionality expansion. I take it Foundation does not contain Core Foundation, but at least they're not mutually exclusive? Check out AsyncSocket as an

Re: How to encrypt a String to a SHA-1 Encrypted in iPhone

2010-11-28 Thread Aaron Burghardt
Hi, Your implementation should work, but I have a few suggestions for you. * Unless you need HMAC specifically, the function you are using is in CommonCrypto/CommonDigest.h. * In general, I think Apple discourages relying on the output of the description, although I see that the documentation

Re: Search Kit memory management

2010-08-01 Thread Aaron Burghardt
On Aug 1, 2010, at 2:43 AM, Michael Thon wrote: On Jul 31, 2010, at 12:15 PM, Ken Thomases wrote: On Jul 31, 2010, at 2:24 AM, Michael Thon wrote: I am indexing a large set of files using Search Kit. I find that memory usage (reported by Activity Monitor) keeps growing in my app, as

Re: ObjC question

2010-04-11 Thread Aaron Burghardt
On Apr 10, 2010, at 9:11 PM, Seth Willits wrote: On Apr 10, 2010, at 5:11 PM, Tony Romano wrote: When you create the file system event, you can pass a void * via the structure which is accessible in the event callback. In this pointer, I want to pass my Volume object so I know which

Re: Case sensitive fileName

2010-03-17 Thread Aaron Burghardt
Jens gets the prize: $ cat realpath_test.c #include stdio.h #include sys/param.h #include stdlib.h int main(int argc, char *argv[]) { char resolved_name[PATH_MAX]; realpath(argv[1], resolved_name); printf(%s\n, resolved_name); } $ gcc realpath_test.c -o realpath_test

Re: Case sensitive fileName

2010-03-17 Thread Aaron Burghardt
On Mar 17, 2010, at 3:24 PM, gMail.com wrote: Thank you! I have used realpath, and it worked as like a charm! Here's my code. One question only: is the NSUTF8StringEncoding correct? - (NSString*)CaseSensitiveFilePath:(NSString*)filePath { const char*cFilePath = [mManager

Re: Use of KVC Array operators

2010-03-16 Thread Aaron Burghardt
On Mar 12, 2010, at 6:13 PM, Eli Bach wrote: It's not a problem. In retrospect, doing this would mean that KVO would need to automagically observe two 'levels' for changes, which seems to me to be unlikely for KVO to do. I've decided to short-circuit the problem by adding a direct

Re: mount dmg disk

2010-03-16 Thread Aaron Burghardt
On Mar 14, 2010, at 3:42 PM, Don Quixote de la Mancha wrote: On Sun, Mar 14, 2010 at 12:22 PM, gMail.com mac.iphone@gmail.com wrote: I can't find a way in Cocoa to mount a dmg disk. So I would try to call the shell through a NSTask. I think you really want to do that via the APIs in the

Re: Cocoa Document-Based App v. Windows MDI App

2009-07-27 Thread Aaron Burghardt
On Jul 27, 2009, at 12:50 AM, David Blanton wrote: I think I'll use: The Mac frameworks just don't support that approach. Sorry. I could re-implement MDI on the Mac, but it would be about a man-year's work. Do you want me to do that? To add to that argument, you might list some of the

Re: Display csv in a tableView with bindings

2009-07-26 Thread Aaron Burghardt
On Jul 24, 2009, at 8:11 PM, gumbo...@mac.com wrote: I need some direction please. I would like to load a csv file and display the contents in an NSTableView. What is the best way to achieve this with bindings? Should the model store the data in an array of arrays (rows and columns) or

Re: Display csv in a tableView with bindings

2009-07-26 Thread Aaron Burghardt
On Jul 26, 2009, at 5:38 PM, I. Savant wrote: On Jul 26, 2009, at 3:52 PM, Aaron Burghardt wrote: Not necessarily. If the keys are NSStrings, then they are copied when added to the dictionary, but a copy of an immutable string is optimized to just retain it, so the data isn't duplicated

Re: NSDictionary crash

2009-07-26 Thread Aaron Burghardt
On Jul 26, 2009, at 6:50 PM, slasktrattena...@gmail.com wrote: On Sun, Jul 26, 2009 at 8:04 PM, Aaron Burghardtaaron.burgha...@gmail.com wrote: Interesting and not surprising. What I was suggesting, though, is that the amount of time needed to read the data is probably small compared to

Re: NSDictionary crash

2009-07-25 Thread Aaron Burghardt
Why use Core Foundation? How about (written in Mail): - (NSDictionary *)dictionaryFromPropertyListFile:(NSString *)path error:(NSError **)outError { NSData *data = [NSData dataWithContentsOfFile:path options:NULL error:outError]; if (!data) return nil; NSString

Re: NSScrollView: special handling of subview's headerView?

2009-06-24 Thread Aaron Burghardt
On Jun 24, 2009, at 12:28 AM, Quincey Morris wrote: Also see: http://codehackers.net/blog/?p=10 Ah, yes, that is precisely the same issue. The behavior is partially described here:

NSScrollView: special handling of subview's headerView?

2009-06-23 Thread Aaron Burghardt
, Jeff Johnson wrote: Hi Aaron. Could you create a full sample app? On Jun 22, 2009, at 1:35 PM, Aaron Burghardt wrote: This is a slightly simplified version, but it shows the general approach. The goal was to have HTML content that matched the width of MyView, so the WebViews

Re: How to tell whether an executable supports GC?

2008-08-08 Thread Aaron Burghardt
Do you control the plug-in specification and are the plug-ins a standard bundle with an Info.plist? If so, why not specify that a GC plug-in must have a boolean key that indicates that GC is supported. If the value is false or non-existent, then you can assume it doesn't support GC.

Fwd: mdbackup binary plist files

2008-07-19 Thread Aaron Burghardt
From: Aaron Burghardt [EMAIL PROTECTED] Date: July 19, 2008 4:13:44 PM EDT To: Ryan Chapman [EMAIL PROTECTED] Cc: cocoa-dev@lists.apple.com Subject: Re: mdbackup binary plist files On Jul 16, 2008, at 11:15 PM, Ryan Chapman wrote: NSLog(@%s, plist); You were so close :-) The plist

Re: Outline View not retaining objects it uses. Why?

2008-07-19 Thread Aaron Burghardt
On Jul 19, 2008, at 8:56 PM, Paul Sargent wrote: On 19 Jul 2008, at 22:49, Andy Lee wrote: On Jul 19, 2008, at 5:35 PM, Paul Sargent wrote: This works fine the first time the view is populated, but when it's refreshed it just calls the second method with the pointers to the dictionaries

Re: Calculating file size

2008-05-01 Thread Aaron Burghardt
Yes, nice catch. Thanks, Aaron On Apr 29, 2008, at 7:56 AM, Jean-Daniel Dupas wrote: Shouldn't be !isDirectory ? if (isDirectory) { FileInfo *fileInfo = (FileInfo *) info.finderInfo; fileHFSType = [NSNumber numberWithUnsignedLong:fileInfo-fileType];

Re: Calculating file size

2008-04-28 Thread Aaron Burghardt
On Apr 28, 2008, at 5:27 AM, Gerriet M. Denkmann wrote: This is documented in the Mac OS X system documentation. Where exactly? I have found a mention of namedfork in man RezWack and some #defines in /usr/include/sys/paths.h - but no other documentation. Kind regards, Gerriet. When I