Re: [[NSFileManager alloc] init] considered thread-safe

2010-05-04 Thread Ken Ferry
On Tue, May 4, 2010 at 11:27 PM, Quincey Morris wrote: > On May 4, 2010, at 22:32, Ken Ferry wrote: > > > Jens is exactly right. > > > > If you are going to use the delegate, you must make your own instance of > NSFileManager. Clearly - if you did that with the shared manager, you and > other th

Re: [[NSFileManager alloc] init] considered thread-safe

2010-05-04 Thread Quincey Morris
On May 4, 2010, at 22:32, Ken Ferry wrote: > Jens is exactly right. > > If you are going to use the delegate, you must make your own instance of > NSFileManager. Clearly - if you did that with the shared manager, you and > other threads would fight over it. > > NSFileManager is otherwise thre

Re: [[NSFileManager alloc] init] considered thread-safe

2010-05-04 Thread Ken Ferry
Jens is exactly right. If you are going to use the delegate, you must make your own instance of NSFileManager. Clearly - if you did that with the shared manager, you and other threads would fight over it. NSFileManager is otherwise threadsafe. There's an open bug to rev the docs. -Ken On Tue,

Re: premultiplying alpha

2010-05-04 Thread Ken Ferry
On Tue, May 4, 2010 at 9:30 AM, David Duncan wrote: > On May 4, 2010, at 8:57 AM, Thomas Davie wrote: > > > After much searching about, I discovered (contrary to what the docs say), > that NSBitmapImageReps do not always premultiply their r/g/b by their alpha. > > I think you're misreading somet

Re: NSSegmentedControl in a toolbar

2010-05-04 Thread Jerry Krinock
On 2010 May 04, at 18:42, Flavio Donadio wrote: > Ok, I can create the NSSegmentedControl in code, but I got to have an NSView > to load it into, anyways. I have an NSSearchField in a toolbar. It is a subview of an NSToolbarItem, not of an NSView. And again, unless you need to be popping thi

Re: My program causes MacBook Pro to use NVidia graphics processor

2010-05-04 Thread Noah Desch
Well your list includes: /System/Library/Frameworks/OpenGL.framework/Resources//GLRendererFloat.bundle/GLRendererFloat /System/Library/Frameworks/OpenGL.framework/Resources/GLEngine.bundle/GLEngine /System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libCoreVMClient.dylib /System/Lib

Re: NSSegmentedControl in a toolbar

2010-05-04 Thread Flavio Donadio
Graham, Thanks for the answer, but I think you didn't get what I want to do. Or I didn't make myself clear enough. > Either create the control in code or create it in IB. Don't do both. Ok, I can create the NSSegmentedControl in code, but I got to have an NSView to load it into, anyways. Even

Re: NSSegmentedControl in a toolbar

2010-05-04 Thread Seth Willits
On May 4, 2010, at 5:46 PM, Graham Cox wrote: > I haven't found a need to use toolbar groups myself (though presumably they > solve a problem I haven't needed to solve so far) AFAICT, multiple labels on a single toolbar item? -- Seth Willits ___

Re: NSSegmentedControl in a toolbar

2010-05-04 Thread Graham Cox
On 05/05/2010, at 9:54 AM, Flavio Donadio wrote: > Finally, in Interface Builder, I inserted an NSSegmentedControl in my toolbar > and bound it to the outlet in the App Delegate instance in the NIB. > > It doesn't work. My segmented control doesn't get the images or labels. > Should it be don

NSSegmentedControl in a toolbar

2010-05-04 Thread Flavio Donadio
Fellows, I tried to search the list for a solution to this problem, but maybe I'm not a good searcher. I am trying to use a NSSegmentedControl in a toolbar, capsule-styled, just like in Mail or Preview. I mean: I want each segment to have its own label, like in the "Reply / Reply All / Forwar

Re: [[NSFileManager alloc] init] considered thread-safe

2010-05-04 Thread Quincey Morris
On May 4, 2010, at 15:09, Jens Alfke wrote: >> 2. What does "thread-safe" mean in this context? I would take it to mean >> that *any* single instance allocated with [[NSFileManager alloc] init] can >> be used by *any* thread. Or does it mean that each thread needs a unique >> instance, but such

Re: [[NSFileManager alloc] init] considered thread-safe

2010-05-04 Thread Jens Alfke
On May 4, 2010, at 2:03 PM, Quincey Morris wrote: 1. Why are the additional instances only "considered" thread-safe. Doesn't anyone know? I think it's using "considered" in a definite sense. 2. What does "thread-safe" mean in this context? I would take it to mean that *any* single instanc

[[NSFileManager alloc] init] considered thread-safe

2010-05-04 Thread Quincey Morris
The documentation for NSFileManager contains this curious statement: > In Mac OS X v 10.5 and later you should consider using [[NSFileManager alloc] > init] rather than the singleton methoddefaultManager. Instances of > NSFileManager are considered thread-safe when created using [[NSFileManager

ScriptingBridge Commands

2010-05-04 Thread John Nairn
I have been using ScriptingBridge to script my AppleScriptable Cocoa app using Python and Ruby. Today I noticed that commands defined on the main application do not work with error message that the application has no such attribute. I checked the header file created by the ScriptingBridge a

Re: Strange NSView/NSWindow behavior

2010-05-04 Thread Murat Konar
On May 4, 2010, at 11:32 AM, vincent habchi wrote: Keeping it short: look up -[NSView mouseDownCanMoveWindow]. Override it to return NO if you never want a click in the view to drag the window. But, if I am not mistaken, when the event is caught and handled, it should not propagate furthe

Re: converting resources, icons, and dialogs to interface builder

2010-05-04 Thread Chris Hanson
On May 4, 2010, at 12:51 PM, Jens Alfke wrote: > On May 4, 2010, at 7:34 AM, Bill Appleton wrote: > >> i am converting many rsrc dialogs from carbon to cocoa (DITL, DLOG) >> is there any automatic tool for converting a dialog to interface builder? > > I would ask on carbon-dev, since many Carbo

Re: converting resources, icons, and dialogs to interface builder

2010-05-04 Thread Jens Alfke
On May 4, 2010, at 7:34 AM, Bill Appleton wrote: there doesn't seem any way to do it except reading NSimage files out of the bundle... is that right? Right. Cursors in Cocoa are NSImages, and these are generally read out of individual image files in the bundle, probably .png. does anyon

Re: Strange NSView/NSWindow behavior

2010-05-04 Thread vincent habchi
> Keeping it short: look up -[NSView mouseDownCanMoveWindow]. Override it to > return NO if you never want a click in the view to drag the window. Thanks a lot, by the way! :) Vincent___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not

Re: Prevent plug-ins from having framework conflicts.

2010-05-04 Thread Kyle Sluder
On Tue, May 4, 2010 at 11:11 AM, Carmen Cerino Jr. wrote: > I would agree with you that plug-ins shouldn't do that if it was not a > plugin framework that was going to be opened up to 3rd party developers or > if its code shared between the application and the plug-ins. I have no > control over wh

Re: Strange NSView/NSWindow behavior

2010-05-04 Thread vincent habchi
Le 4 mai 2010 à 20:26, Greg Parker a écrit : > On May 4, 2010, at 11:18 AM, vincent habchi wrote: >> Hi again, again, and… (let's be short :)) >> >> I have a NSView in a NSWindow. That NSView handles mouse events (mouseDown:, >> Dragged:, Up:). But, to my great astonishment, the event propagates

Re: Strange NSView/NSWindow behavior

2010-05-04 Thread Greg Parker
On May 4, 2010, at 11:18 AM, vincent habchi wrote: > Hi again, again, and… (let's be short :)) > > I have a NSView in a NSWindow. That NSView handles mouse events (mouseDown:, > Dragged:, Up:). But, to my great astonishment, the event propagates through > the underlying window, so that when I dr

Strange NSView/NSWindow behavior

2010-05-04 Thread vincent habchi
Hi again, again, and… (let's be short :)) I have a NSView in a NSWindow. That NSView handles mouse events (mouseDown:, Dragged:, Up:). But, to my great astonishment, the event propagates through the underlying window, so that when I drag inside the view, the window also moves. How come? Any ide

Re: Prevent plug-ins from having framework conflicts.

2010-05-04 Thread Carmen Cerino Jr.
I would agree with you that plug-ins shouldn't do that if it was not a plugin framework that was going to be opened up to 3rd party developers or if its code shared between the application and the plug-ins. I have no control over what frameworks developers use to write plug-ins for my app. Two deve

Re: Prevent plug-ins from having framework conflicts.

2010-05-04 Thread Kyle Sluder
On Tue, May 4, 2010 at 10:22 AM, Carmen Cerino Jr. wrote: > I am currently writing a plug-in framework for my application. I would like > to be able to release plugins without having to update my application, and I > intend on making the framework available for third party plugins. I am > currentl

Prevent plug-ins from having framework conflicts.

2010-05-04 Thread Carmen Cerino Jr.
I am currently writing a plug-in framework for my application. I would like to be able to release plugins without having to update my application, and I intend on making the framework available for third party plugins. I am currently running into issues when two plugins ship with identical framewor

converting resources, icons, and dialogs to interface builder

2010-05-04 Thread Bill Appleton
hi all, i am converting many cursors from carbon to cocoa (CURS) there doesn't seem any way to do it except reading NSimage files out of the bundle... is that right? does anyone know of a good way to go from the resource cursor to the image file? i am converting many rsrc dialogs from carbon to

Menubar in fullscreen oddity

2010-05-04 Thread Gavin Baker
How do I stop NSMenu eating click events in a fullscreen app? I have an application that can switch between running in a normal windowed mode and in fullscreen. The fullscreen mode uses the recommended techniques (capturing the display, running its own event loop, etc) and works just fine, save f

Re: premultiplying alpha

2010-05-04 Thread David Duncan
On May 4, 2010, at 8:57 AM, Thomas Davie wrote: > After much searching about, I discovered (contrary to what the docs say), > that NSBitmapImageReps do not always premultiply their r/g/b by their alpha. > Because of this, I've dived in, and attempted to write my own > premultiplication, but so

premultiplying alpha

2010-05-04 Thread Thomas Davie
After much searching about, I discovered (contrary to what the docs say), that NSBitmapImageReps do not always premultiply their r/g/b by their alpha. Because of this, I've dived in, and attempted to write my own premultiplication, but something is going very wrong. Some images are coming out

Re: "theme" sets with NSUserDefaults

2010-05-04 Thread John Stoneham
On Tue, May 4, 2010 at 10:07 AM, James Bucanek wrote: > I think what you're trying to do is create a set of nested pref values that > can get swapped out, while accessing the current set using bindings. > > The approach I'd take is to organize all of the theme-related settings into > a single dict

Re: "theme" sets with NSUserDefaults

2010-05-04 Thread James Bucanek
John Stoneham wrote (Monday, May 3, 2010 6:59 AM -0500): Here's the scenario. In my (OS X) app's preferences, I'd like the user to be able select between sets of preference settings, and I'd like to be able to use NSUserDefaults for this without having to deal

Re: NSTableView Loading Question

2010-05-04 Thread Keary Suska
On May 4, 2010, at 7:45 AM, Donald Klett wrote: > I want to make sure I am on the right track regarding the NSTableView class. > > In IB, I set the dataSource pointer to my object definition. > > Assuming the initial content of the table view is available, the table view > will > call the numbe

NSTableView Loading Question

2010-05-04 Thread Donald Klett
I want to make sure I am on the right track regarding the NSTableView class. In IB, I set the dataSource pointer to my object definition. Assuming the initial content of the table view is available, the table view will call the numberOfRowsInTableView method and since the return value is > 0, the

Re: NSPrintOperation Fails to Auto-Paginate?

2010-05-04 Thread Chaitanya Pandit
Have a look at the TextEdit sample code in /Developer/Examples/TextEdit The MultiPageView handles that Thanks, Chaitanya Pandit Architect Expersis Software Inc. On May 3, 2010, at 9:33 PM, David Duncan wrote: > On May 2, 2010, at 7:57 PM, DairyKnight wrote: > >> I've been working on a tool to

Re: Core Data Versioning: Non-trivial Value Expressions?

2010-05-04 Thread Chaitanya Pandit
Jerry, Using just the mapping model seems okay if your Core Data) Model is simple, but most likely it would bloat over time and the best thing to do would be to customize the migration process. Actually it's not that hard and in fact makes sense. To start with you create a subclass of NSEntity

Re: advancementForGlyph problem

2010-05-04 Thread steven Hooley
On 3 May 2010 02:00, David F. wrote: > >> How on earth are you determining that it "looks like the advancement >> should only be ~23.2" ? > > By counting pixels. > You mean, for example, the distance from the leftmost pixel of the 'A' to the leftmost pixel in the following glyph? My current think

custom view as a menu item

2010-05-04 Thread Nava Carmon
Hi, I need to implement a menu that looks and feels like that of spotlight: with a search field as a first item and other items will be filled from some xml file on fly. Are there some examples/ideas on how to do it? Thanks a lot, Nava Carmon ncar...@mac.com "Think good and it will be good!"