Adding Padding To The ‘left’ of a Text Field.

2009-08-07 Thread Joshua Garnham
I have a text field with a background but to make it look right the text field needs to have some padding (or a slight indent) on the left side of it a bit like the NSSearchField (because of the search image). How would I give the text field some padding on the left? Thanks, Josh.

Re: Adding Padding To The ‘left’ of a Tex t Field.

2009-08-07 Thread Shlok Datye
Well, in principle you can add #define kTopMargin 1.0 at the top, and into the cell methods add something like cellFrame.origin.y += kTopMargin; and aRect.origin.y += kTopMargin; However, this can look awful if the text does not fit properly. In any case, Graham's solution might be a much

Re: Disabling Exposé in SystemUIMode

2009-08-07 Thread Benjamin Dobson
On 7 Aug 2009, at 06:46:25, Eric Schlegel wrote: On Aug 6, 2009, at 5:13 PM, Pierce Freeman wrote: Hi Eric: I'll make sure to file a big about that - hopefully it can get resolved before shipment. But, when using the key, it should stop Exposé, shouldn't it? I have also tested this

Setting The Line Height Of A NSTextField.

2009-08-07 Thread Joshua Garnham
I have a Sub-Classed NSTextFieldCell and am looking for some code to adjust the line height for each line so it looks right on the background of my NSTextField. Thanks, Josh. ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not

Re: Setting The Line Height Of A NSTextField.

2009-08-07 Thread Graham Cox
On 07/08/2009, at 10:11 PM, Joshua Garnham wrote: I have a Sub-Classed NSTextFieldCell and am looking for some code to adjust the line height for each line so it looks right on the background of my NSTextField. Same answer as the padding... Line heights (or more accurately, line spacing)

Core Data inverse relationships

2009-08-07 Thread Gideon King
I have a situation where I don't want to have an inverse relationship, but coredata seems pretty keen on me having inverse relationships for all relationships. For example, say I have a picture managed object, which has things like the URL, the displayed size and rotation and caption. Now

Re: Core Data inverse relationships

2009-08-07 Thread I. Savant
On Aug 7, 2009, at 9:23 AM, Gideon King wrote: I have a situation where I don't want to have an inverse relationship, but coredata seems pretty keen on me having inverse relationships for all relationships. For example, say I have a picture managed object, which has things like the URL,

Re: [iPhone] Action sheet on ViewDidLoad

2009-08-07 Thread Luke the Hiesterman
My advise is just to use viewDidAppear: - the problem is probably rooted in showing an action sheet on a view that isn't yet onscreen - when it gets displayed, adjustments might have to be made which push it off the bottom of the screen. Luke On Aug 6, 2009, at 10:54 PM, Sven wrote:

Re: [iPhone] Action sheet on ViewDidLoad

2009-08-07 Thread Sven
On Fri, 7 Aug 2009, Luke the Hiesterman wrote: My advise is just to use viewDidAppear: - the problem is probably rooted in showing an action sheet on a view that isn't yet onscreen - when it gets displayed, adjustments might have to be made which push it off the bottom of the screen. Luke

Re: Core Data inverse relationships

2009-08-07 Thread Sebastian Morsch
I'm really not an expert on this but I had this situation myself and I chose having one inverse relationship back to every object that could own a picture. I don't like the looks of the model graph and I don't like the waste of memory but it works pretty good in my case. I tried the

Re: Core Data inverse relationships

2009-08-07 Thread Gideon King
Thanks for the suggestions guys - I have decided to go with the one way relationships and manage the deletion manually. I think I understand the other options available too, and in other circumstances, they may be a better option. Regards Gideon

Re: Core Data completely unable to find the source object model for migration

2009-08-07 Thread Matteo Manferdini
This can happen as a side effect of the old template code that merges a model using all managed object models from the application resources as well as all frameworks linked into the application. Thank you Adam, this is exactly the case! The old template code (I inherited it from Tiger, since

Re: Disabling Exposé in SystemUIMode

2009-08-07 Thread Eric Schlegel
On Aug 7, 2009, at 8:52 AM, Pierce Freeman wrote: Hmm, yes, the keystroke to invoke Exposé should still be blocked. I can't say offhand why it wouldn't be. Hmm... Interesting. I’m not quite sure either – maybe something with the key I’m using... F3? Yes, that's the problem. The

Re: Disabling Exposé in SystemUIMode

2009-08-07 Thread Eric Schlegel
On Aug 7, 2009, at 9:09 AM, Pierce Freeman wrote: Yes, that's the problem. The hardware keys aren't blocked either. In any event, I've submitted a bug report about the issue and hopefully it will be resolved in Snow Leopard. I'm not betting on it, but it may just make it through. It

Re: Disabling Exposé in SystemUIMode

2009-08-07 Thread Pierce Freeman
It won't be, sorry. Yeah, that's kind of what I figured. But it would be pretty cool if it made it into, like, 10.6.5 or something like that. I don't have any good recommendations. It might be possible to intercept and suppress the physical Exposé key on the keyboard using some IOKit

Re: Disabling Exposé in SystemUIMode

2009-08-07 Thread Eric Schlegel
On Aug 7, 2009, at 9:12 AM, Eric Schlegel wrote: On Aug 7, 2009, at 9:09 AM, Pierce Freeman wrote: Yes, that's the problem. The hardware keys aren't blocked either. In any event, I've submitted a bug report about the issue and hopefully it will be resolved in Snow Leopard. I'm not

Re: Disabling Exposé in SystemUIMode

2009-08-07 Thread Pierce Freeman
I take that back! It looks like this is already fixed in SnowLeopard. Wow, I think that just made my day. So, both of them are fixed? In other words, the gestures and the hardware key? ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Re: Disabling Exposé in SystemUIMode

2009-08-07 Thread Eric Schlegel
On Aug 7, 2009, at 9:28 AM, Pierce Freeman wrote: I take that back! It looks like this is already fixed in SnowLeopard. Wow, I think that just made my day. So, both of them are fixed? In other words, the gestures and the hardware key? In my testing on my MacBook Pro running a recent

Re: Disabling Exposé in SystemUIMode

2009-08-07 Thread I. Savant
Oops ... have we forgotten our NDA? -- I.S. On Aug 7, 2009, at 12:37 PM, Eric Schlegel wrote: On Aug 7, 2009, at 9:28 AM, Pierce Freeman wrote: I take that back! It looks like this is already fixed in SnowLeopard. Wow, I think that just made my day. So, both of them are fixed?

Re: defining NSColor constants

2009-08-07 Thread Arie Pieter Cammeraat
Thanks everyone, I'll try your tips. I almost don't dare to compare, but it's a lot more difficult than in REALBasic to declare a global color. But on the other side... who cares? Op 6-aug-2009, om 17:27 heeft Sean McBride het volgende geschreven: On 8/6/09 8:38 PM, Graham Cox said:

Re: Disabling Exposé in SystemUIMode

2009-08-07 Thread Pierce Freeman
In my testing on my MacBook Pro running a recent build of SnowLeopard, yes. SnowLeopard has not been released to customers yet, so of course there's always a possibility of something changing, but it does seem to work properly at the moment. Further discussion of SnowLeopard should probably

Re: Disabling Exposé in SystemUIMode

2009-08-07 Thread Alex Kac
Well he is an Apple employee. I suppose they can kind of do what they want :) On Aug 7, 2009, at 11:39 AM, I. Savant wrote: Oops ... have we forgotten our NDA? -- I.S. On Aug 7, 2009, at 12:37 PM, Eric Schlegel wrote: On Aug 7, 2009, at 9:28 AM, Pierce Freeman wrote: I take that

Re: Disabling Exposé in SystemUIMode

2009-08-07 Thread I. Savant
On Aug 7, 2009, at 12:52 PM, Alex Kac wrote: Well he is an Apple employee. I suppose they can kind of do what they want :) We could continue the debate offline (in strictly a friendly way) if you want, but I'll just say I would imagine Apple employees would be under heavier scrutiny so

determinate NSProgressIndicator animation

2009-08-07 Thread r c
In a determinate NSProgressIndicator the blue portion animates in some application (Finder copy is an easy example). I have noticed that this is not always the case. My guess is that the animation takes place in the main thread of the application, but if the main thread is busy, the animation

Re: Disabling Exposé in SystemUIMode

2009-08-07 Thread Sean McBride
On 8/7/09 9:47 AM, Pierce Freeman said: I may just have to make my app Snow Leopard only then. After all, it's only $29. Only $29, yes; but remember it's also Intel-only. So if you require 10.6, you loose any/all PowerPC customers. --

Re: determinate NSProgressIndicator animation

2009-08-07 Thread Sean McBride
On 8/7/09 10:06 AM, r c said: In a determinate NSProgressIndicator the blue portion animates in some application (Finder copy is an easy example). I have noticed that this is not always the case. My guess is that the animation takes place in the main thread of the application, but if the main

Re: Disabling Exposé in SystemUIMode

2009-08-07 Thread Pierce Freeman
Very true, so I guess I'll have to weigh my options. Thanks to everyone for their help! On 8/7/09 10:08 AM, Sean McBride s...@rogue-research.com wrote: On 8/7/09 9:47 AM, Pierce Freeman said: I may just have to make my app Snow Leopard only then. After all, it's only $29. Only $29,

Re: determinate NSProgressIndicator animation

2009-08-07 Thread r c
I have read that document, but it indicates that this method (as well as start and stopAnimation:) only apply to indeterminate progress indicators - is this not true? Rich Collyer From: Sean McBride s...@rogue-research.com To: r c iseecol...@sbcglobal.net;

Re: Two right buttons on UINavigationBar?

2009-08-07 Thread Agha Khan
It looks like it is a bug. Someone else have same problem. http://blog.7touchgroup.com/2009/08/uinavigationitem-sethidesbackbuttonyes-won ’t-prevent-from-goingback/ I would like to change the action of the Done button. As you see in UINavigationBar.h (line 62) it has only 2 items (topItem

Re: determinate NSProgressIndicator animation

2009-08-07 Thread Quincey Morris
On Aug 7, 2009, at 10:44, r c wrote: I have read that document, but it indicates that this method (as well as start and stopAnimation:) only apply to indeterminate progress indicators - is this not true? It doesn't say that for setUsesThreadedAnimation:, only for the other two. FWIW I

Re: Core Data completely unable to find the source object model for migration

2009-08-07 Thread Adam Swift
On Aug 7, 2009, at 8:39 AM, Matteo Manferdini wrote: This can happen as a side effect of the old template code that merges a model using all managed object models from the application resources as well as all frameworks linked into the application. Thank you Adam, this is exactly the

[NSObject setValue:forUndefinedKey:] no longer requires explicit KVC notifications?

2009-08-07 Thread Gabriele de Simone
It used to be that if you overrode -[NSObject setValue:forUndefinedKey:] your own subclass was responsible for calling -[NSObject will/didChangeValueForKey: so that bindings and observers would work as expected. That was fine, since it allowed one to provide different implementations

Re: NSOperationQueue question

2009-08-07 Thread Quincey Morris
On Aug 7, 2009, at 12:06, Tim Murison wrote: The code is below and was compiled with objc-gc-only. If I run the program, despite the setMaxConcurrentOperationCount:4, it will use 65 threads. Also it will leak memory at ~1Mb/sec. #import Cocoa/Cocoa.h #include libkern/OSAtomic.h volatile

Re: NSOperationQueue question

2009-08-07 Thread Tim Murison
'setMaxConcurrentOperationCount' specifies the number of concurrently executing threads. I don't see anything in the documentation that guarantees it will control the number of concurrently existing threads. Threads may exist waiting to execute, and threads will exist for some period of time

Re: NSOperationQueue question

2009-08-07 Thread Quincey Morris
On Aug 7, 2009, at 13:05, Tim Murison wrote: In my real application I have a memory leak that I can trace to operations not being release by the operation queue. This program is meant to show that in the simplest way possible. I really don't think it shows that at all. If your analysis is

Re: NSOperationQueue question

2009-08-07 Thread Tim Murison
On 07/08/09 4:33 PM, Quincey Morris quinceymor...@earthlink.net wrote: On Aug 7, 2009, at 13:05, Tim Murison wrote: In my real application I have a memory leak that I can trace to operations not being release by the operation queue. This program is meant to show that in the simplest

Re: NSOperationQueue question

2009-08-07 Thread Sean McBride
On 8/7/09 5:06 PM, Tim Murison said: With GC, the memory use grows forever, without GC, it doesn't grow at all. Instruments tells me the garbage collector is responsible for allocating the leaking memory from within the collection routine, I think maybe instruments is confused, but it does

Re: NSOperationQueue question

2009-08-07 Thread Tim Murison
With GC, the memory use grows forever, without GC, it doesn't grow at all. Instruments tells me the garbage collector is responsible for allocating the leaking memory from within the collection routine, I think maybe instruments is confused, but it does confirm that the live object count grows

Re: NSOperationQueue question

2009-08-07 Thread Quincey Morris
On Aug 7, 2009, at 14:06, Tim Murison wrote: The improved code will execute about 1000 operations as quickly as possible, then it will sleep for 1 second. Before sleeping, it will print the operation queue length, proving that the queue doesn't grow for ever (it is always 5000 on my

Intel Mac prefpane error

2009-08-07 Thread Trygve Inda
Although my app is a universal binary (32/64), and was developed on an Intel Mac, a few people report when trying to install and error: You cannot open (my app) preferences because it doesn't work on an Intel-based Mac. It works on all three of my Intel Macs on 10.5.7, 10.5.8 and 10.6 Dev build.

NSArrayController Managing / Sorting NSManagedObjects

2009-08-07 Thread Brad Gibbs
Hi, I have an NSTableView that displays a set of Activity objects, which are subclasses of NSManagedObject, all of which are managed by a custom NSArrayController. Each Activity has a sortIndex property, which is used to... wait for it... sort the activities. The array controller adds

Re: Intel Mac prefpane error

2009-08-07 Thread Kiel Gillard
What OS are those few people running? Kiel :-) If video games affected us as kids, we'd all be running around in darkened rooms, munching on magic pills and listening to repetitive electronic music. On 08/08/2009, at 7:47 AM, Trygve Inda wrote: Although my app is a universal binary

Re: NSOperationQueue question

2009-08-07 Thread Greg Guerin
Tim Murison wrote: [pool release]; } } With GC, the memory use grows forever, without GC, it doesn't grow at all. With GC, [pool release] is a no-op. You should use [pool drain]. Quoted from NSAutoreleasePool Class Reference, under the description for -drain:

Re: NSOperationQueue question

2009-08-07 Thread Tim Murison
On 07/08/09 5:30 PM, Quincey Morris quinceymor...@earthlink.net wrote: On Aug 7, 2009, at 14:06, Tim Murison wrote: The improved code will execute about 1000 operations as quickly as possible, then it will sleep for 1 second. Before sleeping, it will print the operation queue length,

Re: NSOperationQueue question

2009-08-07 Thread Quincey Morris
On Aug 7, 2009, at 16:07, Tim Murison wrote: I enqueue operations until ~1000 have executed, then wait for the queue to be empty. Then sleep for 10 seconds and force a collection. Once the queue is empty there should be a maximum of 4 outstanding operations (the concurrency count). 10

Re: IB connections - newbie question

2009-08-07 Thread Aidan Bahta
On Aug 5, 2009, at 10:34 PM, Greg Guerin wrote: Oftenwrong Soong wrote: I am making a NSDocument based app. In the NIB for the document window, I need to create a connection to a global data object (think singleton). This global data is used when creating the document, but isn't part of

Re: Design Question

2009-08-07 Thread Kaelten
Fair enough. I guess what I'm wondering then is how do I handle the following case. I have several loosely coupled properties which can read somewhat like this. (ProjectInstall *)projectInstall { return [ProjectInstallController projectInstallWithProjectId:projectId]; } And in some cases

Cmd+key shortcuts not being sent to NSWindow on Tiger

2009-08-07 Thread Dimcho Balev
Hi, I have a trouble with a piece of code which behaves differently on Tiger (Mactel) in comparison to Leopard. It is pretty simple case: our cocoa app is interested in cmd+key shortcuts and we have overriden the keyDown and keyUp methods in our NSWindow inherited class. On Leopard we receive

To get system sounds for Move or Copy operations

2009-08-07 Thread Shashanka L
Hello, Where can I get the system sound for Move/Copy operations? I need to play it in my application when Move or Copy file is done. Ex: I can get the Trash sound at the location : /System/Library/ components/coreaudio.component/contents/Resources/SystemSounds/finder/ And I can use it as

Re: NSOperationQueue question

2009-08-07 Thread Franck Zoccolo
Le 7 août 09 à 21:06, Tim Murison a écrit : The code is below and was compiled with objc-gc-only. Forget what I said... Maybe I should read carrefully before answering... Sorry for the noise. smime.p7s Description: S/MIME cryptographic signature

Re: adding a sub menu to multiple super menus?

2009-08-07 Thread David M.Cotter
the problem is i'm stuck with a very large legacy code base that i must modify minimally to shoehorn into Cocoa. this same code must cross compile on windows, so i can't change the underlying architecture, which has for a decade now relied on the fact that we can share submenus across

I want to post !!

2009-08-07 Thread Zephyroth Akash
___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription:

[myNSWindow setDocumentEdited:dirtyB] fail ??

2009-08-07 Thread David M. Cotter
i'm shoe-horning an old carbon app into cocoa. there is no document model so i'm just managing the dirty bit manually. when i call: [myNSWindow setDocumentEdited:dirtyB] it doesn't set the little red dot in the close box. and yes, dirtyB is set to YES. why doesn't it work?

Re: defining NSColor constants

2009-08-07 Thread Graham Cox
On 08/08/2009, at 2:44 AM, Arie Pieter Cammeraat wrote: I almost don't dare to compare, but it's a lot more difficult than in REALBasic to declare a global color. But on the other side... who cares? I doubt that REALBasic's colours are objects. The advantage of a colour object is that

Re: poor genstrings

2009-08-07 Thread Qi Liu
Hi tyler, Thanks for point out that, obviously, that is a miss-typing. Adding @ in front of second arg won't make any good on genstrings. 2009/8/8 tyler haik...@mac.com Need an @ in front of second empty string arg. Sent from my phone On Aug 7, 2009, at 2:49 AM, Qi Liu neoli...@gmail.com

Re: [myNSWindow setDocumentEdited:dirtyB] fail ??

2009-08-07 Thread Graham Cox
On 08/08/2009, at 10:20 AM, David M. Cotter wrote: [myNSWindow setDocumentEdited:dirtyB] it doesn't set the little red dot in the close box. and yes, dirtyB is set to YES. Have you tried setting it on the window's controller instead? The controller may need to synch with the window in

Re: NSOperationQueue question

2009-08-07 Thread Chris Hanson
Not only does the below code need to use -[NSAutoreleasePool drain] rather than -release, but it also doesn’t start the background collection thread. The first thing it should do in main() is invoke objc_startCollectorThread() (from objc/objc-auto.h) which will ensure GC is happening

Re: adding a sub menu to multiple super menus?

2009-08-07 Thread Chris Hanson
On Aug 7, 2009, at 5:01 PM, David M.Cotter wrote: the problem is i'm stuck with a very large legacy code base that i must modify minimally to shoehorn into Cocoa. this same code must cross compile on windows, so i can't change the underlying architecture, which has for a decade now relied

Re: [myNSWindow setDocumentEdited:dirtyB] fail ??

2009-08-07 Thread David M. Cotter
there is no controller, there is no NSDocument, there is no NSUndoManager. this is code that has been carbon forever and now has absolutely minimal cocoa enough to get it running. if there is an NSDocument i don't know about it. On Aug 7, 2009, at 5:41 PM, Graham Cox wrote: On

Re: [NSObject setValue:forUndefinedKey:] no longer requires explicit KVC notifications?

2009-08-07 Thread Keary Suska
On Aug 7, 2009, at 12:50 PM, Gabriele de Simone wrote: It used to be that if you overrode -[NSObject setValue:forUndefinedKey:] your own subclass was responsible for calling -[NSObject will/didChangeValueForKey: so that bindings and observers would work as expected. That was fine, since

Re: [myNSWindow setDocumentEdited:dirtyB] fail ??

2009-08-07 Thread Dave Keck
Works for me: http://themha.com/bfegewfvd.zip So the obvious things to check: 1. Is myNSWindow nil, or the wrong window? 2. Is myNSWindow an NSWindow, or a subclass that might mess with this behavior? 3. Is setDocumentEdited: being called from more than one place? Break on setDocumentEdited: and

Re: Cmd+key shortcuts not being sent to NSWindow on Tiger

2009-08-07 Thread Kirk Swenson
On Aug 7, 2009, at 5:55 PM, Dimcho Balev dba...@adobe.com wrote: I have a trouble with a piece of code which behaves differently on Tiger (Mactel) in comparison to Leopard. It is pretty simple case: our cocoa app is interested in cmd+key shortcuts and we have overriden the keyDown and keyUp

Re: [myNSWindow setDocumentEdited:dirtyB] fail ??

2009-08-07 Thread Marco S Hyman
On Aug 7, 2009, at 5:53 PM, David M. Cotter wrote: this is code that has been carbon forever and now has absolutely minimal cocoa enough to get it running. if there is an NSDocument i don't know about it. Are you sure that myNSWindow isn't nil? I've a single window application where I