Re: “EXC_BAD_ACCESS” on Custom TableV iew with custom NSCell when clicking.

2010-02-17 Thread Gustavo Pizano
On Feb 18, 2010, at 12:29 AM, Ken Ferry wrote: > On Wed, Feb 17, 2010 at 2:14 PM, Gustavo Pizano > wrote: > > On Feb 17, 2010, at 11:03 PM, Jim Correia wrote: > > > On Feb 17, 2010, at 4:41 PM, Gustavo Pizano wrote: > > > >> Maybe I misunderstood I must conform NSCopying protocol also even wh

Re: Spotlight while running windows modal

2010-02-17 Thread Kyle Sluder
On Wed, Feb 17, 2010 at 9:30 PM, Kiel Gillard wrote: > Is there some way I can have the best of both worlds? If you really, really require a modal alert panel, then you'll have to run the query on its own thread, with its own runloop. --Kyle Sluder ___

Spotlight while running windows modal

2010-02-17 Thread Kiel Gillard
Hi all, I'm trying to cancel a modal NSAlert when Spotlight determines a file exists in the file system. I create and start the NSMetadataQuery before I run the alert modal. However I do not receive notifications of changes to my metadata query while my application is running modal. The docs i

Re: Proper way to initialize application support file

2010-02-17 Thread Kyle Sluder
On Wed, Feb 17, 2010 at 9:15 PM, Paul Johnson wrote: > Steve and Kyle, I may not understand the term "Application bundle" > correctly, but to me it shouldn't be something that the program can > store data intot. If I'm wrong, then, for example, reinstalling the > program (and presumably recreating

Re: Proper way to initialize application support file

2010-02-17 Thread Kyle Sluder
On Wed, Feb 17, 2010 at 8:49 PM, Paul Johnson wrote: > Kyle, I've reread your post and now see your last sentence, where you > mention Library/Caches. I guess that could be an acceptable location > for the data I download from the internet. I still feel the data as > being more "persistent" than d

Re: Proper way to initialize application support file

2010-02-17 Thread Paul Johnson
Kyle, I've reread your post and now see your last sentence, where you mention Library/Caches. I guess that could be an acceptable location for the data I download from the internet. I still feel the data as being more "persistent" than data associated with a 'cache' though. I'm considering adding

Re: Proper way to initialize application support file

2010-02-17 Thread Paul Johnson
Steve and Kyle, I may not understand the term "Application bundle" correctly, but to me it shouldn't be something that the program can store data intot. If I'm wrong, then, for example, reinstalling the program (and presumably recreating the 'Application bundle') would destroy the acquired data, wh

Re: Appropriate -setWantsLayer: timing

2010-02-17 Thread Michael Ash
On Wed, Feb 17, 2010 at 4:23 AM, Keith Duncan wrote: > > On 16 Feb 2010, at 21:40, David Duncan wrote: > >>> Calling it in -initWithFrame: is too early and the view fails to 'draw'. >> >> If you are creating the view programmatically, -initWithFrame: should be >> fine. If your loading from a nib,

Re: Stuck on NSTreeController bindings

2010-02-17 Thread Jenny M
Sorry, realizing that the object chain isn't quite right. The Alpha- Beta relationship is one to one, NOT many to one. Each alpha has one beta, and one beta has multiple deltas. (I have multiple alpha objects, hence my initial comment of multiple, but the relationship is one-to-one.) On Feb 17, 7

Stuck on NSTreeController bindings

2010-02-17 Thread Jenny M
Hi all, I have a collection of entities I'd like to display in an NSOutlineView with an NSTreeController. My issue is, I don't know how to set the bindings. All examples I've seen are where the Tree Controller contains ALL entities of a type. I need just a set of them, but nothing I've tried to se

Re: Appropriate -setWantsLayer: timing

2010-02-17 Thread Dave Keck
> Maybe I'm misunderstanding, but I'm wondering, why not put everything into a > single method and call that method from both initWithFrame and awakeFromNib? > One and only one of these will be called (depending whether you are > instantiating in code or in a nib), so your single method will be cal

Re: Appropriate -setWantsLayer: timing

2010-02-17 Thread Dave Keck
> That's actually a more distilled version of my question. When your layer > hosting view may be instantiated programatically, or from a NIB; there is no > good place that covers both since the -init methods are too early (I haven't > needed to test -initWithCoder: yet). > > Nor have I determine

Re: The 64 pixels width limit on Windows

2010-02-17 Thread Hank Heijink (Mailinglists)
On Feb 17, 2010, at 4:55 PM, Eric Gorr wrote: > On Feb 4, 2010, at 3:13 PM, Hank Heijink (Mailinglists) wrote: > >> On Feb 4, 2010, at 2:51 PM, Eric Gorr wrote: >> >>> When I am resizing my window, I have a delegate method >>> windowWillResize:toSize: which is being called. What I am finding od

Re: Dynamically populate a popup menu

2010-02-17 Thread Peter N Lewis
On 17/02/2010, at 15:53 , Graham Cox wrote: > On 17/02/2010, at 6:49 PM, Peter N Lewis wrote: > >> Is there any way to dynamically populate a popup menu on the fly (as it is >> exposed)? > > Look into the NSMenuDelegate protocol. It has methods to do what you want. Yes, that looks like it will

Re: alternative to NSMatrix due to cell size restriction

2010-02-17 Thread Matt Neuburg
On Wed, 17 Feb 2010 19:17:51 +0800, Eric Boo said: >Hi All, > >I have an NSView in which I'm placing an NSMatrix, with the number of >columns modifiable by the user. > >The problem is that I need to have cells of differences sizes in the >NSMatrix so perhaps NSMatrix is not suitable for me. > >The

Re: Appropriate -setWantsLayer: timing

2010-02-17 Thread Matt Neuburg
On Wed, 17 Feb 2010 09:23:57 +, Keith Duncan said: > >On 16 Feb 2010, at 21:40, David Duncan wrote: > >>> Calling it in -initWithFrame: is too early and the view fails to 'draw'. >> >> If you are creating the view programmatically, -initWithFrame: should be fine. If your loading from a nib, t

Re: Quartz2D paths from vector?

2010-02-17 Thread Graham Cox
On 18/02/2010, at 6:02 AM, Paul Reilly wrote: > shapes > in something like Illustrator or Photoshop and then export the Path as a > vector path, > .AI or .EPS, and then convert that in to a set of points for NSBezier Path > to use. > > Is anyone aware of a tool that will do that? > Or is there an

Re: Dynamically populate a popup menu

2010-02-17 Thread Graham Cox
On 18/02/2010, at 3:00 AM, Steven Degutis wrote: > While NSMenuDelegate isn't wrong per se, I still prefer to use the > NSPopUpButton's notification myself. Touching the button's internal menu > seems like dipping my fingers where they don't belong. NSMenuDelegate works fine with pop-up buttons

Re: Debugging "NSManagedObject with ID has been invalidated"

2010-02-17 Thread Gideon King
Yeah, that was pretty much my first port of call. Didn't help me find the problem unfortunately. Still searching... > From the Core Data Programming Guide ▸ Troubleshooting Core Data > > "Cause: Either you have removed the store for the fault you are attempting to > fire, or the managed object'

Re: Overriding NSMenuItem's drawing

2010-02-17 Thread Peter Ammon
On Feb 17, 2010, at 8:30 AM, Tom Davie wrote: > I need an NSMenuItem that rather than drawing an NSImage in it's cell draws > *part* of an NSImage, is it possible to override NSMenuItem's drawing in any > way to achieve this? I don't see the relevant methods. Can't you just make a different NSI

Re: “EXC_BAD_ACCESS” on Custom TableV iew with custom NSCell when clicking.

2010-02-17 Thread Ken Ferry
On Wed, Feb 17, 2010 at 2:14 PM, Gustavo Pizano wrote: > > On Feb 17, 2010, at 11:03 PM, Jim Correia wrote: > > > On Feb 17, 2010, at 4:41 PM, Gustavo Pizano wrote: > > > >> Maybe I misunderstood I must conform NSCopying protocol also even when > using core data? > > > > If you have an NSCell sub

Re: “EXC_BAD_ACCESS” on Custom TableV iew with custom NSCell when clicking.

2010-02-17 Thread Corbin Dunn
On Feb 17, 2010, at 2:14 PM, Gustavo Pizano wrote: > > On Feb 17, 2010, at 11:03 PM, Jim Correia wrote: > >> On Feb 17, 2010, at 4:41 PM, Gustavo Pizano wrote: >> >>> Maybe I misunderstood I must conform NSCopying protocol also even when >>> using core data? >> >> If you have an NSCell subc

Re: “EXC_BAD_ACCESS” on Custom TableV iew with custom NSCell when clicking.

2010-02-17 Thread Gustavo Pizano
On Feb 17, 2010, at 11:03 PM, Jim Correia wrote: > On Feb 17, 2010, at 4:41 PM, Gustavo Pizano wrote: > >> Maybe I misunderstood I must conform NSCopying protocol also even when using >> core data? > > If you have an NSCell subclass which adds iVars, you must implement > -copyWithZone: to do

Re: “EXC_BAD_ACCESS” on Custom TableV iew with custom NSCell when clicking.

2010-02-17 Thread Jim Correia
On Feb 17, 2010, at 4:41 PM, Gustavo Pizano wrote: > Maybe I misunderstood I must conform NSCopying protocol also even when using > core data? If you have an NSCell subclass which adds iVars, you must implement -copyWithZone: to do correct memory management. Your -copyWithZone: needs to work

Re: Quartz2D paths from vector?

2010-02-17 Thread Paul Reilly
Thanks Erik, Pavel, Brian. I will try drawing it in a SVG tool, and then extract the paths. Maybe I will try loading the PDF directly too. I had not really thought of it like that. Thanks for your help everyone, Paul ___ Cocoa-dev mailing list (Cocoa

Re: Proper way to initialize application support file

2010-02-17 Thread Ken Thomases
On Feb 17, 2010, at 3:21 PM, Paul Johnson wrote: > I am working on a Document-based application that needs to have a > certain file in ~/Library/Application Support/ before it can > do anything. It needs to be created the first time the program is run > (or if it has been deleted by the user). >

The 64 pixels width limit on Windows

2010-02-17 Thread Eric Gorr
On Feb 4, 2010, at 3:13 PM, Hank Heijink (Mailinglists) wrote: > On Feb 4, 2010, at 2:51 PM, Eric Gorr wrote: > >> When I am resizing my window, I have a delegate method >> windowWillResize:toSize: which is being called. What I am finding odd is >> that the width of the size being passed in wil

Re: Proper way to initialize application support file

2010-02-17 Thread jonat...@mugginsoft.com
On 17 Feb 2010, at 21:25, Steven Degutis wrote: > Apple's docs explicitly say that this folder should only contain files that > are *not* necessary for the app to function normally. Files that are > necessary should be inside your app bundle, usually. > > -Steven > I would stretch to say that

Re: “EXC_BAD_ACCESS” on Custom TableV iew with custom NSCell when clicking.

2010-02-17 Thread Gustavo Pizano
Corbin Hi. You may be right, Im not conforming NScopying protocol, but as I follow the example in Tim's blog he din't also. I read somewhere that one must do it when doing custom NSCells like my case, but then somwhere in the botton said that when using core data you don't wanna do that. Thi

Re: Proper way to initialize application support file

2010-02-17 Thread Kyle Sluder
On Wed, Feb 17, 2010 at 1:25 PM, Steven Degutis wrote: > Apple's docs explicitly say that this folder should only contain files that > are *not* necessary for the app to function normally. Files that are > necessary should be inside your app bundle, usually. As has been covered before, I believe

Re: Proper way to initialize application support file

2010-02-17 Thread Steven Degutis
Apple's docs explicitly say that this folder should only contain files that are *not* necessary for the app to function normally. Files that are necessary should be inside your app bundle, usually. -Steven On Wed, Feb 17, 2010 at 4:21 PM, Paul Johnson wrote: > I am working on a Document-based a

Proper way to initialize application support file

2010-02-17 Thread Paul Johnson
I am working on a Document-based application that needs to have a certain file in ~/Library/Application Support/ before it can do anything. It needs to be created the first time the program is run (or if it has been deleted by the user). I've created a class XXAppDelegate and declared it as implem

Re: Debugging "NSManagedObject with ID has been invalidated"

2010-02-17 Thread Jerry Krinock
On 2010 Feb 17, at 08:34, Gideon King wrote: > Hi all, I am getting the message "The NSManagedObject with ID (whatever) has > been invalidated" From the Core Data Programming Guide ▸ Troubleshooting Core Data "Cause: Either you have removed the store for the fault you are attempting to fire,

Re: “EXC_BAD_ACCESS” on Custom TableV iew with custom NSCell when clicking.

2010-02-17 Thread Corbin Dunn
On Feb 17, 2010, at 12:16 PM, Gustavo Pizano wrote: > Hello all. > > in My Core Data application I have a custom NSTableView with Custom NSCells > inside because Im displaying the name of the user with the image of the user > (the picture), its displaying fine, when selecting its selecting ok.

“EXC_BAD_ACCESS” on Custom TableView wi th custom NSCell when clicking.

2010-02-17 Thread Gustavo Pizano
Hello all. in My Core Data application I have a custom NSTableView with Custom NSCells inside because Im displaying the name of the user with the image of the user (the picture), its displaying fine, when selecting its selecting ok.. so far so good.. But I implemented the -(void)rightMouseDow

Re: Appropriate -setWantsLayer: timing

2010-02-17 Thread Keith Duncan
On 16 Feb 2010, at 21:40, David Duncan wrote: >> Calling it in -initWithFrame: is too early and the view fails to 'draw'. > > If you are creating the view programmatically, -initWithFrame: should be > fine. If your loading from a nib, then -awakeFromNib is the appropriate place. That's actuall

Quartz2D paths from vector?

2010-02-17 Thread Paul Reilly
Hello, I'm trying to draw shapes, and have read the Quartz 2D graphics guide. I can draw things like a romantic "heart" shapes [1] using NSBezier curves, with methods like CGContextAddCurveToPoint. However this is quite difficult to draw by numbers. I would like to draw my shapes in something li

Re: alternative to NSMatrix due to cell size restriction

2010-02-17 Thread Eric Boo
Thanks, for reference, if someone is doing it this way, this link can help: http://www.noodlesoft.com/blog/2009/10/20/yet-another-way-to-mimic-the-artwork-column-in-cocoa/ However, it also means that even the rows of the columns will align. Each artwork cell's bottom will align with the bottom of

Re: NSData category

2010-02-17 Thread Mike Abdullah
On 16 Feb 2010, at 13:21, Torsten Curdt wrote: > I am really really irritated. Got an iPhone project. Got quite some > categories with additions to the standard APIs. All good. > Just the darn NSData refuses to accept the category ... and I have no > clue why. It's as simple as > > @interface NS

Re: Overriding NSMenuItem's drawing

2010-02-17 Thread Jean-Daniel Dupas
Le 17 févr. 2010 à 17:30, Tom Davie a écrit : > I need an NSMenuItem that rather than drawing an NSImage in it's cell draws > *part* of an NSImage, is it possible to override NSMenuItem's drawing in any > way to achieve this? I don't see the relevant methods. Use a View in your menu item: htt

Debugging "NSManagedObject with ID has been invalidated"

2010-02-17 Thread Gideon King
Hi all, I am getting the message "The NSManagedObject with ID (whatever) has been invalidated" when I try to save a new document in my application. It is just a plain blank document that I have not made any changes to. This did not happen when I saved my document in my build from one week ago, a

Overriding NSMenuItem's drawing

2010-02-17 Thread Tom Davie
I need an NSMenuItem that rather than drawing an NSImage in it's cell draws *part* of an NSImage, is it possible to override NSMenuItem's drawing in any way to achieve this? I don't see the relevant methods. Thanks Tom Davie ___ Cocoa-dev mailing list

Re: Dynamically populate a popup menu

2010-02-17 Thread Jean-Daniel Dupas
Yes, but using the notification does not solve the OP problem that is: I have to much submenu and item to compute then at one time. Not to mention the fact that he asked for a popup menu, but he does not talk about a popup button. That said, having more than one level of submenu is again Interf

Re: Preventing system sleep

2010-02-17 Thread James Bucanek
On 2/16/10 4:10 PM, Neil Allain wrote: On Feb 16, 2010, at 2:57 PM, Laurent Daudelin wrote: I'm working on a an app that at some point might start transferring a large file to a USB device. Apparently, if the system is set to go to sleep, the transfer will fail. I was thinking of using the

Re: Dynamically populate a popup menu

2010-02-17 Thread Steven Degutis
While NSMenuDelegate isn't wrong per se, I still prefer to use the NSPopUpButton's notification myself. Touching the button's internal menu seems like dipping my fingers where they don't belong. -Steven On Wed, Feb 17, 2010 at 10:41 AM, Jean-Daniel Dupas wrote: > > See NSMenuDelegate protocol. >

Re: Dynamically populate a popup menu

2010-02-17 Thread Jean-Daniel Dupas
See NSMenuDelegate protocol. There is some method to dynamically populate the menu. Le 17 févr. 2010 à 16:09, Steven Degutis a écrit : > Check out NSPopUpButton's NSPopUpButtonWillPopUpNotification > > On Wed, Feb 17, 2010 at 2:49 AM, Peter N Lewis wrote: > >> Is there any way to dynamically p

Re: Dynamically populate a popup menu

2010-02-17 Thread Steven Degutis
Check out NSPopUpButton's NSPopUpButtonWillPopUpNotification On Wed, Feb 17, 2010 at 2:49 AM, Peter N Lewis wrote: > Is there any way to dynamically populate a popup menu on the fly (as it is > exposed)? > > For example, a popup menu that displayed the harddisk hierarchy would need > this sort of

Re: alternative to NSMatrix due to cell size restriction

2010-02-17 Thread Steven Degutis
You may want to use an NSTableView instead, sort of along the lines of what iTunes uses in its many different kinds of table-based modes. (Especially that new one with the artwork.) -Steven On Wed, Feb 17, 2010 at 6:17 AM, Eric Boo wrote: > Hi All, > > I have an NSView in which I'm placing an N

Re: Synthesize NSMutableString retain count question

2010-02-17 Thread Ken Thomases
On Feb 17, 2010, at 8:05 AM, Ryan Homer wrote: > If you do reference a variable using dot notation, your accessors won't be > used. I think you meant the opposite. [...] >> However if I assign a value with >> >> [currentSection setString:@"Some value"]; > > Here, you've not assigned anything.

Re: Synthesize NSMutableString retain count question

2010-02-17 Thread Ryan Homer
On 2010-02-03, at 6:55, Philip Vallone wrote: > Hi List, > > This is probably a very elementary question. I have a NSMutableString that I > Synthesize. When I assigned a value to it: > > currentSection = @"Some value"; You should probably use self.currentSection instead of just currentSection

alternative to NSMatrix due to cell size restriction

2010-02-17 Thread Eric Boo
Hi All, I have an NSView in which I'm placing an NSMatrix, with the number of columns modifiable by the user. The problem is that I need to have cells of differences sizes in the NSMatrix so perhaps NSMatrix is not suitable for me. The user will be able to drag stuff (text, images etc) into each

Re: ImageIO on iPhone

2010-02-17 Thread sebi
Whoopsie! Thanks a lot! Regards, Sebastian Mecklenburg On Feb 16, 2010, at 3:02 PM, glenn andreas wrote: > > On Feb 16, 2010, at 6:55 AM, sebi wrote: > >> Hello, >> >> I want to use ImageIO on the iPhone. However, the ApplicationServices >> framework does not show up in the list, when i do

Re: Refresh com.apple.symbolichotkeys.plist

2010-02-17 Thread Jean-Daniel Dupas
Le 17 févr. 2010 à 01:09, DeNigris Sean a écrit : >> Is there any way to cause the system to re-read >> com.apple.symbolichotkeys.plist.plist in Cocoa (or anywhere else)? I want >> to programmatically change a shortcut (which is no problem), but I want it >> to take effect immediately. Syste