Re: Populating TableView with Web Services in Cocoa

2010-03-14 Thread Scott Anguish
On Mar 13, 2010, at 3:43 AM, Nick Rawlins wrote: > Hi, > > I would like to populate a TableView with data from a web service. > > I would also like to send requests back and fourth depening on what > the user does on an iPhone. > > > Does anyone have an example or info on a simular applicatio

Re: Cocoa-dev Digest, Vol 7, Issue 307

2010-03-14 Thread Alexander Bokovikov
On Sat, 13 Mar 2010 at 20:23:40 -0800 Quincey Morris wrote: You might want to choose a different run loop mode, if you have special requirements. NSEventTrackingRunLoopMode is sufficient to allow keystrokes and mouse clicks to be processed, so that you can have a UI (say, Esc key or button

Cacheing optimisation in valueForKey:

2010-03-14 Thread Tom
Hi everyone, I'm having a problem with the interaction of method swizzling and KVC in some experimental stuff that I'm working on: http://github.com/tomdalling/AspectObjectiveC Let's say there is a method like -(double)fahrenheit;. When I change the implementation of the method with method_set

Re: NSTimer never being deallocated

2010-03-14 Thread Jeremy Pereira
On 13 Mar 2010, at 23:56, Tobias Jordan wrote: > Hi Paul, > > You said 'an object you don't manage' -- If I alloc/init an instance of > NSTimer I am responsible for this object, in my opinion. Until you release it. After that, you are not responsible for it. That doesn't mean that something

Re: #include CommonStrings.txt - 'no such file' error

2010-03-14 Thread Alexander Spohr
.txt looks wrong. Why not create .h and .m and import the .h? Usually you #import, not #include in ObjC. .h extern NSString *gLeftBracket; .m NSString *gLeftBracket =@"<"; atze Am 14.03.2010 um 06:47 schrieb Steve Cronin: > Folks; > > I have a dozen or so strings that I use

[SOLVED] Re: death in dealloc

2010-03-14 Thread Stuart Malin
Spot on, Steven. My memory management was faulty. My object had been instantiating another object via alloc that it kept a reference to in an iVar, and my (outer) object released that instantiated (inner) object in its -dealloc method. I refactored the code, and changed the way I acquire the (in

Deleted Ressource folder

2010-03-14 Thread Marx Bievor
Hi, I accidentally "deleted" the Resource folder from the "Groups & Files" list.. I cannot find the xib file anymore.. it must still be there, of course, but how do I get that folder back with its content.. I'm thanks in advance for helping me out. -M

Re: Best approach for a bunch of new UI controls

2010-03-14 Thread Andreas Mayer
Am 14.03.2010 um 04:14 Uhr schrieb Igor Mozolevsky: I've got a few *nix libs to flesh out with some Cocoa UI goodness and would welcome suggestions for a good way to do a bunch of controls: Instead of describing the proposed look of your controls, you should tell us what their *purpose* is

Re: death in dealloc

2010-03-14 Thread Matt Neuburg
On Sat, 13 Mar 2010 16:46:28 -0500, Steven Degutis said: >This is almost always caused by releasing an object earlier than you >expected to, and then trying to release it again later (similar to "double >free"). Look around in your class's code Wouldn't this be clearly called out by use of NSZomb

Re: Deleted Ressource folder

2010-03-14 Thread Scott Andrew
If you selected the "Also Move To Trash" option check the trash can, if it hasn't been emptied.. This is where source control comes in handy. Even if its using git to keep source control local in the project folder. Scott On Mar 14, 2010, at 6:57 AM, Marx Bievor wrote: > Hi, > I accidentally

Re: Problem with "save as" and freed managed object context

2010-03-14 Thread Gideon King
I think I've narrowed it down a bit - it is now to the stage where the crash is at: #0 0x7fff80ddf788 in CFRetain () #1 0x7fff874ed6ad in +[NSTemporaryObjectID classForStore:] () #2 0x7fff874ed352 in _PFFastStoreTemporaryIDClass () #3 0x7fff874ed2f8 in -[NSTemporaryObjectID _s

Re: #include CommonStrings.txt - 'no such file' error

2010-03-14 Thread Fritz Anderson
On 14 Mar 2010, at 6:45 AM, Alexander Spohr wrote: > extern NSString *gLeftBracket; Quite right. Would not extern NSString * const gLeftBracket; address the OP's hope that the global should not be casually changed? — F ___ Cocoa-dev mailing

Re: #include CommonStrings.txt - 'no such file' error

2010-03-14 Thread Steve Cronin
Folks; To Alexander: On the suggestion of using .m and .h files: If I use a single #include somewhere as shown below then I can within any method use extern NSString *gLeftBracket this allows other programmers to see immediately that it is defined elsewhere and I need not burden the entire

mount dmg disk

2010-03-14 Thread gMail.com
Hi, 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 succeed on the Terminal when executing this command line: echo -n password | hdiutil mount /Users/john/Documents/MyDmgDisk.dmg But when I pass this command line to the NSTask, I fail all the

Re: #include CommonStrings.txt - 'no such file' error

2010-03-14 Thread Fritz Anderson
On 14 Mar 2010, at 1:49 PM, Steve Cronin wrote: > To Alexander: On the suggestion of using .m and .h files: > > If I use a single #include somewhere as shown below then I can within any > method use > > extern NSString *gLeftBracket > > this allows other programmers to see immediately that i

Re: mount dmg disk

2010-03-14 Thread Gwynne Raskind
On Mar 14, 2010, at 3:22 PM, gMail.com wrote: > Hi, > 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 succeed on the Terminal when executing this command line: > > echo -n password | hdiutil mount /Users/john/Documents/MyDmgDisk.dmg > > Bu

Re: Better sorting using threads?

2010-03-14 Thread Jeffrey Oleander
> On Fri, 2010/03/12, Andrew James wrote: > From: Andrew James > Subject: Re: Better sorting using threads? > To: "Gwynne Raskind" , "Ken Ferry" > > Cc: "Cocoa-Dev List" > Date: Friday, 2010 March 12, 13:55 > My concern is that keeping traditional C-arrays > in sorted order means > > 1) findin

Re: [NSTableview] can't make selected text stay black

2010-03-14 Thread Kent Hauser
Now I'm all confused. Everything's working now where it wasn't before. I'm having the desired result (selected cell not appearing selected) by following Corbin's original advice: override NSTable's -hightlightSelectionInClipRect: to do nothing & having the delegate method - tableView:willDisplayC

NSManagedObject awakeFromFetch not sent on secondary thread?

2010-03-14 Thread Tom
Hey My custom NSManagedObject subclass uses awakeFromInsert and awakeFromFetch to setup custom object to ivar. This works as expected, but when I fetch the same object on secondary thread (in NSOperation), the ivar remains nil as awakeFromFetch is not sent... Is NSManagedObject's awakeFromFetch s

Re: mount dmg disk

2010-03-14 Thread gMail.com
Thank you so much Gwynne! I had to modify just one thing, then it worked: since we invoke directly hdiutil, I removed "hdiutil" from the args, so now it looks like: *args = [NSArray arrayWithObjects:@"mount", @"-stdinpass", dmgPath, nil]; The rest was ok. Thanks again. Regards -- Leonardo > Da

Re: NSTimer never being deallocated

2010-03-14 Thread Steve Christensen
On Mar 13, 2010, at 10:57 AM, Tobias Jordan wrote: What made me think it is a bug was actually only the fact that instruments told me the object is always still alive and the 'missing' note in the documentations that tell me I don't need to release it because of some caching techniques. W

Re: NSTimer never being deallocated

2010-03-14 Thread Tobias Jordan
If these cachings don't result in a huge memory leak (which they obviously don't do) I am fine with it. :-) On Mar 14, 2010, at 10:09 PM, Steve Christensen wrote: On Mar 13, 2010, at 10:57 AM, Tobias Jordan wrote: What made me think it is a bug was actually only the fact that instruments t

Re: Problem with "save as" and freed managed object context

2010-03-14 Thread Ben Trumbull
That particular function is trying to CFRetain the result of -identifier on your store. If you've overridden it, make sure it never returns nil and it always returns the same UUID at least until someone calls -setIdentifier. The UUID should also be set in the store's metadata with the key NSSto

Re: [NSTableview] can't make selected text stay black

2010-03-14 Thread Keith Blount
Hi Kent, You're absolutely right! Thanks for sharing this. For myself, I have tables and outline views that draw a custom highlight and need the text colour to stay black, but your solution works for that too. The key, as you say, is calling -setHighlighted: to NO on the cell in the delegate me

Re: mount dmg disk

2010-03-14 Thread Kyle Sluder
On Sun, Mar 14, 2010 at 1:41 PM, gMail.com wrote: > I had to modify just one thing, then it worked: since we invoke directly > hdiutil, I removed "hdiutil" from the args, so now it looks like: This is incorrect. Unix convention requires the program name be the first argument. Remember, NSTask is

Re: Cacheing optimisation in valueForKey:

2010-03-14 Thread Kyle Sluder
On Sun, Mar 14, 2010 at 3:23 AM, Tom wrote: > Is there any way around this? Are the any undocumented methods I could call > to invalidate the cache used by valueForKey:? Is there a way to disable the > cacheing? Nasty hack solutions are welcome, as the code is experimental > anyway. You could

Re: Cacheing optimisation in valueForKey:

2010-03-14 Thread Tom
> On Sun, Mar 14, 2010 at 3:23 AM, Tom wrote: >> Is there any way around this? Are the any undocumented methods I could call >> to invalidate the cache used by valueForKey:? Is there a way to disable the >> cacheing? Nasty hack solutions are welcome, as the code is experimental >> anyway. > >

How to properly handle Undo and triggered actions

2010-03-14 Thread Jim Thomason
I have a coredata document based application, and lately I've been working on improving undo support. It usually works pretty well, but there have been some isolated issues that were problematic. After a lot of investigating over the past few days, I've finally isolated something and I think I kno

Checking integrity of a Core Data document with SQLite store

2010-03-14 Thread Dave Fernandes
I recently had a user show me a corrupted document (NSPersistentDocument with SQLite store). The document would open, but then cause problems later on. The initial 10% of the file looks fine, but the remainder is all 0's. I think the corruption occurred while doing a Finder copy from one disk im

crash in Coca Touch when adding two objects to an empty core-data store with a UITableView using sections

2010-03-14 Thread Jean-Denis Muys
This is a Cocoa Touch question. Is this list also for Cocoa Touch? I can't manage to solve a crash that occurs with a very limited modification to a project as generated by XCode. When adding two (or more) objects to an empty store rather than one, when using sections, Cocoa Touch crashes wit

I am Getting 2 Preferences Files

2010-03-14 Thread Peter Zegelin
I have just noticed that after recently upgrading to Snow Leopard the application I am working on is generating a second preference file. This prefs file is called com.xxx.myApp.LSSharedFileList.pList and gets generated when I open a new file. It is apparently used to populate the Open Recent m

Re: Checking integrity of a Core Data document with SQLite store

2010-03-14 Thread mmalc Crawford
On Mar 14, 2010, at 7:21 pm, Dave Fernandes wrote: > So my question is - how do you detect this before loading the file? I'm aware > of the sqlite3 PRAGMA integrity_check, but there does not seem to be a C API > for this. Any pointers? >

Re: Problem with "save as" and freed managed object context

2010-03-14 Thread Gideon King
Thanks Ben One of the other things I had been working on must have fixed the underlying problem, and my implementation of identifier and setIdentifier were actually causing this issue. I completely removed those two methods (which is of course going directly against the documentation at the top

Re: mount dmg disk

2010-03-14 Thread Michael Ash
On Sun, Mar 14, 2010 at 8:42 PM, Kyle Sluder wrote: > On Sun, Mar 14, 2010 at 1:41 PM, gMail.com wrote: >> I had to modify just one thing, then it worked: since we invoke directly >> hdiutil, I removed "hdiutil" from the args, so now it looks like: > > This is incorrect. Unix convention requires

Re: mount dmg disk

2010-03-14 Thread Kyle Sluder
On Sun, Mar 14, 2010 at 9:50 PM, Michael Ash wrote: > NSTask is also not like calling the exec family of functions. NSTask > implicitly passes the target path as the first argument, and puts your > arguments starting with argv[1]. Durr. I should have confirmed with the documentation. Sorry for n