RE: Adding text to NSImage using lockFocus/unlockFocus not working

2009-02-25 Thread Ashish Tiwari
I am sorry for typo, actually only images are shown *without titles. I want to see image as well as their title. Mean while I added your imageAttributes in IKBrowserItem.m with no luck. I put various NSLog and looked in console to find out that imageTitle, imageSubtitle, imageAttributes are not ge

{Solved]: Adding text to NSImage using lockFocus/unlockFocus not working

2009-02-25 Thread Ashish Tiwari
I just figured it out, everything was ok with code the problem was at Interface Builder. I had not checked title and subtitle properties of IKImageBrowserView at Interface builder. Once I did so all methods that were not being called got called and image with title appeared at ImageBrowserView. Th

Re: Strange NSManagedObjectContextObjectsDidChangeNotification behavior

2009-02-25 Thread Jerry Krinock
On 2009 Feb 24, at 21:17, Karolis Ramanauskas wrote: Any thoughts? I downloaded your project and inserted the code that I gave you yesterday into your -[MyView doSomething] method. From the log, I then learned that the Fruit I inserted was being updated. Here's what happens: 1.

ssl certificate validation

2009-02-25 Thread SridharRao M
Hi All,I need to connect to a a service that uses certificate based authentication over SSL. They provided a certificate that i need to validate before sending requests to their server. I found a method "+ (BOOL)allowsAnyHTTPSCertificateForHost:(NSString*)host;" to ignore ssl certificate errors.

Observing Managed Object Changes. Was: Strange ... behavior

2009-02-25 Thread Jerry Krinock
On 2009 Feb 24, at 20:02, Dave Fernandes wrote: I can't say I have the ideal solution, and I am also using KVO, but one might want to heed Ben Trumbull's warning before going down this path... Complex KVO observer actions need to be carefully constrained. If they simply grow organicall

RE: [Q] What causes an NSArrayController to know that an entity was inserted via a different window?

2009-02-25 Thread Jon C. Munson II
After a clearer head/mind (yeah, verily, I was crapheaded yesterday), much Crow & Humble Pie for breakfast, much thinking, and much observation (especially after Jerry Krinock's post on thread re: Strange NSManagedObjectContextObjectsDidChangeNotification behavior), and in my case, I decided th

Re: Stop edit session with a NSTextField

2009-02-25 Thread Eric Gorr
Hello Patrick, On Feb 25, 2009, at 12:38 AM, Patrick Mau wrote: I was going through your last messages on this list, because I'm working on a similar problem. Reading through the code snippets you showed here, it isn't clear to me how your controls are being created. I have a XIB with a NS

Re: Strange NSManagedObjectContextObjectsDidChangeNotification behavior

2009-02-25 Thread Karolis Ramanauskas
>Lesson: Don't change model data in a -draw method. I really can't think of >any reason why you'd want to do this. -draw is for drawing. Yes, perhaps, but I have to change it, perhaps not in a draw method itself, but in another method that get's called before it. In my real program I have one,

Re: [Q] What causes an NSArrayController to know that an entity was inserted via a different window?

2009-02-25 Thread I. Savant
On Wed, Feb 25, 2009 at 9:43 AM, Jon C. Munson II wrote: > While it would be nice to actually see if a certain attribute got updated This is where a thorough understanding of KVC/KVO (with emphasis on the KVO part) comes in. I'll point you to mmalc's examples: http://homepage.mac.com/mmalc/Co

Running Cocoa applications from file servers

2009-02-25 Thread Erik Buck
There is a interesting but long rant about software installers at http://www.bynkii.com/archives/2009/02/on_installers.html.  Most of the rant is about problems with "pushing" applications to remote client computers.   I'll try to keep this Cocoa related:  All of the applications I develop are C

RE: [Q] What causes an NSArrayController to know that an entity was inserted via a different window?

2009-02-25 Thread Jon C. Munson II
Thanks for that, I will take a look at it, and study it, and study it some more... Peace, Love, and Light, /s/ Jon C. Munson II > -Original Message- > From: I. Savant [mailto:idiotsavant2...@gmail.com] > Sent: Wednesday, February 25, 2009 10:36 AM > To: jmun...@his.com > Cc: cocoa-dev >

Re: Stop edit session with a NSTextField

2009-02-25 Thread Andy Lee
On Feb 24, 2009, at 6:08 PM, Eric Gorr wrote: *** [[[self view] window] makeFirstResponder:[self view]]; Pressing return will allow the editing session to end, but pressing the tab key will not Looks like controlTextDidEndEditing: is too deep within the text field's event handling to muck

willAnimateFirstHalfOfRotationToInterfaceOrientation not called...

2009-02-25 Thread Oscar Alejandro Alvarado Prieto
Hi, I need swap views when changing from landsacpe to portrait and viceversa. The problem is that willAnimateFirstHalfOfRotationToInterfaceOrientation is not called. Of course I return YES from shouldAutorotateToInterfaceOrientation. I guess the problem should be at nib file but i can't find it. T

Re: Strange NSManagedObjectContextObjectsDidChangeNotification behavior

2009-02-25 Thread Jerry Krinock
On 2009 Feb 25, at 06:55, Karolis Ramanauskas wrote: Lesson: Don't change model data in a -draw method. I really can't think of any reason why you'd want to do this. -draw is for drawing. Yes, perhaps, but I have to change it, perhaps not in a draw method itself, but in another method t

Subclassing with more restrictive initializers

2009-02-25 Thread Andy Klepack
I've run up against this situation more than once and I'd be interested in any opinions and best-practices out there. I have a class that has one or more initializers that accept parameters. The class also has behavior. I want to implement a second class that has the behavior of the first in a

Re: Adding text to NSImage using lockFocus/unlockFocus not working

2009-02-25 Thread Michael Ash
On Tue, Feb 24, 2009 at 5:50 AM, Ashish Tiwari wrote: > //NSImage *img = [[NSImage > alloc]initWithContentsOfFile:@"/Users/ashisht/Desktop/downloads.png"]; ... >  [img lockFocus]; Don't try to create an image and then draw into it in this way. You're likely to end up with multiple NSImageReps onl

Re: do i need to create autorelease pool?

2009-02-25 Thread Michael Ash
On Wed, Feb 25, 2009 at 12:00 AM, Peter N Lewis wrote: >> The Application Kit creates an autorelease pool on the main thread at the >> beginning of every cycle of the event loop, and drains it at the end, >> thereby releasing any autoreleased objects generated while processing an >> event. > > Thi

Gamma problem (?) with CIFilter output

2009-02-25 Thread Shamyl Zakariya
Hi, If this should be posted to another list let me know, but I didn't see a Core Image list, so I figured Cocoa might be a good catch-all. Anyway, I'm writing my first Core Image filter, a simple bump-map to tangent-space-normalmap filter. I've done this in GLSL before, and I've even don

Re: Running Cocoa applications from file servers

2009-02-25 Thread I. Savant
On Wed, Feb 25, 2009 at 10:43 AM, Erik Buck wrote: > Where did the fetish for installing every single application on the local > hard disk come from ?  Isn't it insane to have 35 installed copies of > OmniGraffle using up disk space just because you have 35 licenses ?  Why is > MS Word on ever

Re: Subclassing with more restrictive initializers

2009-02-25 Thread Michael Ash
On Wed, Feb 25, 2009 at 11:39 AM, Andy Klepack wrote: > To make things more concrete (this isn't the actual case I've run into, but > it's a similar, simpler illustration) consider a class "File" that has an > initializer 'initWithPath:' and behavior 'delete', 'rename', etc. Then > consider wan

Re: NSDate And Super Class

2009-02-25 Thread Richard Good
Thanks for looking at the code. I tried to simplify things for the example so I removed as much as possible (maybe too much) that I thought was not directly relevant. However making all of your suggested changes and maybe an extra retain or two, still yields an "Out of scope" problem in

Re: Subclassing with more restrictive initializers

2009-02-25 Thread Andy Lee
This is a variation of the Square-Circle problem, aka Circle-Ellipse: You have a class that conceptually is a refinement

Re: Stop edit session with a NSTextField

2009-02-25 Thread Eric Gorr
Hi Andy, On Feb 25, 2009, at 11:14 AM, Andy Lee wrote: On Feb 24, 2009, at 6:08 PM, Eric Gorr wrote: *** [[[self view] window] makeFirstResponder:[self view]]; Pressing return will allow the editing session to end, but pressing the tab key will not Looks like controlTextDidEndEditing: is

Re: NSDate And Super Class

2009-02-25 Thread Andy Lee
On Feb 25, 2009, at 12:03 PM, Richard Good wrote: Thanks for looking at the code. I tried to simplify things for the example so I removed as much as possible (maybe too much) that I thought was not directly relevant. However making all of your suggested changes and maybe an extra retain o

Re: Subclassing with more restrictive initializers

2009-02-25 Thread Andy Lee
On Feb 25, 2009, at 12:16 PM, Andy Lee wrote: This is a variation of the Square-Circle problem, aka Circle-Ellipse: I meant Square-Rectangle, of course. --Andy ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin request

Re: NSDate And Super Class

2009-02-25 Thread Andy Lee
On Feb 25, 2009, at 12:28 PM, Andy Lee wrote: On Feb 25, 2009, at 12:03 PM, Richard Good wrote: Thanks for looking at the code. I tried to simplify things for the example so I removed as much as possible (maybe too much) that I thought was not directly relevant. However making all of your

Re: Responding to view controller memory warnings (was Re: Outlets / IBOutlet declarations)

2009-02-25 Thread Frédéric Testuz
Le 25 févr. 09 à 00:44, Jonathan Hess a écrit : On Feb 20, 2009, at 1:05 AM, Alexander Spohr wrote: Am 20.02.2009 um 04:18 schrieb mmalc Crawford: On Feb 19, 2009, at 12:34 PM, mmalc Crawford wrote: See also updated:

Re: Responding to view controller memory warnings (was Re: Outlets / IBOutlet declarations)

2009-02-25 Thread mmalc Crawford
mmalc ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or mode

Re: Strange NSManagedObjectContextObjectsDidChangeNotification behavior

2009-02-25 Thread Karolis Ramanauskas
> Is locationY the model attribute which you "have to" change? If so, I > suggest that this is not rightfully a model or managed object attribute. > Obviously, it's more of a 'view' thing than a 'model' thing. Remove it > from your data model. Make it a regular instance variable instead or, > b

Re: do i need to create autorelease pool?

2009-02-25 Thread Memo Akten
Ah ok, thats what I wasn't sure about, whether or not the pool would be released after every timer update. So if no events come in for a few seconds, I"ll have my runloops autorelease pool swelling up - which is not desired. My solution of creating my own autorelease pool before all app upd

RE: Subclassing with more restrictive initializers

2009-02-25 Thread Andy Klepack
Ah, it looks like I'm in good company :) Thanks for the references! -Andy -Original Message- From: Andy Lee [mailto:ag...@mac.com] Sent: Wednesday, February 25, 2009 9:16 AM To: Andy Klepack Cc: Cocoa-dev@lists.apple.com Subject: Re: Subclassing with more restrictive initializers This

Re: Stop edit session with a NSTextField

2009-02-25 Thread Eric Gorr
On Feb 25, 2009, at 12:20 PM, Eric Gorr wrote: On Feb 25, 2009, at 11:14 AM, Andy Lee wrote: On Feb 24, 2009, at 6:08 PM, Eric Gorr wrote: *** [[[self view] window] makeFirstResponder:[self view]]; Pressing return will allow the editing session to end, but pressing the tab key will not

Re: Running Cocoa applications from file servers

2009-02-25 Thread Kyle Sluder
On Wed, Feb 25, 2009 at 11:48 AM, I. Savant wrote: >  ... because network interruptions (especially intermittent ones) can > wreak havoc on your running apps. :-) That's my main reason. How so? Resource loading? I guess it was less of an issue back in the NeXT days. But I've got ten machines i

Re: Running Cocoa applications from file servers

2009-02-25 Thread I. Savant
On Wed, Feb 25, 2009 at 11:48 AM, I. Savant wrote: > On Wed, Feb 25, 2009 at 10:43 AM, Erik Buck wrote: > >> Where did the fetish for installing every single application on the local >> hard disk come from ?  Isn't it insane to have 35 installed copies of >> OmniGraffle using up disk space just

Re: Subclassing with more restrictive initializers

2009-02-25 Thread Quincey Morris
On Feb 25, 2009, at 08:39, Andy Klepack wrote: Should PreferenceFile inherit from File despite the initialize behavior being undesirable? Is composition somehow more appropriate? Is this confusion the result of thinking about the problem from the wrong direction? Any advice about how to t

NSTableView Cell edit values.

2009-02-25 Thread Totte Alm
Hello cocoa experts, I've stumbled on a problem with a GUI, where the user can edit values using a NSTableView, but if the user types something in a cell, then click the "do stuff" button while the cell is still in editmode, the current change is not propagated back to underlying object.

Re: Running Cocoa applications from file servers

2009-02-25 Thread I. Savant
On Wed, Feb 25, 2009 at 1:16 PM, Kyle Sluder wrote: > How so?  Resource loading?  I guess it was less of an issue back in > the NeXT days.  But I've got ten machines in my lab, and an Xserve > serving out /Network/Library... why can't I use /Network/Applications > and have it Just Work(TM)? We

Re: NSTableView Cell edit values.

2009-02-25 Thread Corbin Dunn
Le Feb 25, 2009 à 10:44 AM, Totte Alm a écrit : Hello cocoa experts, I've stumbled on a problem with a GUI, where the user can edit values using a NSTableView, but if the user types something in a cell, then click the "do stuff" button while the cell is still in editmode, the current cha

Re: Subclassing with more restrictive initializers

2009-02-25 Thread Paul Sanders
My solution would be to cover *all* inherited initialisers and assert in any not supported by the subclass. The idea, surely, is to catch any programming errors as early as possible. Not covering an initialiser which, if called, would lead to unpredictable results seems to me to be taking an

Re: Running Cocoa applications from file servers

2009-02-25 Thread Jonathan Hendry
On Feb 25, 2009, at 11:48 AM, I. Savant wrote: On Wed, Feb 25, 2009 at 10:43 AM, Erik Buck wrote: Where did the fetish for installing every single application on the local hard disk come from ? Isn't it insane to have 35 installed copies of OmniGraffle using up disk space just because

Re: NSTableView Cell edit values.

2009-02-25 Thread Totte Alm
hello, thx for the fast answer, but it seems to be more to it. The "save" is done in a IBAction, trigged by a button. I moved all save code from that method to another method, and set an NSTimer to call that mathod, and before that I told the the Window to set the focus. The problem is tha

Re: Observing Managed Object Changes. Was: Strange ... behavior

2009-02-25 Thread Quincey Morris
On Feb 25, 2009, at 05:31, Jerry Krinock wrote: On 2009 Feb 24, at 20:02, Dave Fernandes wrote: ... I'm only just getting familiar with the idiosyncrasies of Leopard, however, in Tiger didTurnIntoFault might be called many times, but awakeFromInsert or awakeFromFetch was only called once

Re: Responding to view controller memory warnings (was Re: Outlets / IBOutlet declarations)

2009-02-25 Thread Frédéric Testuz
Le 25 févr. 09 à 18:37, mmalc Crawford a écrit : mmalc OK, thank you Frédéric ___ Cocoa-dev mailin

Re: Running Cocoa applications from file servers

2009-02-25 Thread Michael Ash
On Wed, Feb 25, 2009 at 1:21 PM, I. Savant wrote: >  I was rushing off to a meeting, but I wanted to expand on this a > bit. Most complicated applications won't be loading all their > resources when they're launched (if they're worth a damn, that is), so > consider what would happen if, as happene

-[_NSControllerObjectProxy entity]: unrecognized selector sent to instance

2009-02-25 Thread Daniel Child
Hi All, I am trying to add an object in a to-many relationship and get this error: -[_NSControllerObjectProxy entity]: unrecognized selector sent to instance The object I'm adding was obtained by using NSManagedObject *theWord = [wordList selection] This yields a proxy object instead of

Re: NSTableView Cell edit values.

2009-02-25 Thread Corbin Dunn
I can tell you for sure that resigning the first responder will make it happen. Maybe something else is wrong in your code. I can't tell without more information. corbin Le Feb 25, 2009 à 11:19 AM, Totte Alm a écrit : hello, thx for the fast answer, but it seems to be more to it. The "sa

Re: Running Cocoa applications from file servers

2009-02-25 Thread Quincey Morris
On Feb 25, 2009, at 10:54, I. Savant wrote: On Wed, Feb 25, 2009 at 1:16 PM, Kyle Sluder wrote: How so? Resource loading? I guess it was less of an issue back in the NeXT days. But I've got ten machines in my lab, and an Xserve serving out /Network/Library... why can't I use /Network/App

[Q] SQLite corruption issue[?] and how to avoid[?]

2009-02-25 Thread Jon C. Munson II
Namaste! I have a niggling problem that isn't repeatable, nor consistent, but seems to occur only when my application starts up. That problem is various SQLite errors when an attempt is made to get to the database. While I'm not sure *when* this happens exactly, I'm guessing it happens either in

Re: -[_NSControllerObjectProxy entity]: unrecognized selector sent to instance

2009-02-25 Thread Kyle Sluder
On Wed, Feb 25, 2009 at 2:43 PM, Daniel Child wrote: > The object I'm adding was obtained by using > NSManagedObject *theWord = [wordList selection] > This yields a proxy object instead of an MO. (Does anyone know why?) Read the documentation for -[NSObjectController selection]. It's right there

Re: NSTableView Cell edit values.

2009-02-25 Thread Totte Alm
Hello, 25 feb 2009 kl. 19.58 skrev Corbin Dunn: Make the field editor resign first responder status; if it did successfully do that, then the change was committed. If not, a validation error happened. IE: [self.window makeFirstResponder:tableView]; I might be doing this part wrong This

Re: Metrics for a NSTextField

2009-02-25 Thread Eric Gorr
Hello Martin, Martin Wierschin wrote: > Hi Eric, > > > NSTextView *fieldEditor = (NSTextView*)[[self window] fieldEditor:YES > > forObject:self]; > > NSRect usedRect = [[fieldEditor layoutManager] > >usedRectForText

Re: Gamma problem (?) with CIFilter output

2009-02-25 Thread Shamyl Zakariya
Well, with some experimentation I solved it by creating a CIContext with a device rgb color space... my initial perusal of the CIContext docs didn't make it immediately obvious to me that I could create a CIContext from the current NSGraphicsContext displayPort. On Feb 25, 2009, at 11:47

Re: Gamma problem (?) with CIFilter output

2009-02-25 Thread Kyle Sluder
On Wed, Feb 25, 2009 at 11:47 AM, Shamyl Zakariya wrote: > If this should be posted to another list let me know, but I didn't see a > Core Image list, so I figured Cocoa might be a good catch-all. quartz-dev might be your best bet. --Kyle Sluder ___ C

Re: Observing Managed Object Changes. Was: Strange ... behavior

2009-02-25 Thread Jerry Krinock
On 2009 Feb 25, at 11:24, Quincey Morris wrote: I'm not making any absolute assertions here, but this doesn't seem right to me. If 'awakeFromFetch' isn't called when an object is faulted in, then transient properties (for example) could never be worth a damn. I couldn't see anything in the

Re: Cocoa Support for Mail

2009-02-25 Thread Damien Cooke
All, I need to send email from my app. I have chosen EDMessage and added the frameworks to my project but it fails with error 5 can not find the EDCommon image. So I am told this is because the frameworks are designed to be embedded within the project. This is what I need some help with.

Re: Running Cocoa applications from file servers

2009-02-25 Thread I. Savant
On Wed, Feb 25, 2009 at 2:41 PM, Michael Ash wrote: > Note that there's no need to add the qualifier "most complicated" > here. *All* applications load resources lazily, simply because OS X > uses memory-mapped executables. I thought I remembered reading this, but I couldn't remember and was t

Re: NSTableView Cell edit values.

2009-02-25 Thread Corbin Dunn
On Feb 25, 2009, at 12:14 PM, Totte Alm wrote: Hello, 25 feb 2009 kl. 19.58 skrev Corbin Dunn: Make the field editor resign first responder status; if it did successfully do that, then the change was committed. If not, a validation error happened. IE: [self.window makeFirstResponder:tab

IKFilterUIView binding?

2009-02-25 Thread Albert Martin
I am having trouble getting an IKFilterUIView to bind to it's CIFilter. I don't get any compile or runtime errors, but when I'm editing the settings in the IKFilterUIView it doesn't update the CIFilter settings that are being applied to a CALayer. Here's the code ... what am I doing wrong

Re: NSTableView Cell edit values.

2009-02-25 Thread Totte Alm
25 feb 2009 kl. 22.29 skrev Corbin Dunn: On Feb 25, 2009, at 12:14 PM, Totte Alm wrote: Hello, 25 feb 2009 kl. 19.58 skrev Corbin Dunn: Make the field editor resign first responder status; if it did successfully do that, then the change was committed. If not, a validation error happene

makeKeyAndOrderFront Crashing

2009-02-25 Thread Walker Argendeli
My app has a toolbar, and I recently added a panel. Then, I put a new button in the toolbar, and set its action makeKeyAndOrderFront: on the new panel. Problem is, the moment I make this connection, the app goes haywire. When I launch the app, both main window and new panel appear. If I

gui development without using xcode or interface builder

2009-02-25 Thread nukala seetaiah baba
Needed suggestions: how to develop gui application using cocoa frameworks and objective- c without using interface builder or xcode tools. thanks in advance _ For the freshest Indian Jobs Visit MSN Jobs http://www.in.msn.com/jobs___

Select tablecell on creation through arrayController

2009-02-25 Thread Walker Argendeli
I have a table with one column, that's bound to an array controller. It calls add: on the array controller when I hit a plus button. Problem is, I want the textFieldCell to be selected on creation. I rewired the plus button to call a method in a custom class. The first thing the custom

Re: gui development without using xcode or interface builder

2009-02-25 Thread Nick Zitzmann
On Feb 24, 2009, at 10:40 PM, nukala seetaiah baba wrote: Needed suggestions: how to develop gui application using cocoa frameworks and objective- c without using interface builder or xcode tools. You must be a Windows switcher. Welcome! I strongly recommend you do not fight the tools, u

Re: Observing Managed Object Changes. Was: Strange ... behavior

2009-02-25 Thread Jerry Krinock
Well, now that I've convinced myself that NSManagedObjectContextObjectsDidChangeNotification does not give enough information, and that there is no way to reliably maintain a KVO observer of a managed object, I was going to bite the bullet and implement custom setters for all the properties

Re NSTableView Cell edit values.

2009-02-25 Thread Peter Hudson
Have you tried calling abortEditing on the table view. I can't remember if it causes a write or not - but in the context where I previously used it I would have needed it to. PH ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not

Re: -[_NSControllerObjectProxy entity]: unrecognized selector sent to instance

2009-02-25 Thread Daniel Child
Regarding the first issue (proxy object), will read the docs on NSProxy and all that that leads to. Regarding the second issue (copyWithZone), I had bound the content of an array controller to a relationship based on the selection in another controller, but bindings for the value portion of

NSTableView && Custom Background ...

2009-02-25 Thread Mic Pringle
Hi, I've a subclass of NSTableView that draws a custom gradient background. What I'd like to do now is to draw a slightly different background when the window containing the custom NSTableView loses focus. Is this possible ? If so, could someone please point me in the right direction ? I know t

Re: Running Cocoa applications from file servers

2009-02-25 Thread Bill Bumgarner
I, too, remember -- and miss -- the days of all applications living on a central server. Heck, at NeXT, we would run applications from / Network/Applications/ from anywhere in the world. It was a tad slow at first, but was just-like-local once the app was warmed up and the network was sta

Re: -[_NSControllerObjectProxy entity]: unrecognized selector sent to instance

2009-02-25 Thread Kyle Sluder
On Wed, Feb 25, 2009 at 3:05 PM, Kyle Sluder wrote: > Typically this happens when you've bound a view to the selectedObjects > of a controller and not provided a keypath.  Often times views copy > their object values, but NSManagedObjectContext does not support > NSCopying.  Make sure that all you

Simple text encryption

2009-02-25 Thread Erg Consultant
Are there any classes in Cocoa for simple text file or plist file encryption? I just need something I can point at a file on disk and do simple encryption without a password or key and then decode it later. Doesn't have to be fancy or even all that secure - just something simple and easy to use.

Re: NSTableView && Custom Background ...

2009-02-25 Thread Nick Zitzmann
On Feb 25, 2009, at 3:58 PM, Mic Pringle wrote: I've a subclass of NSTableView that draws a custom gradient background. What I'd like to do now is to draw a slightly different background when the window containing the custom NSTableView loses focus. Is this possible ? If so, could someone ple

Re: Select tablecell on creation through arrayController

2009-02-25 Thread Kyle Sluder
On Wed, Feb 25, 2009 at 5:11 PM, Walker Argendeli wrote: > I have a table with one column [...snip...] > [tableView editColumn:1 row:[tableView selectedRow] withEvent:nil > select:YES]; You are aware that arrays are 0-indexed, right? --Kyle Sluder __

Re: NSTableView && Custom Background ...

2009-02-25 Thread Corbin Dunn
On Feb 25, 2009, at 2:58 PM, Mic Pringle wrote: Hi, I've a subclass of NSTableView that draws a custom gradient background. What I'd like to do now is to draw a slightly different background when the window containing the custom NSTableView loses focus. Is this possible ? If so, could someon

Re: Select tablecell on creation through arrayController

2009-02-25 Thread Corbin Dunn
On Feb 25, 2009, at 2:11 PM, Walker Argendeli wrote: I have a table with one column, that's bound to an array controller. It calls add: on the array controller when I hit a plus button. Problem is, I want the textFieldCell to be selected on creation. I rewired the plus button to call a

Re: Simple text encryption

2009-02-25 Thread Nick Zitzmann
On Feb 25, 2009, at 4:03 PM, Erg Consultant wrote: Are there any classes in Cocoa for simple text file or plist file encryption? Nick Zitzmann ___ Cocoa-dev mailing list

Re: Simple text encryption

2009-02-25 Thread Graham Cox
On 26/02/2009, at 10:03 AM, Erg Consultant wrote: Are there any classes in Cocoa for simple text file or plist file encryption? I just need something I can point at a file on disk and do simple encryption without a password or key and then decode it later. Doesn't have to be fancy or even

Re: gui development without using xcode or interface builder

2009-02-25 Thread I. Savant
On Feb 25, 2009, at 5:15 PM, Nick Zitzmann wrote: I strongly recommend you do not fight the tools, unless you have a **really** good reason to do otherwise. Just stick to IB and the Xcode build system. If you do have a really good reason, then what is your reason? Agreed. That said, you

Re: Observing Managed Object Changes. Was: Strange ... behavior

2009-02-25 Thread Dave Fernandes
On Feb 25, 2009, at 2:24 PM, Quincey Morris wrote: On Feb 25, 2009, at 05:31, Jerry Krinock wrote: On 2009 Feb 24, at 20:02, Dave Fernandes wrote: ... I'm only just getting familiar with the idiosyncrasies of Leopard, however, in Tiger didTurnIntoFault might be called many times, but awa

Re: Metrics for a NSTextField

2009-02-25 Thread Martin Wierschin
I'm not really familiar with the particulars of how the field editor is configured, so take all this with a grain of salt... The usedRect empty. I believe the reason why is because the fieldEditor that the window has given me has a zero width. Sizing the editor may not be the window's respo

Re: Observing Managed Object Changes. Was: Strange ... behavior

2009-02-25 Thread Dave Fernandes
On Feb 25, 2009, at 3:51 PM, Jerry Krinock wrote: Dave's earlier comment on this contains some assumptions that are suspect. I don't know of any guarantee that deleting an object causes the object to first be faulted out and/or to receive a 'didTurnIntoFault' message, but perhaps it's so

NSScrollView's content view doesn't un-hide

2009-02-25 Thread Scott Hamilton
1. I have an NSScrollView created in IB which contains a custom view and only a vertical scroller. 2. I programmatically add subviews to the custom view's clip view with a block of code. The scroll view is displayed, the subviews all work, life is good. 3. Next, under appropriate conditio

Re: Observing Managed Object Changes. Was: Strange ... behavior

2009-02-25 Thread Jerry Krinock
On 2009 Feb 25, at 16:19, Dave Fernandes wrote: Yes, the one fetched from the persistent store may still be a fault if you have not tried to access any attributes yet. Further testing shows that it does become a fault if I change an attribute and then delete the Employee. That's ^changing

Re: Observing Managed Object Changes. Was: Strange ... behavior

2009-02-25 Thread Dave Fernandes
On Feb 25, 2009, at 8:31 AM, Jerry Krinock wrote: So, it looks like, for observing changes to the properties of managed objects --- * Using NSManagedObjectContextObjectsDidChangeNotification is no good since it doesn't give you specific information on the current change which a

Re: Observing Managed Object Changes. Was: Strange ... behavior

2009-02-25 Thread Quincey Morris
On Feb 25, 2009, at 14:16, Jerry Krinock wrote: How can I get this? According to the documentation, a to-many relationship is ordinarily modified by mutating the mutable set proxy. So there is no always-invoked accessor to override. Implement the set-mutation accessor methods in your NSMa

renaming a file with special/reserved characters in name

2009-02-25 Thread Martin Wierschin
Hello everyone, Forgive me if this has already been answered, but my searches through the archive didn't turn up anything. The situation is that I need to allow users to rename files within my application. The name of the file is displayed in an NSTableView, and the delegate method "table

Re: Observing Managed Object Changes. Was: Strange ... behavior

2009-02-25 Thread Jerry Krinock
On 2009 Feb 25, at 16:39, Dave Fernandes wrote: Well, as I mentioned I have stuck with KVO. I don't see why you need to remove observers when turning into a fault. You only need to remove observers before the object disappears. Ah, good point. I was using -didTurnIntoFault since -[NSManag

NSURL behaviour at odds with documentation

2009-02-25 Thread tmowlem
Hello, I am using NSURL to create a URL for an application using Webkit. It the documentation for NSURL at: http://developer.apple.com/documentation/Cocoa/Reference/Foundation/Classes/NSURL_Class/Reference/Reference.html I am specifically calling [NSURL URLWithString]. It states "The N

Re: Observing Managed Object Changes. Was: Strange ... behavior

2009-02-25 Thread Dave Fernandes
On Feb 25, 2009, at 7:52 PM, Jerry Krinock wrote: Note that a fetch will not return deleted objects that might still be on the undo stack, so I also call removeSelfFromObserveredObjects from the managed object's dealloc method. Oooo, dealloc is not recommended for overriding. I th

Re: Core Data Relationships

2009-02-25 Thread Walker Argendeli
With an NSPopUpButton, you can bind content to Kind.arrangedObjects, content values to Kind.arrangedObjects.title, and selected object to Item.kind. I want the functionality of an NSComboBox, however, which only has content and content values. There's no selected object. What could I bin

Re: makeKeyAndOrderFront Crashing

2009-02-25 Thread Walker Argendeli
I've now isolated it to the makeKeyAndOrderFront: method. I tried just a regular button with that class, but the moment I click it, up opens the debugger. The toolbar part isn't really an issue. I'm not really sure what to do from this point, because I can't tell why the method isn't wor

re: Observing Managed Object Changes. Was: Strange ... behavior

2009-02-25 Thread Ben Trumbull
Well, that was easy to test and indeed I found that you found a bug in my idea. The only way to fix it would be if we Apple had given us a - didUnturnIntoFault method, but they did not. So, it looks like, for observing changes to the properties of managed objects --- * Using NSManagedObjectCon

Re: do i need to create autorelease pool?

2009-02-25 Thread Peter N Lewis
At 11:44 -0500 25/2/09, Michael Ash wrote: On Wed, Feb 25, 2009 at 12:00 AM, Peter N Lewis wrote: The Application Kit creates an autorelease pool on the main thread at the beginning of every cycle of the event loop, and drains it at the end, thereby releasing any autoreleased objects generat

Re: Observing Managed Object Changes. Was: Strange ... behavior

2009-02-25 Thread Jerry Krinock
On 2009 Feb 25, at 17:11, Ben Trumbull wrote: bug numbers ? Ben, I will definitely file bug(s) after I get this sorted out. But in the interim... The problem is easily stated in terms of DepartmentAndEmployees. I have views which want to know when various object properties change.

One IBAction, multiple results from multiple methods

2009-02-25 Thread Walker Argendeli
Lets say I have some custom code that does the same thing, with the exception that a few IBOutlets are different for each type. Instead of having multiple methods, is there a way to use 1 IBAction, and take necessary action depending on where it was sent? I originally used code like this: -

Re: One IBAction, multiple results from multiple methods

2009-02-25 Thread I. Savant
On Feb 25, 2009, at 9:36 PM, Walker Argendeli wrote: Lets say I have some custom code that does the same thing, with the exception that a few IBOutlets are different for each type. Instead of having multiple methods, is there a way to use 1 IBAction, and take necessary action depending on

Re: Select tablecell on creation through arrayController

2009-02-25 Thread Walker Argendeli
The code is now this, which works- kindof: [notebookController add:sender]; [notebookTableView editColumn:0 row:[notebookTableView selectedRow] withEvent:nil select:YES]; Only problem is, for the second line, I actually have to kick off a timer...: [NSTimer scheduledTimerWithTimeInterval:.

Re: One IBAction, multiple results from multiple methods

2009-02-25 Thread Graham Cox
On 26/02/2009, at 1:36 PM, Walker Argendeli wrote: I didn't want a plethora of functions though, so I used code like this, with the object id's coming from IB: I don't think Object IDs assigned by IB are accessible to your code. Same for the names used in IB to label things. Most contro

Re: Observing Managed Object Changes. Was: Strange ... behavior

2009-02-25 Thread Ben Trumbull
On 2009 Feb 25, at 17:11, Ben Trumbull wrote: bug numbers ? Ben, I will definitely file bug(s) after I get this sorted out. But in the interim... The problem is easily stated in terms of DepartmentAndEmployees. I have views which want to know when various object properties change. For one e

Re: renaming a file with special/reserved characters in name

2009-02-25 Thread Michael Ash
On Wed, Feb 25, 2009 at 7:47 PM, Martin Wierschin wrote: > Hello everyone, > > Forgive me if this has already been answered, but my searches through the > archive didn't turn up anything. > > The situation is that I need to allow users to rename files within my > application. The name of the file

Re: do i need to create autorelease pool?

2009-02-25 Thread Michael Ash
On Wed, Feb 25, 2009 at 8:45 PM, Peter N Lewis wrote: > OK, I will certainly defer to Michael's deeper knowledge on this stuff, Oh no, don't do that > but > I thought Leopard plugged most of the normal case holes for requiring an > auto release pool, so I wrote up this test case: > > #import

  1   2   >