Re: Modal sheet / dialog + thread == main app thread hangs ?

2009-10-17 Thread Marc Wandschneider
>From the NSApplicationDocumentation: "abortModal must be used instead of stopModal or stopModalWithCode: when you need to stop a modal event loop from anywhere other than a callout from that event loop. In other words, if you want to stop the loop in response to a user’s actions within the modal

Re: GC and atomic getters/setters

2009-10-17 Thread Michael Ash
On Sat, Oct 17, 2009 at 9:32 PM, Kyle Sluder wrote: > On Sat, Oct 17, 2009 at 6:20 PM, Ken Ferry wrote: >> The issue concerns the order of in which changes to memory are observable by >> other processors. > > Okay, and the read example is immune because you have to read the > address before you c

Re: Why does my font come out looking fuzzy?

2009-10-17 Thread Jens Alfke
On Oct 17, 2009, at 7:46 PM, Ben Haller wrote: Copied the TrueType font from Instruments into my project, added the necessary key to my Info.plist, set the font using [NSFont fontWithName:...], and hey presto, there the font is in my app. Only... it doesn't look as nice. It's less crisp.

Re: How to retrieve the font information from TrueType font file?

2009-10-17 Thread Jens Alfke
On Oct 17, 2009, at 8:09 AM, Mike Wright wrote: FYI, I haven't found any of the "Font Suitcase" files that have a data fork. The font is in the 'FOND' resource -- and all of those fonts work fine under Snow Leopard. Some of this legacy stuff is probably pretty hard to eliminate without nas

Modal sheet / dialog + thread == main app thread hangs ?

2009-10-17 Thread Marc Wandschneider
I'm in the midst of debugging an extremely unusual problem, and I was wondering if anybody might have any insight into what might be going wrong: In a controller class from a NIB, I take an NSPanel I from that same NIB, and then show it app modally on an NSWindow (that was created by hand in code):

NSRulerMarker and dragging

2009-10-17 Thread Arved von Brasch
Hello Cocoa List, My Googling reveals this question has been asked before, but no answer was given. Hopefully someone knows how to do this now. I have a vertical NSRulerView attached to an NSTextView. I have movable NSRulerMarkers and that's all working good. My only problem is that th

Re: correctly Controlling Garbage Collection

2009-10-17 Thread Quincey Morris
On Oct 17, 2009, at 18:48, Rob Keniger wrote: What happens if you explicitly disable Garbage Collection when the user starts drawing and enable it when the user finishes? That might be a practical answer, but I think maybe a key point got skipped over earlier in the thread. If the collector

Re: Why does my font come out looking fuzzy?

2009-10-17 Thread Clark S. Cox III
There's also the possibility that the text isn't being drawn properly aligned to the pixel grid. Sent from my iPhone On Oct 17, 2009, at 19:52, Kyle Sluder wrote: You need to post a screenshot of what you're seeing. I can think of two possibilities off the top of my head: 1) You're renderi

Re: Programming Style: Method Definition with or without a semicolon.

2009-10-17 Thread Yandy Ramirez
Thanks a million for this, awesome! -- yandy On Oct 17, 2009, at 10:01 PM, Rob Keniger wrote: On 17/10/2009, at 10:25 PM, Graham Cox wrote: If there is a way to disable these insertions independently and I've missed it, please someone, let me know how to do it. I can't recommend th

Re: Manipluate Cocoa Touch keyboard mode

2009-10-17 Thread Yandy Ramirez
numbers and punctuation in IB textfield properties for keyboard type -- yandy On Oct 17, 2009, at 8:53 PM, Tron Thomas wrote: When an UITextField becomes active in a Cocoa Touch application, the device automatically displays a keyboard for character input. The keyboard always appears

Using core data binary and string attributes with NSTextView

2009-10-17 Thread Robert
I'm new to core data and bindings and need some help. In my model, I've got an attribute called "story". This holds text, so I set the attribute type to string. I used bindings in IB to connect the story attribute to an NSTextView. When I ran my app, an exception was thrown. The message in

Re: How to switch the default printer?

2009-10-17 Thread Laurent Daudelin
Thanks, Scott! I had started to look at the printing prefs file as it contained information about the printers in use. Appreciate the sharing! Cheers! -Laurent. -- Laurent Daudelin AIM/iChat/Skype:LaurentDaudelin http://nemesys.dyndns.org Logiciels Nemesys Soft

Re: Probs with "BetterAuthorizationSample"-code

2009-10-17 Thread Frank W. Tag
(Due to a misconfiguration I did send this message more than once - sorry for that to all) Hi there, thanks to your and esp. Todds hints everything works quiet fine now. Two additional detail question remain: 1- How can I set up the BAS to proceed an install process without the HelperTool c

Re: UTIs and readFromURL/writeToURL

2009-10-17 Thread Sean McBride
On 10/17/09 10:21 PM, Alastair Houghton said: >On 17 Oct 2009, at 03:12, Sean McBride wrote: > >> On 10/10/09 11:15 AM, Sander Stoks said: >> >>> First, do I really have to add all types to my Info.plist file? If >>> the OS gets an update which adds a new file type to Image I/O, I have >>> to upd

Re: Why does my font come out looking fuzzy?

2009-10-17 Thread Kyle Sluder
You need to post a screenshot of what you're seeing. I can think of two possibilities off the top of my head: 1) You're rendering text into a CALayer (especially a CATextLayer). Without some tweaking, CALayer can't do subpixel antialiasing (aka LCD antialiasing), because it doesn't have the existi

Why does my font come out looking fuzzy?

2009-10-17 Thread Ben Haller
So, I like the LCD-style font that Instruments uses to show the time counter at the top center of the window. Thought I might use it myself for an in-house project (not for release). Copied the TrueType font from Instruments into my project, added the necessary key to my Info.plist, set

Re: Programming Style: Method Definition with or without a semicolon.

2009-10-17 Thread Ken Thomases
On Oct 17, 2009, at 2:24 AM, Uli Kusterer wrote: What do project templates have to do with code completion? The comments don't mention how to customize code completion stubs either. Did I overlook something? For controlling code completion, search for "XCCodeSenseFormattingOptions" on thi

Re: NSInvocationOperations and background Threads

2009-10-17 Thread Ken Thomases
On Oct 16, 2009, at 8:01 AM, John Love wrote: In my app, I have a very long for-loop It appears however, that in my app there is no background Thread that begins and the reason for that is because my app's window stays in the background until all NSOperations are complete. Any clues? I

Re: GC and atomic getters/setters

2009-10-17 Thread Kyle Sluder
On Sat, Oct 17, 2009 at 6:36 PM, Ken Ferry wrote: > This is the kind of reasoning you want to avoid, actually.  That's true on > most but not all architectures.  That article does explain. > It's true on all architectures on which Cocoa is available, but even so, to > write clear code whose correc

Re: Programming Style: Method Definition with or without a semicolon.

2009-10-17 Thread Rob Keniger
On 17/10/2009, at 10:25 PM, Graham Cox wrote: > If there is a way to disable these insertions independently and I've missed > it, please someone, let me know how to do it. I can't recommend the ODCompletionDictionary plug-in for Xcode highly enough: http://www.obdev.at/products/completion-dic

Re: correctly Controlling Garbage Collection

2009-10-17 Thread Rob Keniger
On 16/10/2009, at 4:17 PM, WareTo Development wrote: > Looking at this problem, we could perform better memory management, so deep > garbage collection does not happen that often. This reduces the problem, but > can never eliminate it, since sooner or later the garbage clean operation > must b

Re: GC and atomic getters/setters

2009-10-17 Thread Ken Ferry
On Sat, Oct 17, 2009 at 6:32 PM, Kyle Sluder wrote: > On Sat, Oct 17, 2009 at 6:20 PM, Ken Ferry wrote: > > The issue concerns the order of in which changes to memory are observable > by > > other processors. > > Okay, and the read example is immune because you have to read the > address before

Re: GC and atomic getters/setters

2009-10-17 Thread Kyle Sluder
On Sat, Oct 17, 2009 at 6:20 PM, Ken Ferry wrote: > The issue concerns the order of in which changes to memory are observable by > other processors. Okay, and the read example is immune because you have to read the address before you can read the thing at that address, and it's therefore impossib

Re: GC and atomic getters/setters

2009-10-17 Thread Ken Ferry
On Sat, Oct 17, 2009 at 5:52 PM, Kyle Sluder wrote: > On Sat, Oct 17, 2009 at 5:35 PM, Michael Ash > wrote: > > This just leaves the writes. I assume that the GC write barrier > > includes a memory barrier, unless someone wants to tell me otherwise. > > If so, then there's no problem at all. > >

Re: Manipluate Cocoa Touch keyboard mode

2009-10-17 Thread Fritz Anderson
On 17 Oct 2009, at 7:53 PM, Tron Thomas wrote: I have an application containing a singular UITextField that is intended for entering numeric data. I would like the keyboard to come up in numeric mode and stay in that mode unless the user click the button to toggle to letter mode, even if t

Manipluate Cocoa Touch keyboard mode

2009-10-17 Thread Tron Thomas
When an UITextField becomes active in a Cocoa Touch application, the device automatically displays a keyboard for character input. The keyboard always appears in alphabet mode so letters can be typed. I have an application containing a singular UITextField that is intended for entering num

Re: GC and atomic getters/setters

2009-10-17 Thread Kyle Sluder
On Sat, Oct 17, 2009 at 5:35 PM, Michael Ash wrote: > This just leaves the writes. I assume that the GC write barrier > includes a memory barrier, unless someone wants to tell me otherwise. > If so, then there's no problem at all. Strictly speaking, this isn't really an atomicity issue, is it? W

Re: GC and atomic getters/setters

2009-10-17 Thread Michael Ash
On Sat, Oct 17, 2009 at 1:19 PM, Michael Ash wrote: > On Sat, Oct 17, 2009 at 12:18 PM, Bill Bumgarner wrote: >> >> On Oct 17, 2009, at 8:38 AM, BJ Homer wrote: >> >>> But assuming that you >>> wanted it there in the first place, why does the GC version not need the >>> synchronization? >> >> Und

Calculating a total from a collection of numeric attributes

2009-10-17 Thread Ian Piper
Hi all, I have a Core Data entity that has an attribute called charge (stored as a float). So I am storing a number of records each of which has a charge. I simply want to be able to show a running total of charges as I add or remove items. I was hoping that I might be able to use a simpl

Re: standard colors

2009-10-17 Thread Michael Cinkosky
Thanks! I got close with Alastair's suggestion and I will give this a try! Michael On Oct 17, 2009, at 4:19 PM, Ross Carter wrote: static NSColor *sourceListBackgroundColor = nil; if (sourceListBackgroundColor == nil) { NSOutlineView *outlineView = [[NSOutlineView alloc] initWithFrame

Re: standard colors

2009-10-17 Thread Michael Cinkosky
Thanks, Alastair, this helps a lot. Not understanding the "perceptual", "absolute" and "relative" stuff in the Color Sync util, I had to play around a bit, but I am getting closer to the right color. Michael On Oct 17, 2009, at 3:31 PM, Alastair Houghton wrote: On 17 Oct 2009, at 21:32

Re: standard colors

2009-10-17 Thread Ross Carter
On Oct 17, 2009, at 5:31 PM, Alastair Houghton wrote: On 17 Oct 2009, at 21:32, Michael Cinkosky wrote: Has Apple provided documentation on their standard source list background color? I haven't found it in the HIG docs, or with Google (I have not come up with the right terms to make the

NSSpellChecker -learnWord: how to specify LocalDictionary

2009-10-17 Thread Ross Carter
In 10.6, there is a spell checking dictionary named LocalDictionary that contains words learned outside the context of a particular language. How does one use NSSpellChecker -learnWord: and -unlearnWord: so that those methods write to LocalDictionary? For other language dictionaries, one

Re: standard colors

2009-10-17 Thread Alastair Houghton
On 17 Oct 2009, at 21:32, Michael Cinkosky wrote: Has Apple provided documentation on their standard source list background color? I haven't found it in the HIG docs, or with Google (I have not come up with the right terms to make the search specific enough). I have also tried just sampl

Re: UTIs and readFromURL/writeToURL

2009-10-17 Thread Alastair Houghton
On 17 Oct 2009, at 03:12, Sean McBride wrote: On 10/10/09 11:15 AM, Sander Stoks said: First, do I really have to add all types to my Info.plist file? If the OS gets an update which adds a new file type to Image I/O, I have to update my Info.plist? Since no one else replied... I'm pretty su

Re: Selecting UITextField text

2009-10-17 Thread Fritz Anderson
On 17 Oct 2009, at 2:14 PM, Tron Thomas wrote: How can someone programmatically select all the text in an UITextField control? Look up the UIResponderStandardEditActions informal protocol. It includes a selectAll: method. The docs say most descendants of UIResponder should implement it.

Re: How to switch the default printer?

2009-10-17 Thread Scott Ribe
> Well... suppose from my application, I want to convert a Word document to PDF. > How would I do that? I did quite a bit of research and the only way I found > was to use CUPS-PDF and have Word print to that printer. Then, I can retrieve > the converted PDF document. Is there any other way? You a

Re: How to retrieve the font information from TrueType font file?

2009-10-17 Thread Alastair Houghton
On 17 Oct 2009, at 03:52, XiaoGang Li wrote: Your solution is good. At first, I think it is simple to list all the limited fonts in the plist file, and it is easy to enumerate these fonts. But, I think, when other font files are added to the bundle by other engineer, I will update my plist fi

standard colors

2009-10-17 Thread Michael Cinkosky
Has Apple provided documentation on their standard source list background color? I haven't found it in the HIG docs, or with Google (I have not come up with the right terms to make the search specific enough). I have also tried just sampling the colors from the running applications (Mail

CoreData Dangling Reference

2009-10-17 Thread Milen Dzhumerov
Hi all, I've started getting some dangling references which I cannot figure out. Basically, I've got the following class setup: A <-->> B <<--> C where A has-many to B, C has -many to B and B has-one to both A and C. What happens on quit is that I get the following error: "D

Re: Subclassing a view class from an external framework

2009-10-17 Thread Kyle Sluder
Wow, reading comprehension failure on my part. Apologies for the noise. --Kyle Sluder ___ 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-admin

Selecting UITextField text

2009-10-17 Thread Tron Thomas
How can someone programmatically select all the text in an UITextField control? ___ 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)

__CFServiceControllerBeginPBSLoadForLocalizations timed out error

2009-10-17 Thread John Love
I *just* noticed the following error in the XCode Debugger Console: __CFServiceControllerBeginPBSLoadForLocalizations timed out while talking to pbs .. and I'm getting it at the very top of -init for my NSDocument?? I have no clue as to when it started .. I kinda think maybe with upgrading

Re: Subclassing a view class from an external framework

2009-10-17 Thread Jeff Johnson
On Oct 17, 2009, at 1:32 PM, Kyle Sluder wrote: On Sat, Oct 17, 2009 at 11:30 AM, Jeff Johnson wrote: After further experimentation, I've found the problem. Interface Builder doesn't find private header files in a framework. When I changed the header file from private to public, Interface

Re: Triggering a Method when a Core Data Property changes.

2009-10-17 Thread Kyle Sluder
On Sat, Oct 17, 2009 at 8:34 AM, Jerry Krinock wrote: > Now, I'm not sure if you should do that, or observing the tree controller as > recommended by Kyle.  However, since I don't have a tree controller in a > project of mine, I've kind of done what you suggested. It depends on what you're trying

Re: Subclassing a view class from an external framework

2009-10-17 Thread Kyle Sluder
On Sat, Oct 17, 2009 at 11:30 AM, Jeff Johnson wrote: > After further experimentation, I've found the problem. Interface Builder > doesn't find private header files in a framework. When I changed the header > file from private to public, Interface Builder found it. If it's a private header, how a

Re: Subclassing a view class from an external framework

2009-10-17 Thread Jeff Johnson
After further experimentation, I've found the problem. Interface Builder doesn't find private header files in a framework. When I changed the header file from private to public, Interface Builder found it. Interface Builder doesn't find private headers in framework -Jeff On Oct 17, 2

Re: UITextField formatting for IP Address

2009-10-17 Thread Alex Kac
Exactly. I know. I am still working on that, but I don't want to invest too much time in any one method until i know it can solve the issue. But that's my point. I can seem to find any really good way to do this in UITextField. So i am playing around with different methods and posted the cl

Re: GC and atomic getters/setters

2009-10-17 Thread Michael Ash
On Sat, Oct 17, 2009 at 12:18 PM, Bill Bumgarner wrote: > > On Oct 17, 2009, at 8:38 AM, BJ Homer wrote: > >> But assuming that you >> wanted it there in the first place, why does the GC version not need the >> synchronization? > > Under GC, object reference assignments -- scanned pointer assignme

Re: Subclassing a view class from an external framework

2009-10-17 Thread Jeff Johnson
Hi Kevin. This occurs with both IB 3.2.1 on 10.6 and IB 3.1.2 on 10.5. In the IB info window I get these warnings: 1) The 'delegate' outlet of 'AHTSessionWindow' is connected to 'File's Owner' but 'delegate' is no longer defined on AHTWindow. 2) The 'window' outlet of 'File's Owner' is conn

Re: GC and atomic getters/setters

2009-10-17 Thread Bill Bumgarner
On Oct 17, 2009, at 8:38 AM, BJ Homer wrote: But assuming that you wanted it there in the first place, why does the GC version not need the synchronization? Under GC, object reference assignments -- scanned pointer assignments, technically -- are, in and of themselves, atomic. Note that

Re: GC and atomic getters/setters

2009-10-17 Thread Kai Brüning
On 17.10.2009, at 17:38, BJ Homer wrote: In the Garbage Collection Programming Guide: Architecture [1], an example is given of a set of non-GC getters and setters which use @synchronized (self) to control the access to the ivar, and in the setter to protect the releasing of the old object an

GC and atomic getters/setters

2009-10-17 Thread BJ Homer
In the Garbage Collection Programming Guide: Architecture [1], an example is given of a set of non-GC getters and setters which use @synchronized(self) to control the access to the ivar, and in the setter to protect the releasing of the old object and retaining of the new. Then, a GC example is gi

Re: Triggering a Method when a Core Data Property changes.

2009-10-17 Thread Jerry Krinock
On 2009 Oct 17, at 04:55, Joshua Garnham wrote: Could I sub class NSManagedObject to make it observe objects as they are added or fetched? Well, first of all, let me rephrase your question. What you're suggesting is to add an observer of the "name" property as objects are inserted or fe

Re: How to retrieve the font information from TrueType font file?

2009-10-17 Thread Mike Wright
On Oct 17, 2009, at 02:37 AM, Jens Alfke wrote: On Oct 16, 2009, at 10:31 PM, Mike Wright wrote: 1. Single Fonts with the ".ttf" file extension have only a data fork, and the name of the file seems to be the name of the font. Not necessarily. The filename is not part of the font, so it can

Re: Programming Style: Method Definition with or without a semicolon.

2009-10-17 Thread Graham Cox
On 17/10/2009, at 6:24 PM, Uli Kusterer wrote: What do project templates have to do with code completion? The comments don't mention how to customize code completion stubs either. Did I overlook something? I didn't say anything about code completion. I understood the OP to be talking ab

Re: Triggering a Method when a Core Data Property changes.

2009-10-17 Thread Joshua Garnham
Hmm. Ok. Could I sub class NSManagedObject then add the following code to make it observe objects as they are added or fetched? - (void) awakeFromFetch { [self addObserver:[NSApp delegate] forKeyPath:@"name" options:NSKeyValueObservingOptionNew context:nil]; } - (void) awakeFromInsert {

Getting NSSearchField to get focus in NSStatusItem menu

2009-10-17 Thread Dalmazio Brisinda
Hi, I'm having difficulty getting a NSSearchField to work properly in an NSStatusItem. What I would like to do is something similar to the spotlight status bar item and the search field that pops up. After I create my view containing the NSSearchField and a also a simple menu in Interface

Re: Programming Style: Method Definition with or without a semicolon.

2009-10-17 Thread Uli Kusterer
On 16.10.2009, at 11:43, Graham Cox wrote: On 16/10/2009, at 7:12 PM, Uli Kusterer wrote: But you don't have to let Xcode frustrate you like this - you can define your own templates for all of the stubs it inserts. How? Where?!!! :-D http://arstechnica.com/apple/guides/2009/04/cocoa-dev-des