Re: How to debug over-release of private Cocoa object?

2009-09-16 Thread Graham Cox
On 16/09/2009, at 3:38 PM, Kyle Sluder wrote: Oh, you just made the text system *very* mad. Somewhere in the soca it says you must use -[NSTextStorage setTexrStorage:] to do what you want. You don't want to know the morass of code we have in OmniOutliner to support moving the text system a

Re: Interface Builder .xib deployment/development targets

2009-09-16 Thread Steve Cronin
Folks; Got another report today from the field also a MacBookPro5,1 running 10.5.8 2009-09-16 03:01:53.954 XYZ[329:20b] Error loading /Library/ ScriptingAdditions/QXPScriptingAdditions.osax/Contents/MacOS/ QXPScriptingAdditions: dlopen(/Library/ScriptingAdditions/ QXPScriptingAdditions.osax/

[JOB] Established iPhone app developer seeks Cocoa Network Engineer

2009-09-16 Thread Dave Howell
Avatron is hiring! We’re looking for brilliant software engineers who can help us to build upon our frameworks to make us the leading developer of useful apps for the iPhone and iPod touch. NETWORK SOFTWARE ENGINEER: Combine your comfort around such networking technologies as HTTP, FTP, S

getline 'free' problem

2009-09-16 Thread Aron Nopanen
Hi All, Not a Cocoa problem as such, but not sure if there's a better list for it: On Snow Leopard (using gcc 4.2), I'm getting a 'double free' error in the guts of the C++ std::getline. The 'free' in question is being performed by std::string::reserve. This happens any time I run 'getl

Last Apple Help question (hopefully)

2009-09-16 Thread Andy Bettis
My fellow bohemians, My Help Book is now working fine - so much so that I've decided to add little help buttons on parts of the UI. All is well except that my call to AHGotoPage() can't find the function. What do I need to include? I know it's in AppleHelp.h but what's the format of the #

Re: Last Apple Help question (hopefully)

2009-09-16 Thread Graham Cox
Hi Andy, You could use NSHelpManager instead, which is more cocoa-y. I handle my help buttons with this, which uses the help button's title to store the help item anchor (help buttons don't have visible titles) - (IBAction)showHelpItemWithTitleOfSender:(id) sender { NSString* bo

Re: How to debug over-release of private Cocoa object?

2009-09-16 Thread davelist
On Sep 15, 2009, at 11:17 PM, Graham Cox wrote: (Incidentally, I see in Snow Leopard that all such crashes get sent to Apple - there is no 'Cancel' button any more on the crash reports. Hope they are finding this entertaining - especially as it's increasingly looking like their bug ;-)

Re: Filtering a table view using NSSearchField

2009-09-16 Thread PCWiz
I found a very simple way to do this. Just bind the NSSearchFields "predicate" binding to the Array Controllers filterPredicate key. Then change the Predicate Format to "myKeyPath contains[c] $value" where myKeyPath is the key path in the array controller that you want to filter from. This

NSNotificationQueue : NSPostingStyle : Definitions for Dummies

2009-09-16 Thread Jerry Krinock
From NSNotificationQueue Documentation: NSPostASAP The notification is posted at the end of the current notification callout or timer. NSPostWhenIdle The notification is posted when the run loop is idle. NSPostNow The notification is posted immediately after coalescing. Since a run

Re: Last Apple Help question (hopefully)

2009-09-16 Thread Jerry Krinock
On 2009 Sep 16, at 04:59, Graham Cox wrote: You could use NSHelpManager instead, which is more cocoa-y. What Graham says is true and is what you should be doing. If you really want to use AHGotoPage() you must #include and also link to that framework. A couple more things. 1. After

Upgrading NSDocument format, best practice

2009-09-16 Thread Markus Spoettl
Hello, I have an NSDocument that reads old-format files which it does no longer write. When loading such an old format file, the app warns the user about the format-change and the fact the file can't be read by older versions once saved with the new one. Unfortunately, producing files

Re: Upgrading NSDocument format, best practice

2009-09-16 Thread I. Savant
On Sep 16, 2009, at 9:52 AM, Markus Spoettl wrote: I have an NSDocument that reads old-format files which it does no longer write. When loading such an old format file, the app warns the user about the format-change and the fact the file can't be read by older versions once saved with the

Re: Upgrading NSDocument format, best practice

2009-09-16 Thread I. Savant
On Sep 16, 2009, at 10:15 AM, I. Savant wrote: In my opinion, you're on the right track. I think the simplest solution is to create a new file extension. Forget renaming the file - a different extension implies a different format. Doing this gives you all the mechanisms and warnings for fr

Re: Upgrading NSDocument format, best practice

2009-09-16 Thread Markus Spoettl
On Sep 16, 2009, at 4:21 PM, I. Savant wrote: In my opinion, you're on the right track. I think the simplest solution is to create a new file extension. Forget renaming the file - a different extension implies a different format. Doing this gives you all the mechanisms and warnings for free:

Re: Last Apple Help question (hopefully)

2009-09-16 Thread Andy Bettis
Dear Graham, Thanks for the tip - nice to be back in Cocoa land. There's still a couple of problems: The title does show up on the help button - well, just the central letters as it's clipped by the button size. I'm not sure what to use for the anchor parameter. I want to open a page ca

Re: Upgrading NSDocument format, best practice

2009-09-16 Thread I. Savant
On Sep 16, 2009, at 10:28 AM, Markus Spoettl wrote: Better, yes, though I haven't had many problems understanding the first version either. You mustn't be too hard on yourself. Hard on myself? Nah. I was laughing at myself. :-) It was particularly funny when an angry person who shall go

Re: Upgrading NSDocument format, best practice

2009-09-16 Thread Markus Spoettl
On Sep 16, 2009, at 4:15 PM, I. Savant wrote: To do so I set -fileURL to NIL and tell the document it has been loaded from a different file using -updateChangeCount: Um ... yuck. :-} It reminds me of all the SciFi shows where the hero jams something into the electronic lock mechanism (or s

Re: getline 'free' problem

2009-09-16 Thread Jason Foreman
On Sep 16, 2009, at 5:41 AM, Aron Nopanen wrote: Hi All, Not a Cocoa problem as such, but not sure if there's a better list for it: For this question, Xcode-users is probably a better list. On Snow Leopard (using gcc 4.2), I'm getting a 'double free' error in the guts of the C++ std::g

Re: Upgrading NSDocument format, best practice

2009-09-16 Thread Graham Cox
On 17/09/2009, at 12:36 AM, Markus Spoettl wrote: I don't really know if its save to do what I do. I do a similar thing when I open a new untitled document but which is in reality a template file. I simply open the template file as normal then knock its URL on the head: NSDocument* ne

Re: Upgrading NSDocument format, best practice

2009-09-16 Thread I. Savant
On Sep 16, 2009, at 10:48 AM, Graham Cox wrote: So far I haven't experienced any problems and it prompts for save just like any untitled document would. Hmmm ... it just seems wrong to me, though. :-) Perhaps it's not a "short-circuiting" in the sense I so dramatically described, but a

Re: Upgrading NSDocument format, best practice

2009-09-16 Thread Graham Cox
On 17/09/2009, at 12:52 AM, I. Savant wrote: On Sep 16, 2009, at 10:48 AM, Graham Cox wrote: So far I haven't experienced any problems and it prompts for save just like any untitled document would. Hmmm ... it just seems wrong to me, though. :-) Perhaps it's not a "short-circuiting" in

Retrieving the selected object in an NSOutlineView.

2009-09-16 Thread Joshua Garnham
I am looking to retrieve the selected object in an NSOutlineView so I can see if the selected object has any children. How would I do this? I know the NSTreeController has selectedObject but how would I implement this and then check if it has children. Cheers! __

Debug-level messages don't appear in Console even after asl_set_filter()

2009-09-16 Thread Sidney San Martín
Messages that I log below ASL_LEVEL_NOTICE aren't showing up in Console at all. Here's my test case: aslclient client = asl_open(NULL, NULL, ASL_OPT_STDERR); asl_set_filter(client, ASL_FILTER_MASK_UPTO(ASL_LEVEL_DEBUG)); asl_log(client, NULL, ASL_LEVEL_WARNING, "This shows up in Console..."); as

Binding a model's ivar array to the contents of an NSArrayController

2009-09-16 Thread A B
I have an NSView that is keeping track of a group of objects via an NSMutableArray ivar (let's call it relatedObjects). Objects in this array are represented in the view by subviews (i.e. when I add an object to the array, a new subview appears, when I delete them, the associated subview is rem

Re: Binding a model's ivar array to the contents of an NSArrayController

2009-09-16 Thread I. Savant
On Sep 16, 2009, at 11:29 AM, A B wrote: So in short, my need is pretty simple: Bind an array to an NSArrayController. That being said, it seems that no combination of exposeBindings:, bind:toObject:withKeypath:options:, observeValueForKey:ofObject:change:context:, etc. is working as I e

Re: Debug-level messages don't appear in Console even after asl_set_filter()

2009-09-16 Thread Jesper Storm Bache
This is by design. The syslogd daemon filters such messages out. See man syslog (and possibly also man syslogd) on how to change the server side filtering. Jesper On Sep 16, 2009, at 8:22 AM, Sidney San Martín wrote: > Messages that I log below ASL_LEVEL_NOTICE aren't showing up in > Console

Re: Retrieving the selected object in an NSOutlineView.

2009-09-16 Thread Volker in Lists
Hi, try to call representedObject on one of the items returned by selectedObjects - this gives you the object as it sits in your object graph (probbly still CoreData). Then you can use the keyPath for children on the returned object. Et voila. Volker Am 16.09.2009 um 17:20 schrieb Joshua

CALayer z-ordering

2009-09-16 Thread Ivy Feraco
Hi I think am experiencing problems with CALayer z-ordering. When I resize a superview, all its regular subviews become hidden/ obstructed (which is what I want), while the subviews with CALayer remain drawn on top of the superview. I have experimented with both layer-backed and layer-hosting

Re: Filtering a table view using NSSearchField

2009-09-16 Thread Sean McBride
On 9/16/09 7:22 AM, PCWiz said: >I found a very simple way to do this. Just bind the NSSearchFields >"predicate" binding to the Array Controllers filterPredicate key. Then >change the Predicate Format to "myKeyPath contains[c] $value" where >myKeyPath is the key path in the array controller that y

Re: Binding a model's ivar array to the contents of an NSArrayController

2009-09-16 Thread Todd Heberlein
So in short, my need is pretty simple: Bind an array to an NSArrayController. That being said, it seems that no combination of exposeBindings:, bind:toObject:withKeypath:options:, observeValueForKey:ofObject:change:context:, etc. is working as I expect it to. Admittedly, I have done most

Re: Debug-level messages don't appear in Console even after asl_set_filter()

2009-09-16 Thread Sidney San Martín
Are you sure about this? the asl(3) and syslog(1) manpages both state, "The master filter mask usually has a value that indicates to the library that it is "off", and thus it has no effect." Calling syslog -c 0 and syslog -c process on my machine both print "... filter mask: Off". On Wed, Sep 16,

settings to build for 10.5 on 10.6?

2009-09-16 Thread Matt Neuburg
What are the correct build settings to develop on 10.6 in such a way that my app will also run on 10.5? (It runs fine on my 10.6 machine.) I've already set the SDK and Base to 10.5, and my app does launch successfully (if I set it to 32 bit) on my Leopard MacBook, and all of *my* code runs okay (I

Re: Debug-level messages don't appear in Console even after asl_set_filter()

2009-09-16 Thread Jesper Storm Bache
I am rather sure because I logged the following radar on this issue: 5046125 asl_set_filter does not seem to work for INFO, or DEBUG level messages Apple engineering replied with statements such as: = ... the reason you don't see Info or Debug messages is that the syslogd daemon fi

Re: Upgrading NSDocument format, best practice

2009-09-16 Thread Markus Spoettl
On Sep 16, 2009, at 4:21 PM, I. Savant wrote: Wow ... let me decipher this paragraph, which I obviously didn't proofread. :-D When defining your document types (in the Info.plist file), you can designate a type as having an "Editor" role. This is typical. Unchecking this makes it a type

How to create subentity object inheriting from superentity object in core data

2009-09-16 Thread Leon Starr
I've got a generalization in my core data model with entities named A, B, C let's say where A is a super class with subentities B and C. A is not abstract, so if I create an A NSManagedObject, I need to create and relate a single B or C subclass object. How do I make this happen? I can crea

Re: [myNSWindow setDocumentEdited:dirtyB] fail ??

2009-09-16 Thread David M. Cotter
when i try to set a breakpoint on setDocumentEdited, the "enabled" check box shows "mixed" state, and the breakpoint is never hit. if i try to set it to "on" it goes back to mixed state so i can't set a breakpoint :( What are the exact steps you use to set the breakpoint? open breakpoints

Re: How to create subentity object inheriting from superentity object in core data

2009-09-16 Thread Kyle Sluder
On Wed, Sep 16, 2009 at 10:53 AM, Leon Starr wrote: > A is not abstract, so if I create an A NSManagedObject, I need to create and > relate a single B or C subclass object. How do I make this happen? I can > create the entities, but HOW do I tell the model that object B is a subclass > of object A

Re: Binding a model's ivar array to the contents of an NSArrayController

2009-09-16 Thread Quincey Morris
On Sep 16, 2009, at 08:29, A B wrote: I have an NSView that is keeping track of a group of objects via an NSMutableArray ivar (let's call it relatedObjects). Objects in this array are represented in the view by subviews (i.e. when I add an object to the array, a new subview appears, when I

Re: settings to build for 10.5 on 10.6?

2009-09-16 Thread Ross Carter
On Sep 16, 2009, at 1:03 PM, Matt Neuburg wrote: What are the correct build settings to develop on 10.6 in such a way that my app will also run on 10.5? (It runs fine on my 10.6 machine.) I've already set the SDK and Base to 10.5, and my app does launch successfully (if I set it to 32 bit) o

Re: How to create subentity object inheriting from superentity object in core data

2009-09-16 Thread Leon Starr
Hmm. Does that mean that I only need to create the subclass entity B as shown? // NSEntityDescription *aEntity = [[model entitiesByName] objectForKey:@"A"]; NSEntityDescription *bEntity = [[model entitiesByName] objectForKey:@"B"]; //A *newA = [[A alloc] initWithEntity:aEntity insertIn

Re: How to create subentity object inheriting from superentity object in core data

2009-09-16 Thread Quincey Morris
On Sep 16, 2009, at 10:53, Leon Starr wrote: I've got a generalization in my core data model with entities named A, B, C let's say where A is a super class with subentities B and C. A is not abstract, so if I create an A NSManagedObject, I need to create and relate a single B or C subclass

Re: Interface Builder .xib deployment/development targets

2009-09-16 Thread Jonathan Hess
On Sep 16, 2009, at 12:46 AM, Steve Cronin wrote: Folks; Got another report today from the field also a MacBookPro5,1 running 10.5.8 2009-09-16 03:01:53.954 XYZ[329:20b] Error loading /Library/ ScriptingAdditions/QXPScriptingAdditions.osax/Contents/MacOS/ QXPScriptingAdditions: dlopen(/Lib

Re: CALayer z-ordering

2009-09-16 Thread David Duncan
On Sep 16, 2009, at 8:42 AM, Ivy Feraco wrote: I think this is a pretty normal setup, but I don't know why the views (progressViews) with CALayers get drawn on top despite the fact that they are sublayers of a subview. Shouldn't they be placed on a lower z-order since they are down further

Re: Interface Builder .xib deployment/development targets

2009-09-16 Thread Steve Cronin
Jonathan; Yeah thanks for asking that - I should have made it clearer. NO crash report - just program death (hang no response) The earlier emails include extracts from my own logs that I have the users turn on. Steve On Sep 16, 2009, at 1:22 PM, Jonathan Hess wrote: On Sep 16, 2009, at

Re: Interface Builder .xib deployment/development targets

2009-09-16 Thread Jonathan Hess
On Sep 16, 2009, at 11:29 AM, Steve Cronin wrote: Jonathan; Yeah thanks for asking that - I should have made it clearer. NO crash report - just program death (hang no response) The earlier emails include extracts from my own logs that I have the users turn on. So the program is spinning

Re: NSString vs. unicode encoding

2009-09-16 Thread Shawn Erickson
On Tue, Sep 15, 2009 at 9:04 PM, Johan Kool wrote: > Dear list, > > I need to work with strings as in stringA. (I don't have much choice, but > to have it in a NSString at the start.) I want to have the readable output > "hello world". > > NSString *stringA = @"hello\040world"; > NSString *string

CAAnimation finished ?

2009-09-16 Thread Erik Colson
Hi, I want my application to wait until a first animation finishes before launching another one. How do I know if an animation is still running or is finished ? Is there a method for knowing if a CALayer is currently running an animation ? or should I query the CAAnimation object ? Exampl

NSToolTipOwner Protocol and Xcode 3.2 build failure in Debug Build Configuration

2009-09-16 Thread Claudio Wilmanns
Hi, I have a severe problem since using Xcode 3.2 (Snow Leopard required) for development. The problem leads to an interrupted build process in Debug Build Configuration, so I cannot debug my application. In my application, I create ToolTipRectangles. I need to display a custom tooltip (as

What replaces the (now deprecated) NSObjCValueType?

2009-09-16 Thread Todd Blanchard
NSMethodSignature has methods: - (const char *)getArgumentTypeAtIndex:(NSUInteger)idx; - (const char *)methodReturnType; So apparently the runtime is using strings to denote types instead of the now deprecated NSObjCValueType. So where is the modern definition of which string maps to which t

10.6 :- Problems with mounted network volume path.

2009-09-16 Thread Shashanka L
Hello, I have a problem with 10.6 in identifying the mounted network volume. My system has a local volume - 'Leopard'. When I mount a volume 'Leopard' from some other system in my network, the path it shows is '/ Leopard'. (There is no '/Volumes' at the beginning!) Here in my application I

debugging strategy

2009-09-16 Thread Michael Cinkosky
We have a bug that we are having a hard time tracking down and I wonder if anyone has any tips to offer about techniques we might try. Here is the situation. We have a large application that has been in the field for several years now. We are adding new feature for our next release, and w

Re: NSString vs. encoding

2009-09-16 Thread Johan Kool
Op 15 sep 2009, om 23:15 heeft Johan Kool het volgende geschreven: Op 15 sep 2009, om 22:26 heeft Stephen J. Butler het volgende geschreven: On Wed, Sep 16, 2009 at 12:10 AM, Johan Kool wrote: Op 15 sep 2009, om 21:50 heeft Jens Alfke het volgende geschreven: On Sep 15, 2009, at 9:04 PM, Jo

Re: Grand Central Dispatch vs CFRunLoop

2009-09-16 Thread Chris Kane
Forgive my responding to two sets of comments with one message ... On Sep 13, 2009, at 9:18 PM, Ken Thomases wrote: On Sep 13, 2009, at 10:09 AM, Filip van der Meeren wrote: I am using NSTask objects in a Command Line Tool project, to be able to intercept notifications I need a runloop to t

Re: NSString vs. unicode encoding

2009-09-16 Thread Johan Kool
Op 16 sep 2009, om 11:31 heeft Shawn Erickson het volgende geschreven: On Tue, Sep 15, 2009 at 9:04 PM, Johan Kool wrote: Dear list, I need to work with strings as in stringA. (I don't have much choice, but to have it in a NSString at the start.) I want to have the readable output "hello

Re: NSToolTipOwner Protocol and Xcode 3.2 build failure in Debug Build Configuration

2009-09-16 Thread Randall Meadows
On Sep 16, 2009, at 1:33 AM, Claudio Wilmanns wrote: In my application, I create ToolTipRectangles. I need to display a custom tooltip (as the object does not have an own -description: method), so I override the following method of the NSToolTipOwner Protocol declared in NSView.h: - (NSStrin

Re: debugging strategy

2009-09-16 Thread I. Savant
On Sep 16, 2009, at 1:05 PM, Michael Cinkosky wrote: Here is the situation. We have a large application that has been in the field for several years now. We are adding new feature for our next release, and we are testing the new builds against Snow Leopard as well as earlier versions of O

Re: 10.6 :- Problems with mounted network volume path.

2009-09-16 Thread Kyle Sluder
On Wed, Sep 16, 2009 at 6:35 AM, Shashanka L wrote: > My system has a local volume - 'Leopard'. When I mount a volume 'Leopard' > from some other system in my network, the path it shows is '/Leopard'. >  (There is no '/Volumes' at the beginning!) I have noticed this behavior too. It does not hap

Re: 10.6 :- Problems with mounted network volume path.

2009-09-16 Thread Kyle Sluder
JFTR, I am no longer seeing this problem on 10.6.1. If you have not yet updated, please file the bug report before updating, in case the update does something that could obscure the cause of the problem. --Kyle Sluder ___ Cocoa-dev mailing list (Cocoa-

NSTableView scroll row by row (?)

2009-09-16 Thread Rui Pacheco
Hi, I'm not asking how to do this, it's more in line of "How would you call this?". I have an NSTableView with several custom cells. I want the table to scroll row by row, meaning that when I move the scrollbar up I want the top row to disappear and when I move it down I want the bottom row also

Re: Debug-level messages don't appear in Console even after asl_set_filter()

2009-09-16 Thread Sidney San Martín
Huh, that's an interesting behavior. After running that command on my machine, debug and info level messages are indeed being logged. Thanks for your help, and for sharing what engineering told you. On Wed, Sep 16, 2009 at 1:37 PM, Jesper Storm Bache wrote: > I am rather sure because I logged th

Re: NSString vs. encoding

2009-09-16 Thread Greg Guerin
Johan Kool wrote: NSString *stringA = @"J\\303\\270ha\\314\\212n\\040i\\314\\210s\ \040Li\ \314\\200e\\314\\201\\306\\222"; NSLog(@"stringA %@ (expected Jøhån ïs Lìéƒ)", stringA); You're doing it wrong. NSNonLossyASCIIStringEncoding expects one escaped unit per Unicode code-point. It doe

Finding and NSView in a window

2009-09-16 Thread David Alter
Is there and easy way to find the top most view for a given point in a Window? thanks for the help -dave ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators a

Re: Finding and NSView in a window

2009-09-16 Thread Jesper Storm Bache
the top most would be the content view. If you mean the inner-most view, then get the content view and then use [NSView hitTest] on that view (after you translate the coordinates to the coordinate space of the content view). Jesper On Sep 16, 2009, at 1:04 PM, David Alter wrote: > Is there

Re: NSString vs. encoding

2009-09-16 Thread Johan Kool
Op 16 sep 2009, om 12:44 heeft Greg Guerin het volgende geschreven: Johan Kool wrote: NSString *stringA = @"J\\303\\270ha\\314\\212n\\040i\\314\\210s\ \040Li\ \314\\200e\\314\\201\\306\\222"; NSLog(@"stringA %@ (expected Jøhån ïs Lìéƒ)", stringA); You're doing it wrong. I know. :-) Henc

Re: NSString vs. encoding

2009-09-16 Thread Stephen J. Butler
On Wed, Sep 16, 2009 at 3:13 PM, Johan Kool wrote: > I have been trying many combinations of encodings/decodings, but without the > intended result. I do know what NSString wants, but that's not what I have. > I have stringA as shown, and I have to somehow morph it into something > usable. Basical

Re: What replaces the (now deprecated) NSObjCValueType?

2009-09-16 Thread Jean-Daniel Dupas
Le 16 sept. 2009 à 10:09, Todd Blanchard a écrit : NSMethodSignature has methods: - (const char *)getArgumentTypeAtIndex:(NSUInteger)idx; - (const char *)methodReturnType; So apparently the runtime is using strings to denote types instead of the now deprecated NSObjCValueType. So where is

Re: NSString vs. encoding

2009-09-16 Thread Greg Guerin
Johan Kool wrote: I have been trying many combinations of encodings/decodings, but without the intended result. I do know what NSString wants, but that's not what I have. I have stringA as shown, and I have to somehow morph it into something usable. Obvious answer: write your own parser.

Re: Is a serial NSOperationQueue FIFO?

2009-09-16 Thread Chris Kane
On Sep 6, 2009, at 9:32 PM, Eric Hermanson wrote: When working with a serial NSOperationQueue (i.e. setMaxConcurrentOperationCount==1), are the operations added to the queue guaranteed to run in FIFO order if all operations have the same priority and no operation dependencies are involved?

Re: Grand Central Dispatch vs CFRunLoop

2009-09-16 Thread Filip van der Meeren
Thank you, that helped a lot. Filip On 16 Sep 2009, at 20:47, Chris Kane wrote: Forgive my responding to two sets of comments with one message ... On Sep 13, 2009, at 9:18 PM, Ken Thomases wrote: On Sep 13, 2009, at 10:09 AM, Filip van der Meeren wrote: I am using NSTask objects in a Comm

Re: Need -[NSTask waitUntilExitOrTimeout:] (was NSTask "Thread Unsafe"...)

2009-09-16 Thread Chris Kane
On Sep 14, 2009, at 6:29 PM, Jerry Krinock wrote: The reason why I asked this is because I need: -[NSTask waitUntilExitOrTimeout:(NSTimeInterval)]. But there is no such method. So, I wrote a wrapper around NSTask that does this. On 2009 Sep 14, at 07:41, Adam R. Maxwell wrote: Ordinar

Re: Custom Fonts in UI Webview

2009-09-16 Thread Ben Lachman
On Sep 15, 2009, at 10:08 PM, Alex Curylo wrote: On 15-Sep-09, at 6:57 PM, cocoa-dev-requ...@lists.apple.com wrote: You can do custom fonts on the iPhone, but you cannot use system controls to draw with them. You have to draw yourself each glyph. Sure you can. It's just tricky. http://www

Re: How to create subentity object inheriting from superentity object in core data

2009-09-16 Thread Leon Starr
Okay, guys, this helps a lot, still stuck, but getting closer! Now I am getting an error with my revised code. We are talking about two entities A and B where B where A is the parent of B. A has the property "name", and I would like to set that after creating an object for B. Here is the

Re: NSUserDefaults synchronization in Foundation tools

2009-09-16 Thread Sidney San Martín
Fair enough, I s'pose that makes sense for most apps. Since I'm targeting 10.4+, and, actually, am using CFPreferences instead of NSUserDefaults, I wrote a simple "autosynchronize" mechanism that synchronizes preferences if needed at the end of the runloop. It lets multiple defaults be changed at

Re: How to create subentity object inheriting from superentity object in core data

2009-09-16 Thread Quincey Morris
On Sep 16, 2009, at 14:55, Leon Starr wrote: Okay, guys, this helps a lot, still stuck, but getting closer! Now I am getting an error with my revised code. We are talking about two entities A and B where B where A is the parent of B. A has the property "name", and I would like to set that a

Re: NSToolTipOwner Protocol and Xcode 3.2 build failure in Debug Build Configuration

2009-09-16 Thread Claudio Wilmanns
Thank you Randall, the problem is now solved. Regards - Claudio Am 16.09.2009 um 20:56 schrieb Randall Meadows: On Sep 16, 2009, at 1:33 AM, Claudio Wilmanns wrote: In my application, I create ToolTipRectangles. I need to display a custom tooltip (as the object does not have an own -descri

Core data - how to set string min max programmatically?

2009-09-16 Thread Leon Starr
I have been creating my models programmatically and am wondering how to treat the min/max length fields for string attributes. I can't seem to find any corresponding programatic settings. (Also wondering if there is any effect to these settings). Been googling all over the place with no

Re: NSTableView scroll row by row (?)

2009-09-16 Thread Mike Abdullah
Have a butchers at the Scroll View Programming Guide. In particular: Scrolling the Document View > Constraining Scrolling. Mike. On 16 Sep 2009, at 20:28, Rui Pacheco wrote: Hi, I'm not asking how to do this, it's more in line of "How would you call this?". I have an NSTableView with se

Re: Core data - how to set string min max programmatically?

2009-09-16 Thread mmalc Crawford
On Sep 16, 2009, at 3:56 PM, Leon Starr wrote: I have been creating my models programmatically and am wondering how to treat the min/max length fields for string attributes. I can't seem to find any corresponding programatic settings. (Also wondering if there is any effect to these setti

CoreData and NSTimeInterval

2009-09-16 Thread Luther Baker
I'm creating a timesheet/stopwatch application of sorts for the iPhone. I am using an NSDate in CoreData and following this pattern: 1) Start: Session* session = (Session*)[NSEntityDescription insertNewObjectForEntityForName:@"Session" inManagedObjectContext: managedObjectContext_]; session.star

NSInvocation or NSTimer with an arg

2009-09-16 Thread Luther Baker
I'd like to fire a simple callback every .1 of second (yes, my stopwatch style app). But in that callback, I need access to a corresponding UITableViewCell. Unfortunately, I don't see a way to choose a selector with a UITableViewCell argument for the oneliner: [NSTimer scheduledTimerWithTimeInterv

CocoaDVDPlayer

2009-09-16 Thread Quincey Morris
This may not be the correct list for this. ('dvdlist' doesn't look like the right list either -- it says it's for "Authoring Tools".) The CocoaDVDPlayer sample application doesn't appear to run properly under Snow Leopard. It gets as far as calling DVDInitialize (), but doesn't return from

Re: CAAnimation finished ?

2009-09-16 Thread Kevin Cathey
CAAnimation has a delegate you can use to be notified when an animation is complete: http://developer.apple.com/mac/library/documentation/GraphicsImaging/Reference/CAAnimation_class/Introduction/Introduction.html#jumpTo_14 For more, see previous posts on the mailing list. Kevin __

Re: Core data - how to set string min max programmatically?

2009-09-16 Thread Leon Starr
Excellent! That is just what I was looking for... (remember reading that stuff a while back, but forgot about it) Thanks. FROM : mmalc Crawford DATE : Thu Sep 17 01:10:50 2009 On Sep 16, 2009, at 3:56 PM, Leon Starr wrote: > I have been creating my models programmatically and am wondering h

Re: NSInvocation or NSTimer with an arg

2009-09-16 Thread Hank Heijink (Mailinglists)
On Sep 16, 2009, at 8:24 PM, Luther Baker wrote: I'd like to fire a simple callback every .1 of second (yes, my stopwatch style app). But in that callback, I need access to a corresponding UITableViewCell. Unfortunately, I don't see a way to choose a selector with a UITableViewCell argument

[UNSOLVED] How to observe every child entity

2009-09-16 Thread Matthew Lindfield Seager
Someone kindly warned me off-list about taking care when an item is deleted and then re-added by an Undo. It turns out my "solution" was not complete (nor correct - see below). When a user undoes a deletion it calls the primitive accessor which does not emit KVC/KVO notifications. I get the feelin

Re: How to create subentity object inheriting from superentity object in core data

2009-09-16 Thread Leon Starr
Okay, my understanding, then, is that the inheritance is just in the model - makes sense. If you subclass NSManagedObjects for the parent and child entities, you need to explicitly declare and synthesize (dynamically) all common properties you want to access at lower levels of the hierarchy

Re: settings to build for 10.5 on 10.6?

2009-09-16 Thread Matt Neuburg
I guess I wasn't clear. Deployment target is 10.5. Base SDK is 10.5. Runs fine on 10.6 but crashes in Core Animation on 10.5. The question is what *else* I need to change to make it run on 10.5. To put it another way: if you are developing on 10.6 and your app successfully does Core Animation on 1

Re: NSString vs. encoding

2009-09-16 Thread Joar Wingfors
On 16 sep 2009, at 13.13, Johan Kool wrote: I have been trying many combinations of encodings/decodings, but without the intended result. I do know what NSString wants, but that's not what I have. I have stringA as shown, and I have to somehow morph it into something usable. Basically I ne

Re: NSInvocation or NSTimer with an arg

2009-09-16 Thread Luther Baker
Thank you Hank that is just what I needed to see. I must've glossed over the docs you reference below. But something just occurred to me with respect to your point regarding UITableViewCells, userinfo and NSIndexPath. If I associate an NSIndexPath* with a timer and I insert 10 timers - each in

Re: [UNSOLVED] How to observe every child entity

2009-09-16 Thread Jerry Krinock
On 2009 Sep 16, at 18:25, Matthew Lindfield Seager wrote: Someone kindly warned me off-list about taking care when an item is deleted and then re-added by an Undo ... When a user undoes a deletion it calls the primitive accessor which does not emit KVC/KVO notifications. How about if you

Re: debugging strategy

2009-09-16 Thread Wade Tregaskis
Here is the situation. We have a large application that has been in the field for several years now. We are adding new feature for our next release, and we are testing the new builds against Snow Leopard as well as earlier versions of OS X. Under Snow Leopard, some existing functionalit

Re: CocoaDVDPlayer

2009-09-16 Thread Steve Nygard
Try running it from outside the debugger. DVDInitialize() uses ptrace() with PT_DENY_ATTACH to stop it from being used in a debugger. -- Steve On 16-Sep-2009, at 18:29 , Quincey Morris wrote: This may not be the correct lis

Re: debugging strategy

2009-09-16 Thread Michael Cinkosky
Thanks, Wade, that is exactly the kind of guidance I was hoping for. I guess it is time to learn Instruments... Michael On Sep 16, 2009, at 8:47 PM, Wade Tregaskis wrote: Here is the situation. We have a large application that has been in the field for several years now. We are adding

#pragma to suppress a warning message

2009-09-16 Thread Jay Boyer
I have three related questions. I’d like to suppress a particular warning message in the source file. In gnu it could be done as follows: #pragma Warnings(Off) NSArray *languages = [NSLocale preferredLanguages]; #pragma Warnings(On) Is there a way to do this in xcode with #pra

Re: #pragma to suppress a warning message

2009-09-16 Thread BJ Homer
If you're just wanting to use the method and avoid the warning, add a category to NSLocale declaring the preferred languages. Just add the interface; no implementation is necessary. You may want to do further investigation; however. It's possible that the preferredLanguages method appeared mid-wa

Re: #pragma to suppress a warning message

2009-09-16 Thread Scott Thompson
Also, can anyone point me to a list of the #pragma’s for xcode? I'm not sure what you are referring to when you say that your pragam warnings would have worked "In gnu". Xcode is an IDE. The compiler most commonly used with Xcode is gcc which is the GNU C compiler. In Snow Leopard, you c

Re: How to create subentity object inheriting from superentity object in core data

2009-09-16 Thread Quincey Morris
On Sep 16, 2009, at 18:38, Leon Starr wrote: To get this to work, without KVC, I need to declare @property/ @dynamic for license in Auto, Sedan and Truck. (Can't just put it in Auto and expect Sedan.license to work). No big deal unless I have a bunch of common properties in the parent ent

Document Attributes into Pdf

2009-09-16 Thread Gerriet M. Denkmann
I read some text via: NSTextStorage *textStorage = [textView textStorage]; NSDictionary *documentAttributes; BOOL ok = [textStorage readFromURL:url options:nil documentAttributes: & documentAttributes error: NULL]; Then I print it like this: NSPrintInfo *printInfo = [ self printInfo

Re: NSString vs. encoding

2009-09-16 Thread Johan Kool
Op 16 sep 2009, om 19:32 heeft Joar Wingfors het volgende geschreven: On 16 sep 2009, at 13.13, Johan Kool wrote: I have been trying many combinations of encodings/decodings, but without the intended result. I do know what NSString wants, but that's not what I have. I have stringA as shown

re: How to create subentity object inheriting from superentity object in core data

2009-09-16 Thread Ben Trumbull
I've got a generalization in my core data model with entities named A, B, C let's say where A is a super class with subentities B and C. A is not abstract, so if I create an A NSManagedObject, I need to create and relate a single B or C subclass object. How do I make this happen? I can create the

  1   2   >