Re: -[NSManagedObject objectID]: unrecognized selector sent to class

2010-03-04 Thread Joanna Carter
Hi Matt Le 4 mars 2010 à 19:32, Matt Bigarani a écrit : > I'm experiencing some weirdness with NSManagedObject. Basic > background, I have an NSManagedObject 'surveyGroup', which has a > to-many relationship to another NSManagedObject, surveyResults. > > I'm attempting to access the surveyResult

Re: Get my custom object from NSDictionary variable

2010-03-04 Thread Matt Neuburg
On Fri, 5 Mar 2010 00:48:05 +0100, Daniel K??er said: >[myDictionary setObject:[[ComplexObject alloc] initWithFrom:_tempFrom >pairTo:string] forKey:[NSString stringWithFormat:@"%d", [myDictionary >count]]]; > >.. it seems, that this work correctly .. Not really. You're leaking a ComplexObject in

Re: NSSegmentedControl

2010-03-04 Thread Eli Bach
On Mar 4, 2010, at 8:40 PM, David Blanton wrote: > Is it possible to change the height of an NSSegmentedControl? > > IB gives access the the width of segments but not height. > > If subclass what would the method be to change the height? > > -db Could it just be that it's the height of the vi

NSSegmentedControl

2010-03-04 Thread David Blanton
Is it possible to change the height of an NSSegmentedControl? IB gives access the the width of segments but not height. If subclass what would the method be to change the height? -db ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do n

Re: -[NSManagedObject objectID]: unrecognized selector sent to class

2010-03-04 Thread Fritz Anderson
On 4 Mar 2010, at 1:32 PM, Matt Bigarani wrote: > I'm attempting to access the surveyResults object in two different > methods. It works fine in the first method, but in the second method I > get the error: > > "-[NSManagedObject objectID]: unrecognized selector sent to class" > > When trying to

Re: NSLocale and currency symbols

2010-03-04 Thread Deborah Goldsmith
Mac OS X doesn’t use the concept of “before” or “after”. Instead, there’s a currency formatting pattern which has the currency symbol metacharacter embedded in it. Please read the documentation on NSNumberFormatter for more information. Deborah Goldsmith Apple Inc. golds...@apple.com On Mar 4,

Re: Get my custom object from NSDictionary variable

2010-03-04 Thread Daniel Káčer
thank you very much ... This was the problem ! On Mar 5, 2010, at 0:57 , Thomas Wetmore wrote: You need to retain your member variables in the initializer. On Mar 4, 2010, at 6:48 PM, Daniel Káčer wrote: - (ComplexObject*)initWithFrom:(NSString*)_sValueFrom pairTo: (NSString*)_sValueTo {

Re: Get my custom object from NSDictionary variable

2010-03-04 Thread Graham Cox
On 05/03/2010, at 10:48 AM, Daniel Káčer wrote: > a add my custom object into NSDictionary variable in my application with > following code: > > [myDictionary setObject:[[ComplexObject alloc] initWithFrom:_tempFrom > pairTo:string] forKey:[NSString stringWithFormat:@"%d", [myDictionary > coun

Get my custom object from NSDictionary variable

2010-03-04 Thread Daniel Káčer
Hi, i solve the following problem: a add my custom object into NSDictionary variable in my application with following code: [myDictionary setObject:[[ComplexObject alloc] initWithFrom:_tempFrom pairTo:string] forKey:[NSString stringWithFormat:@"%d", [myDictionary count]]]; .. it seems,

Converting a Cocoa Application project to a document-based one

2010-03-04 Thread Josh de Lioncourt
Hi all, First the question, in essence, is: If one starts with a project built using the Cocoa Application template, what steps are involved in changing that existing project to what Xcode will recognize as a Cocoa Document-based application? The background: I'm using a customized template fo

Re: NSOutlineView: items can't be referenced with path?

2010-03-04 Thread Corbin Dunn
On Mar 4, 2010, at 1:20 PM, Laurent Daudelin wrote: > I've been using NSOutlineView in the past and know the need to provide a > unique identifier for "items" used by the outline view. > > I'm working on a WebDAV client and thought it would be a good idea to use the > full url of an item to id

Re: Interface Builder : moving a controller to File's Owner

2010-03-04 Thread Kyle Sluder
On Thu, Mar 4, 2010 at 1:45 PM, David Geldreich wrote: > I am refactoring one big NIB file into smaller pieces. I copy/paste a > WindowController object and a Window object in a new "empty" NIB. Window controllers don't belong in nibs. You create them in code and ask them to load a nib, at which

Re: How a window was closed?

2010-03-04 Thread Graham Cox
On 05/03/2010, at 12:39 AM, Eric Gorr wrote: > Now, there are other means that will cause the NSPanel to be closed with > different answers to whether or not it should be visible at the next launch. It's not clear to me why. You only need to record whether the panel is currently open or close

Interface Builder : moving a controller to File's Owner

2010-03-04 Thread David Geldreich
Hello, I am refactoring one big NIB file into smaller pieces. I copy/paste a WindowController object and a Window object in a new "empty" NIB. I end up having File's Owner First Responder Application WindowController Window I would like to move WindowController as File's Owner and keep all

-[NSManagedObject objectID]: unrecognized selector sent to class

2010-03-04 Thread Matt Bigarani
Hey all, I'm experiencing some weirdness with NSManagedObject. Basic background, I have an NSManagedObject 'surveyGroup', which has a to-many relationship to another NSManagedObject, surveyResults. I'm attempting to access the surveyResults object in two different methods. It works fine in the fi

Re: Uninitialized rectangle??

2010-03-04 Thread fabian
On Thu, Mar 4, 2010 at 8:10 PM, Steven Degutis wrote: > NSStatusItem's -view and -setView: methods are related to your own custom > view, and have nothing to do with the view it internally uses. Thus, it > initially has no view until you give it one. So, giving it a dummy view via > [statusItem se

Re: Tracing which objects get an event

2010-03-04 Thread Brian Postow
D'oh. Never mind. I was looking at the wrong method. It *IS* using the sent-actions. Brian Postow Senior Software Engineer Acordex Imaging Systems ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator

Re: Returning a useful error from NSDocument's -readFromURL:...

2010-03-04 Thread Keith Blount
Aha, found the solution to this one at last. Many thanks to Charles, Jerry and Quincey for the help and pointers, and apologies to Quincey if I overreacted to his reply - it's been one of those weeks where the code seems to be leading to even more code rather than making progress. Anyway, in cas

NSOutlineView: items can't be referenced with path?

2010-03-04 Thread Laurent Daudelin
I've been using NSOutlineView in the past and know the need to provide a unique identifier for "items" used by the outline view. I'm working on a WebDAV client and thought it would be a good idea to use the full url of an item to identify it. However, after I properly provide the path for items

Re: Sorting contents of an NSCollectionView

2010-03-04 Thread Eli Bach
On Mar 3, 2010, at 3:39 PM, Eli Bach wrote: > I have a core-data app, with a view that shows a managed object, along with > an NSCollectionView displaying related managed objects in 1 column, all > hooked together primarily with bindings. > > This works fine (selecting different objects automa

Re: PopupButtonCell in a TableView column

2010-03-04 Thread Matt Neuburg
On Thu, 04 Mar 2010 11:03:49 -0800, Lynn Barton said: >With a model entity of (let's say) MyData and an array controller of MyDataArrayController, and two properties myIntProperty and myStringProperty, the tableview works perfectly without the popup menu. In this case, the first column has a text

Tracing which objects get an event

2010-03-04 Thread Brian Postow
I'm writing a mozilla plugin on the mac. I'm trying to capture events like button clicks, etc. I've done the normal thing of creating my views in inteface builder, and linking the sentActions to methods in my program. This works in stand-alone programs. However, in my NPAPI plugin, those method

Dealing with glyphs that draw outside their NSTextView

2010-03-04 Thread Ross Carter
In a new TextEdit "Wrap to Page" document, change the font to Zapfino and type a lowercase f. The left swash is cut off. I would like to draw the entire glyph, as Pages does (and I am aware that Pages does not use NSTextView). It's easy enough to draw the entire glyph by sending -lockFocus to th

Re: NSImageRep simple code

2010-03-04 Thread Ken Ferry
This is true, and was true on 10.5 (and 10.4) as well though the timing has changed some. The AppKit release notes have commentary on it. This is a bit of an API problem. In order to draw a bitmap in Quartz, the data must be packaged as a CGImage, which is immutable. This means the client and A

Re: Uninitialized rectangle??

2010-03-04 Thread Steven Degutis
NSStatusItem's -view and -setView: methods are related to your own custom view, and have nothing to do with the view it internally uses. Thus, it initially has no view until you give it one. So, giving it a dummy view via [statusItem setView: [[[NSView alloc] init] autorelease] ] is going to allow

PopupButtonCell in a TableView column

2010-03-04 Thread Lynn Barton
I am trying to display my model data in an NSTableView where one integer property is represented by a popup menu in the first column of the table. I have searched the archives and seen that some others have done the same and asked for assistance, but none of the answers I found were complete eno

Re: Uninitialized rectangle??

2010-03-04 Thread fabian
On Thu, Mar 4, 2010 at 7:47 PM, Steven Degutis wrote: > Right. Have you tried the solution I proposed in the /very first reply/ to > this thread? > > -Steven > > Actually, no. I don't have 10.5.8, so I would have to send it to one of the end-users to try, and I feel hesitant to bother a customer w

Re: Private ivars, not marked as IBOutlet, visible in IB

2010-03-04 Thread Joanna Carter
Le 4 mars 2010 à 16:31, Lynn Barton a écrit : > Buck and Yacktman's book Cocoa Design Patterns says on page 208, "Any > instance variable with type id and a name that doesn't start with an > underscore character is automatically considered an outlet." That is understandable... if the ivars hav

Re: Uninitialized rectangle??

2010-03-04 Thread Steven Degutis
Right. Have you tried the solution I proposed in the /very first reply/ to this thread? -Steven On Thu, Mar 4, 2010 at 1:05 PM, fabian wrote: > On Thu, Mar 4, 2010 at 6:50 PM, Steven Degutis > wrote: > >> Are you sure that your NSStatusBar or NSStatusItem instances are nil, and >> not just wha

Re: Help Book Icon in Xcode 3.2

2010-03-04 Thread Matt Neuburg
On Wed, 3 Mar 2010 11:02:50 -0800, Kyle Sluder said: >On Mar 3, 2010, at 10:34 AM, Gabriel Fernandez > wrote: > >> why don't YOU read that documentation and try it out? I wouldn't >> have asked if I didn't already search the archives, and oh yeah, >> forgot about GOOGLE! Smart-guy. > >You made no

Re: Messaging Cocoa apps through Terminal

2010-03-04 Thread Jeffrey Oleander
> On Wed, 2010/03/03, Matt Neuburg wrote: > From: Matt Neuburg > Subject: Re: Messaging Cocoa apps through Terminal > To: "Ulai Beekam" > Cc: cocoa-dev@lists.apple.com > Date: Wednesday, 2010 March 03, 13:02 >> On Wed, 2010 Mar 03 16:17:13 +, >> Ulai Beekam >> said: >>get the point. Just so

Re: How a window was closed?

2010-03-04 Thread Eric Gorr
On Mar 4, 2010, at 12:49 PM, Kyle Sluder wrote: > // Warning, typed in mail. Probably won't work. > @interface MyPanel : NSPanel { > BOOL saveVisibility; > } > > @implementation MyPanel > - (void)writePreferredVisibilityToUserDefaults:(BOOL)shouldBeVisible { > // ... > } > > - (void)orderWind

Re: Anti-aliasing in Snow Leopard (10.6) PDFView

2010-03-04 Thread Duncan McGregor
And thanks from me too. Creative inertia triumphs once again ;-) Duncan On 4 Mar 2010, at 17:43, Andy Mroczkowski wrote: > Thanks Keith, that worked perfectly. > > On Thu, Mar 4, 2010 at 12:28 PM, Keith Blount wrote: ...___ Cocoa-dev mailing list (

Re: Uninitialized rectangle??

2010-03-04 Thread fabian
On Thu, Mar 4, 2010 at 6:50 PM, Steven Degutis wrote: > Are you sure that your NSStatusBar or NSStatusItem instances are nil, and > not just what's returned from -view? I see no reason that it should be nil, > and no proof that it is. (To be fair, I only skimmed this mess of a thread.) > > -Steven

Re: Debugging problem

2010-03-04 Thread Laurent Daudelin
On Mar 4, 2010, at 08:17, Jens Alfke wrote: > > On Mar 3, 2010, at 7:24 PM, Laurent Daudelin wrote: > >> I also set a future break on [NSException raise] but it's doesn't break on >> that call. > > In recent OS's some exceptions don't go through that bottleneck (such as ones > raised by CoreF

Re: NSImageRep simple code

2010-03-04 Thread John Horigan
It would be a good idea to modify the pixel buffer before calling initWithBitmapDataPlanes. NSBitmapImageRep makes no guarantee that changes to the data planes will be picked up by the NSBitmapImageRep after the call to initWithBitmapDataPlanes. It seems to work with OSX 10.5 and earlier, but Sn

Re: Uninitialized rectangle??

2010-03-04 Thread Steven Degutis
Are you sure that your NSStatusBar or NSStatusItem instances are nil, and not just what's returned from -view? I see no reason that it should be nil, and no proof that it is. (To be fair, I only skimmed this mess of a thread.) -Steven On Thu, Mar 4, 2010 at 12:05 PM, fabian wrote: > On Thu, Mar

Re: How a window was closed?

2010-03-04 Thread Kyle Sluder
On Thu, Mar 4, 2010 at 5:39 AM, Eric Gorr wrote: > The only method (currently) for closing the panel which seems difficult to > determine is whether or not the user has clicked in the close (red) button. > However, it does appear that -windowShouldClose: is the easiest way to do it. It might be

Re: Uninitialized rectangle??

2010-03-04 Thread fabian
On Thu, Mar 4, 2010 at 6:35 PM, Kyle Sluder wrote: > On Thu, Mar 4, 2010 at 9:05 AM, fabian wrote: > > It's in -applicationDidFinishLaunching. Which works great on all systems > (as > > far as I know), except for on 10.5.8 where NSStatusBar is still nil at > this > > point. That's what I'm tryin

Re: Anti-aliasing in Snow Leopard (10.6) PDFView

2010-03-04 Thread Andy Mroczkowski
Thanks Keith, that worked perfectly. On Thu, Mar 4, 2010 at 12:28 PM, Keith Blount wrote: > Not sure if this is the same thing, but I recently ran into something similar > - a scanned-in newspaper looked terrible and grainy in my app, although > Preview handled it smoothly. The solution was to

Re: Uninitialized rectangle??

2010-03-04 Thread Kyle Sluder
On Thu, Mar 4, 2010 at 9:05 AM, fabian wrote: > It's in -applicationDidFinishLaunching. Which works great on all systems (as > far as I know), except for on 10.5.8 where NSStatusBar is still nil at this > point. That's what I'm trying to find a work-around for. >From the -[NSApplication finishLau

Re: Anti-aliasing in Snow Leopard (10.6) PDFView

2010-03-04 Thread Keith Blount
Not sure if this is the same thing, but I recently ran into something similar - a scanned-in newspaper looked terrible and grainy in my app, although Preview handled it smoothly. The solution was to override -drawPage: in a PDFView subclass and set it to use high interpolation if anti-aliasing i

Re: Anti-aliasing in Snow Leopard (10.6) PDFView

2010-03-04 Thread Andy Mroczkowski
Here is a screenshot showing Preview vs PDFLinker2: http://dl.dropbox.com/u/45634/PDFView-AntiAlias-Issue/PreviewVsPDFView.png Here is a PDF that exhibits this problem: http://dl.dropbox.com/u/45634/PDFView-AntiAlias-Issue/PDFView-AntiAlias-Example.pdf Thank you for your time. - Andy On Tue, Sep

Re: Uninitialized rectangle??

2010-03-04 Thread fabian
On Thu, Mar 4, 2010 at 5:28 PM, Jens Alfke wrote: > > On Mar 4, 2010, at 12:42 AM, fabian wrote: > > > Right. But why should it matter? The system status bar is not in the nib. > Just curious about what is going on behind the scenes... > > The status bar is in the menu bar, and the menu bar is in

Re: Private ivars, not marked as IBOutlet, visible in IB

2010-03-04 Thread Lynn Barton
Buck and Yacktman's book Cocoa Design Patterns says on page 208, "Any instance variable with type id and a name that doesn't start with an underscore character is automatically considered an outlet." Lynn ___ Cocoa-dev mailing list (Cocoa-dev@lists.ap

Re: Anti-aliasing in Snow Leopard (10.6) PDFView

2010-03-04 Thread Duncan McGregor
On 4 Mar 2010, at 16:25, Andy Mroczkowski wrote: > I just encountered this same problem with PDFView on 10.6. The same > code works fine on 10.5. > > Did you ever find a solution? Or is there a bug I can reference? Sorry, it turned out to be not high on my list of problems around that time, so

Re: Uninitialized rectangle??

2010-03-04 Thread Jens Alfke
On Mar 4, 2010, at 12:42 AM, fabian wrote: > Right. But why should it matter? The system status bar is not in the nib. > Just curious about what is going on behind the scenes... The status bar is in the menu bar, and the menu bar is in the same nib as your app controller. The status bar probab

Re: Anti-aliasing in Snow Leopard (10.6) PDFView

2010-03-04 Thread Andy Mroczkowski
I just encountered this same problem with PDFView on 10.6. The same code works fine on 10.5. Did you ever find a solution? Or is there a bug I can reference? On Mon, Sep 7, 2009 at 5:50 PM, Duncan McGregor wrote: > It used to be that PDFView anti-aliased nicely. Now it doesn't, at > least not f

Re: Debugging problem

2010-03-04 Thread Jens Alfke
On Mar 3, 2010, at 7:24 PM, Laurent Daudelin wrote: > I also set a future break on [NSException raise] but it's doesn't break on > that call. In recent OS's some exceptions don't go through that bottleneck (such as ones raised by CoreFoundation.) The bottleneck to break on is objc_exception_th

Re: xcode-debug style toolbar above editor area

2010-03-04 Thread Joar Wingfors
Hello Mazen, You're correct - NSToolbar can only be used at the top of a window. If you want to create something that is similar to a toolbar for anywhere else you will have to make your own arrangement of controls just like you originally suggested. j o a r On 3 mar 2010, at 12.41, Mazen M.

Re: Returning a useful error from NSDocument's -readFromURL:...

2010-03-04 Thread Keith Blount
Thanks for your reply. I do appreciate it, although it is a shame that you feel the need to be so rude and spoil someone's day. I apologise if my message came across as a "ragedump and rant". I'm not quite sure why it came across that way to you, as I don't think that's what it was at all. I quo

Re: Debugging problem

2010-03-04 Thread Keary Suska
On Mar 3, 2010, at 8:24 PM, Laurent Daudelin wrote: > I'm trying to debug a problem where an NSOutlineView, as part of a drag, > tries to create an instance of NSURL using "- (id)initWithString:(NSString > *)URLString relativeToURL:(NSURL *)baseURL" with a nil string and get the > following err

Re: How a window was closed?

2010-03-04 Thread Eric Gorr
On Mar 3, 2010, at 4:30 PM, Graham Cox wrote: > > On 04/03/2010, at 3:50 AM, Eric Gorr wrote: > >> Unfortunately, that knowledge won't help me solve the problem in front of me > > But it might help if you told us what the problem in front of you actually > was. A simple and obvious solution m

Re: Returning a useful error from NSDocument's -readFromURL:...

2010-03-04 Thread Keith Blount
Many thanks both for your replies. As it happens, I need to slap my own forehead for stupidity. I mentioned in my e-mail that returning an error with NSLocalizedDescriptionKey and NSLocalizedRecoverySuggestionErrorKey "used to work", and then foolishly assumed it had been an update in Snow Leop

Re: NSSegmentedControl select multiple cells

2010-03-04 Thread Hado Hein
Florian Soenens wrote: > how to select multiple. In IB there is an 'selection' option in the attributes inspector for the behaviour. Set it from momentary to multiple. Afterwards you have to handle that in your code like: if ( [control isSelectedForSegment:3] ) and the like. -- Hado Hein

Re: NSSegmentedControl select multiple cells

2010-03-04 Thread jonat...@mugginsoft.com
On 4 Mar 2010, at 10:50, Florian Soenens wrote: > Hi Jonathan, > > i just discovered the same thing, my control is Textured Rounded and doesn't > work, Regular Rounded seems to work fine. > Should i file a bug? > Hard to know if this is a bug or just a variant behaviour by design. Have you che

Re: NSSegmentedControl select multiple cells

2010-03-04 Thread Florian Soenens
Hi Jonathan, i just discovered the same thing, my control is Textured Rounded and doesn't work, Regular Rounded seems to work fine. Should i file a bug? On 04 Mar 2010, at 11:47, jonat...@mugginsoft.com wrote: > A 10 sec 10.6 demo project - 1 window + 1 NSSegmentedControl - shows this is > pos

Re: NSSegmentedControl select multiple cells

2010-03-04 Thread jonat...@mugginsoft.com
A 10 sec 10.6 demo project - 1 window + 1 NSSegmentedControl - shows this is possible. However, behaviour seems to vary depending on the style of the control. The textured rounded style seems to like to do its own thing. Other styles are more well behaved. Regards Jonathan Mitchell Developer h

Re: NSLocale and currency symbols

2010-03-04 Thread jonat...@mugginsoft.com
On 4 Mar 2010, at 09:51, Frank Illenberger wrote: > Hi, > > under Mac OS 10.6, an NSLocale seems to contain the information whether a > currency symbol should be put before the amount or behind it, like in > $100.00, or 100,00€. > Sadly, I was not able to find a way to specify this using the

Re: NSSegmentedControl select multiple cells

2010-03-04 Thread Florian Soenens
No bindings, not even the enabled binding. I was even wondering if it is uberhaupt possible to select multiple cells in a NSSegmentedControl? On 04 Mar 2010, at 10:43, jonat...@mugginsoft.com wrote: > > On 4 Mar 2010, at 09:28, Florian Soenens wrote: > >> Hi List, >> >> i googled this but fou

NSLocale and currency symbols

2010-03-04 Thread Frank Illenberger
Hi, under Mac OS 10.6, an NSLocale seems to contain the information whether a currency symbol should be put before the amount or behind it, like in $100.00, or 100,00€. Sadly, I was not able to find a way to specify this using the NSLocale/CFLocale APIs. Is this a private piece of information?

Re: NSSegmentedControl select multiple cells

2010-03-04 Thread jonat...@mugginsoft.com
On 4 Mar 2010, at 09:28, Florian Soenens wrote: > Hi List, > > i googled this but found nothing relevant. > I want a segmented control with 6 cells that instead of acting like radio > buttons, they should act as checkboxes, that is, multiple cells should be > selected. > I tried to set the mod

NSSegmentedControl select multiple cells

2010-03-04 Thread Florian Soenens
Hi List, i googled this but found nothing relevant. I want a segmented control with 6 cells that instead of acting like radio buttons, they should act as checkboxes, that is, multiple cells should be selected. I tried to set the mode to "select any" in IB but no no avail. Also tried setting the

Re: Returning a useful error from NSDocument's -readFromURL:...

2010-03-04 Thread Quincey Morris
On Mar 3, 2010, at 13:52, Keith Blount wrote: > Okay, I know this comes up a lot, but I can't find a single page with a > satisfactory solution. Please feel free to post nothing but a link with the > solution if I have missed the bloomin’ obvious, of course - this question has > been asked here

Re: Uninitialized rectangle??

2010-03-04 Thread fabian
On Thu, Mar 4, 2010 at 12:38 AM, Jens Alfke wrote: > > On Mar 3, 2010, at 3:00 PM, fabian wrote: > > Thanks for your replies. I understand that the -frame message is returning >> garbage. What I don't understand is why statusBar, statusItem or the >> statusItem's view is nil during (but not afte