Re: Finding bounding rect of substring inside a wrapped string

2009-01-07 Thread Martin Wierschin
The title basically says it. I have a string (not very long; less than 150 characters) that is wrapped inside an NSTextField (a label). I want to find the bounding rects of a couple substrings, so that I can overlay them with an NSButton. I've been searching around, and I've found a

Re: [iPhone] Search control like in App Store

2009-01-07 Thread Jonathan Hess
Hey Martijn - If you could file bugs at http://bugreport.apple.com/ about the concepts that you find confusing it would help us improve the usability of the tools. Thanks - Jon Hess On Jan 6, 2009, at 11:47 PM, Martijn van Exel wrote: Thanks - I looked into the TableSearch sample project

NSColorWell----please help

2009-01-07 Thread rethish
Hi all, Please help ... I use nscolorwell to set the backgroundcolor of the textview. It works with the code [textview setBackgroundColor:[colorwel color]]; But there is some problem . The problem is, I have a textview and if I click the colorwell , the text which is to be typed appear in

Re: NSColorWell----please help

2009-01-07 Thread Martin Wierschin
After activating the colorwell ,if we select any colors from that colorwell The backgroundcolor changes and the foregroundcolor changes to the same color if we type. As mentioned, the easiest is to override changeColor: in a NSTextView subclass. Others have done it:

Re: Using the security framework

2009-01-07 Thread Peter N Lewis
At 18:50 -0600 3/1/09, Joe Turner wrote: I am making a hard drive cloner/backuper, and to do some deleting and copying, I need to use the security framework. What I need to be able to do is have the user type in their password one time, and then it would give me system.privilege.admin rights

Re: Using the security framework

2009-01-07 Thread Graham Lee
On 07/01/2009 05:36, Peter N Lewis pe...@stairways.com.au wrote: At 18:50 -0600 3/1/09, Joe Turner wrote: I am making a hard drive cloner/backuper, and to do some deleting and copying, I need to use the security framework. What I need to be able to do is have the user type in their password

Re: Enum advice please

2009-01-07 Thread Jeremy Pereira
On 6 Jan 2009, at 19:59, Quincey Morris wrote: I'm sure someone will jump in and correct me if I'm wrong about this, Jumping in but (in answer to the implied why? in Graham's post) my recollection is that: -- 'typedef' was added to C later in its life, so originally 'enum XXX'

RE: Programmatically locking user screen [Solved]

2009-01-07 Thread Ashish Tiwari
Thanks Jim, Kim, Kyle and Walker. My problem is solved using kiosk, it rocks, I had lost my sleep thinking about some more s/w requirements now with Kiosk we will be able to solve those in minutes. -Original Message- From: Kyle Sluder [mailto:kyle.slu...@gmail.com] Sent: Wednesday,

Parsing XML from a Https URL using NSXMLParser?

2009-01-07 Thread Debajit Adhikary
I'm trying to parse XML directly from an HTTPS URL, as follows: NSString *const URL = @https://some/HTTPS/url;; NSURL* url = [NSURL URLWithString:URL];NSXMLParser* parser = [[NSXMLParser alloc] initWithContentsOfURL:url]; [parser setDelegate:self]; [parser parse]; I have the following delegate

Re: Cocoa Client/Server App

2009-01-07 Thread Jason Stephenson
Try the following in Google: site:developer.apple.com tcp client server The first result should be a link to the TCP Server sample application. Your three questions are really far too general to be answered in a mailing list. You need to find some introductory material on network programming

Re: Cocoa Client/Server App

2009-01-07 Thread Ammar Ibrahim
The sample you sent is deprecated. This is code from 1992 that uses old networking APIs. And I read a complete book about networking programming in C. But my goal is to do it in ObjC/Cocoa. I can't believe that there;s no up to date code to look at! Thanks, Ammar On Wed, Jan 7, 2009 at 1:58 PM,

RE: Binary search on sorted NSArray in Cocoa?

2009-01-07 Thread Karan, Cem (Civ, ARL/CISD)
Ken Thomases wrote on Tuesday, January 06, 2009 11:24 PM: On Jan 6, 2009, at 10:42 AM, Karan, Cem (Civ, ARL/CISD) wrote: I know I'm being pedantic, but just to make sure, will the following code work? // mySortedArray is an NSArray of NSString instances that has been sorted

Re: Cocoa Client/Server App

2009-01-07 Thread Jason Stephenson
Ammar Ibrahim wrote: The sample you sent is deprecated. This is code from 1992 that uses old networking APIs. And I read a complete book about networking programming in C. But my goal is to do it in ObjC/Cocoa. I can't believe that there;s no up to date code to look at! There is more up to

Strange problem of first access to variable

2009-01-07 Thread Vera Tkachenko
Hello to everyone ) Don't even know how to explain correctly problem I have. I was using Debug mode for developing/testing but before release switched to Release mode to test it. The problem is that in release mode the following code doesn't work - files seems to be null. - (void)

Re: Strange problem of first access to variable

2009-01-07 Thread Graham Cox
On 7 Jan 2009, at 11:58 pm, Vera Tkachenko wrote: Could you point me where to find the answer - smth with incorrect files variable initialization/declaration? Have no idea what's wrong. There's no way to answer this with the information given. Since files is passed in to your method,

feed an NSCharacterSet to numberOfRowsInSection delegate method?

2009-01-07 Thread Martijn van Exel
Hi all, If you want to have an a-z sectioned table, wouldn't it make sense to use an NSCharacterSet (in this case, an uppercaseLetterCharacterSet) to feed to the delegate methods numberOfRowsInSection and sectionIndexTitlesForTableView? But [NSCharacterSet uppercaseLetterCharacterSet] returns a

Re: Maintaining mutable values with NSDictionaryControllerKeyValuePair

2009-01-07 Thread Rick Hoge
I pulled my hair out over this one, but I finally found an acceptable workaround, although it doesn't solve the fundamental problem of NSDictionaryController. Thanks very much for the reply and workaround. I will explore this solution further. The NSDictionaryController/bindings route

Re: Strange problem of first access to variable

2009-01-07 Thread Vera Tkachenko
Graham, thanks for the quick reply. I agree that the problem isn't solved correctly by using NSLog - this is just the only method found by me to solve issue. I just thought that symptoms of the problem (need to access variable before it can be used normally) is known. files passed to

Re: Programmatically locking user screen

2009-01-07 Thread Jens Bauer
Hi Ashish, To save you from going down a path you may have to return from: I've used CoreGraphics fullscreen mode, however that's probably not a good approach for you, because if the user is pressing cmd+opt+escape, then the application just quits. -So try avoiding that one. =) Try Jim's

Re: [iPhone] Search control like in App Store

2009-01-07 Thread Robert Marini
Martijn - I don't necessarily know that I'd agree with that though it could be because I'm more accustomed to IB than programmatic layout. In general, anything you'd represent in code as a UIView subclass is something you'd create in a xib file in Interface Builder. That xib file

Re: feed an NSCharacterSet to numberOfRowsInSection delegate method?

2009-01-07 Thread Graham Cox
On 8 Jan 2009, at 12:26 am, Martijn van Exel wrote: But [NSCharacterSet uppercaseLetterCharacterSet] returns a NSCharacterSet and not an NSArray, is there a way (without doing an iteration) to turn a NSCharacterSet into an NSArray of charachters? There's no way even with doing an

Re: Problem with AFP server Notification seek advice.

2009-01-07 Thread Alastair Houghton
On 6 Jan 2009, at 16:58, Sandro Noel wrote: when a server is mounted, and it notifies that it is going offline, I get a bonjour notification that the service disappeared, but so does Finder or OS X, and it dismounts the drives before BM has time to dismount them. and the annoying point is

Re: Parsing XML from a Https URL using NSXMLParser?

2009-01-07 Thread Alastair Houghton
On 7 Jan 2009, at 11:24, Debajit Adhikary wrote: I'm trying to parse XML directly from an HTTPS URL, as follows: NSString *const URL = @https://some/HTTPS/url;; NSURL* url = [NSURL URLWithString:URL];NSXMLParser* parser = [[NSXMLParser alloc] initWithContentsOfURL:url]; [parser

Re: feed an NSCharacterSet to numberOfRowsInSection delegate method?

2009-01-07 Thread Martijn van Exel
On Wed, Jan 7, 2009 at 15:19, Graham Cox graham@bigpond.com wrote: On 8 Jan 2009, at 12:26 am, Martijn van Exel wrote: But [NSCharacterSet uppercaseLetterCharacterSet] returns a NSCharacterSet and not an NSArray, is there a way (without doing an iteration) to turn a NSCharacterSet into

Re: Problem with AFP server Notification seek advice.

2009-01-07 Thread Sandro Noel
Thank you so much !! it's really appreciated. Sandro Noel. On 7-Jan-09, at 9:39 AM, Alastair Houghton wrote: On 6 Jan 2009, at 16:58, Sandro Noel wrote: when a server is mounted, and it notifies that it is going offline, I get a bonjour notification that the service disappeared, but so

Re: Convert GWorldPtr into a NSImage

2009-01-07 Thread Eric Gorr
On Jan 6, 2009, at 6:42 PM, Graham Cox wrote: When I tried to setup a NSBitmapImageRep, I tried NSDeviceRGBColorSpace for the colorSpaceName which I believe expects the pixelFormat for the GWorldPtr to be either RGBA or ARGB. It should be straightforward to wrap an NSBitmapImageRep

Works in main Thread, but not in background Thread

2009-01-07 Thread John Love
This request focuses on an old cocoabuilder thread: http://www.cocoabuilder.com/archive/...007/3/8/179989 David writes: But now I find I have a BOOL method that is rarely and randomly returning NO when the only exit to the method is return YES; so I have some strange problem somewhere. It

Re: Cocoa Client/Server App

2009-01-07 Thread Jean-Daniel Dupas
Le 7 janv. 09 à 14:18, Ammar Ibrahim a écrit : On Wed, Jan 7, 2009 at 2:38 PM, Jason Stephenson ja...@sigio.com wrote: Ammar Ibrahim wrote: The sample you sent is deprecated. This is code from 1992 that uses old networking APIs. And I read a complete book about networking programming

Works in main Thread, but not in background Thread (modified)

2009-01-07 Thread John Love
This request focuses on an old cocoabuilder thread: http://www.cocoabuilder.com/archive/message/cocoa/2007/3/8/179989 David writes: But now I find I have a BOOL method that is rarely and randomly returning NO when the only exit to the method is return YES; so I have some strange problem

Re: Programmatically locking user screen

2009-01-07 Thread Jean-Daniel Dupas
Le 7 janv. 09 à 14:46, Jens Bauer a écrit : Hi Ashish, To save you from going down a path you may have to return from: I've used CoreGraphics fullscreen mode, however that's probably not a good approach for you, because if the user is pressing cmd+opt +escape, then the application just

Re: Cocoa Client/Server App

2009-01-07 Thread Ammar Ibrahim
On Wed, Jan 7, 2009 at 4:59 PM, Jean-Daniel Dupas devli...@shadowlab.orgwrote: Le 7 janv. 09 à 14:18, Ammar Ibrahim a écrit : On Wed, Jan 7, 2009 at 2:38 PM, Jason Stephenson ja...@sigio.com wrote: Ammar Ibrahim wrote: The sample you sent is deprecated. This is code from 1992 that uses

Re: Programmatically locking user screen

2009-01-07 Thread Jens Bauer
Hi Jean-Daniel, Thanks, good comment. Googling for it resultet me in finding... The recommended replacement for this function is CGEventSourceSetLocalEventsFilterDuringSuppressionState. (Which is for 10.4 and later). I haven't tried it out yet, though. Love, Jens On Jan 7, 2009, at

Re: feed an NSCharacterSet to numberOfRowsInSection delegate method?

2009-01-07 Thread glenn andreas
On Jan 7, 2009, at 8:47 AM, Martijn van Exel wrote: On Wed, Jan 7, 2009 at 15:19, Graham Cox graham@bigpond.com wrote: On 8 Jan 2009, at 12:26 am, Martijn van Exel wrote: But [NSCharacterSet uppercaseLetterCharacterSet] returns a NSCharacterSet and not an NSArray, is there a way

Re: Convert GWorldPtr into a NSImage

2009-01-07 Thread Graham Cox
On 8 Jan 2009, at 1:56 am, Eric Gorr wrote: So, it is likely a problem that the pixelFormat (according to the debugger) for the GWorldPtr is BGRA...? The reason it looks like this is likely because of non-native byte ordering. You need to deal with that. NSBitmapImageRep *bitmap_rep

Re: Works in main Thread, but not in background Thread (modified)

2009-01-07 Thread glenn andreas
On Jan 7, 2009, at 9:01 AM, John Love wrote: NSWorkspace *workSpace = [NSWorkspace sharedWorkspace]; NSArray *runningAppDictionaries = [workSpace launchedApplications]; Let me wrap this up by saying when myRoutine is called in my main thread, everything works fine ..

Re: Strange problem of first access to variable

2009-01-07 Thread Vera Tkachenko
Sorry for unnecessary noise - problem was caused by release mode specific problem quite uncorrelated to this issue. -- With regards, Vera Tkachenko [v...@tkachenko.kiev.ua] [ICQ#230923300] [web http://vera.org.ua] ___ Cocoa-dev mailing list

Re: Works in main Thread, but not in background Thread (modified)

2009-01-07 Thread Jason Foreman
Hi John, On Wed, Jan 7, 2009 at 9:01 AM, John Love wrote: NSWorkspace *workSpace = [NSWorkspace sharedWorkspace]; Let me wrap this up by saying when myRoutine is called in my main thread, everything works fine .. but when called by my background thread (via [NSThread

Re: Convert GWorldPtr into a NSImage

2009-01-07 Thread Eric Gorr
On Jan 7, 2009, at 10:24 AM, Graham Cox wrote: However if you need to flip each pixel's byte order you might not have much choice but to iterate over the buffer and do it by hand. It's still going to be much simpler than creating a data provider, etc. You've already got the data, all that

Re: Odd EXEC_BAD_ACCESS after executing URLRequest [SOLVED]

2009-01-07 Thread marc hoffman
Jason, The way you've allocated the connection, it should start automatically. You shouldn't need to call -start manually. This *might* be causing some issues. The documentation doesn't say not to call it on a connection that is already started, but there might be a bug. Try removing this

Re: Odd EXEC_BAD_ACCESS after executing URLRequest [SOLVED]

2009-01-07 Thread Jason Foreman
On Wed, Jan 7, 2009 at 9:43 AM, marc hoffman m...@elitedev.com wrote: wow, that was indeed it. odd, i could have /sworn/ i had seen a separate class method in the docs with a shouldStart parameter, and that this one was supposed to not start it. teaches me to trust my memory ;P Well, your

Re: Convert GWorldPtr into a NSImage

2009-01-07 Thread Daniel Kennett
On 7 Jan 2009, at 15:24, Graham Cox wrote: However if you need to flip each pixel's byte order you might not have much choice but to iterate over the buffer and do it by hand. It's still going to be much simpler than creating a data provider, etc. You've already got the data, all that

Re: Works in main Thread, but not in background Thread

2009-01-07 Thread Nick Zitzmann
On Jan 7, 2009, at 7:57 AM, John Love wrote: Let me wrap this up by saying when myRoutine is called in my main thread, everything works fine .. but when called by my background thread (via [NSThread detachNewThreadSelector:toTarget:withObject:] it definitely does not work. There are a

Re: QTMovieLayer and QCCompositionLayer Don't Start

2009-01-07 Thread David Duncan
On Jan 6, 2009, at 10:14 PM, Gordon Apple wrote: Try turning on garbage collection for CALayerEssentials and tell me if the composition layer runs. It doesn't here. That did it. There are some known bugs with Quartz Composer and Garbage Collection, but I'm not aware of this one. I would

SetWindowModality Replacement

2009-01-07 Thread Russ
I'm still looking for a Cocoa replacement for SetWindowModality --- need to be able to change a dialog window modeless or modal for good reasons (this is a big tricky app, not a toy text editor). I tried calling [NSApp run] as a nested run loop to turn modeless, but NSApp stop:0 killed the

Re: Asyncronous message handling

2009-01-07 Thread Mohan Parthasarathy
On Tue, Jan 6, 2009 at 8:12 PM, Keary Suska cocoa-...@esoteritech.comwrote: On Jan 6, 2009, at 11:14 AM, Mohan Parthasarathy wrote: Let us say that there are two objects A and B. 1) Object A produces some data 2) Object B consumes the data produced by object A When object B sends a

Quartz Composer For Games?

2009-01-07 Thread Chunk 1978
i've recently started studying Quartz Composer as i plan on eventually experimenting with animated GUIs for apps... in browsing, i don't see any mention about Quartz being used for authoring games... do game developers use Quartz Composer? or is there a more suitable industry standard IDE or dev

Query on IPhone application

2009-01-07 Thread Arnab Ganguly
Hi All, I would like to develop IPhone application such when any application crashes in IPhone, it would send the crash/error report to webserver through http requests.Have you come accross any sort of similar application or atleast can you give me some pointers as how to start with. Thanks in

Re: Enum advice please

2009-01-07 Thread Quincey Morris
On Jan 7, 2009, at 03:12, Jeremy Pereira wrote: enum was added to C after typedef. When I first started learning C in the mid 80's (from K R first edition), typedef already existed as a keyword but enum didn't. In fact, I don't think enum became an official part of C until the first

Re: Query on IPhone application

2009-01-07 Thread Clark Cox
On Wed, Jan 7, 2009 at 9:48 AM, Arnab Ganguly agangul...@gmail.com wrote: Hi All, I would like to develop IPhone application such when any application crashes in IPhone, it would send the crash/error report to webserver through http requests.Have you come accross any sort of similar

Re: Crash as NSPersistentDocument creates its persistence stack

2009-01-07 Thread Jerry Krinock
On 2008 Dec, 25, at 22:55, Jerry Krinock wrote: So, tomorrow I'm going to copy all of my old files to the new project and I expect that it will work again. Oh well, the project was in need of a renaming and a housecleaning anyhow. Just in case anyone else has this problem, be advised

Re: Query on IPhone application

2009-01-07 Thread Robert Marini
Not necessarily, they don't have access to the system crash log but it's certainly possible to roll your own crash reports. For instance - http://www.restoroot.com/Blog/2008/10/18/crash-reporter-for-iphone-applications/ and

Re: Automatically filling an app with test data

2009-01-07 Thread Scott Ribe
What I'm looking for is some tool that reads the model of my app, takes some range for the values of attributes and generates a bulk of data my app can read. I know of no such thing, but just wanted to comment that it sounds like a very useful utility--perhaps someone should create such a

Re: Asyncronous message handling

2009-01-07 Thread Keary Suska
On Jan 7, 2009, at 10:44 AM, Mohan Parthasarathy wrote: NSNotificationCenter? Object Delegation Pattern http://developer.apple.com/documentation/Cocoa/Conceptual/CocoaFundamentals/CommunicatingWithObjects/chapter_6_section_4.html#//apple_ref/doc/uid/TP40002974-CH7-SW26 ? Key-Value

Re: Quartz Composer For Games?

2009-01-07 Thread Erik Buck
http://www.quartzcompositions.com/phpBB2/upload/details.php?file=378 ___ 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

Re: Crash as NSPersistentDocument creates its persistence stack

2009-01-07 Thread mmalc Crawford
On Jan 7, 2009, at 9:56 AM, Jerry Krinock wrote: Problem ID number 6478155. Using the project as provided, you get the same error -- 2009-01-07 09:40:51.689 DepartmentAndEmployees[27205:10b] +entityForName: could not locate an entity named 'Department' in this model. whichever of

Re: Asyncronous message handling

2009-01-07 Thread Mohan Parthasarathy
On Wed, Jan 7, 2009 at 10:20 AM, Keary Suska cocoa-...@esoteritech.comwrote: On Jan 7, 2009, at 10:44 AM, Mohan Parthasarathy wrote: NSNotificationCenter? Object Delegation Pattern

Re: Quartz Composer For Games?

2009-01-07 Thread Chunk 1978
nice! thanks for the link :) On Wed, Jan 7, 2009 at 1:31 PM, Erik Buck erik.b...@sbcglobal.net wrote: http://www.quartzcompositions.com/phpBB2/upload/details.php?file=378 ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post

substitute of QLThumbnailImageCreate() for 10.4 Tiger compatability

2009-01-07 Thread Parimal Das
Hi, my app needs to extract finder icons in preview mode. i am using QLThumbnailImageCreate() to get those in 10.5 leopord i want my app to run on 10.4 Tiger also , but icon services api is filled with deprecated methods so how it is possible to write a same app which will run on both 10.4 and

Dock menu item action isn't performed in modal state

2009-01-07 Thread Ondrej Valik
Hello. I'm using delegate's applicationDockMenu: method for returning my custom dock menu. It has a single menu item. This menu item has its target/action properly set up and my dock menu delegate implements worksWhenModal method (returning YES). So my menu item is enabled when my app is

getting NSTableView -selectedColumn or -selectedCell

2009-01-07 Thread Barton Wells
I'm trying to get the selected cell of an NSTableView when selected by the user. I am using the delegate method tableViewSelectionDidChange: and within it have tried calling both - selectedColumn and I've tried -selectedCell. -selectedColumn always returns -1, and -selectedCell always

Re: Accessing inputs in a quartz composition programatically

2009-01-07 Thread Matt Long
If you are using a QCView, use this: http://developer.apple.com/technotes/tn2005/tn2146.html If you are using Core Animation (i.e. QCCompositionLayer), try this blog post: http://www.cimgf.com/2008/09/24/core-animation-tutorial-core-animation-and-quartz-composer-qccompositionlayer/ and

Re: Crash as NSPersistentDocument creates its persistence stack

2009-01-07 Thread Jerry Krinock
On 2009 Jan, 07, at 10:40, mmalc Crawford wrote: The error seems to correctly describe the problem... Department is in a separate model (MyDocument) that you must include in order for the entity to be found in: Yes, you're correct mmalc. I didn't watch that carefully enough, and this

Re: getting NSTableView -selectedColumn or -selectedCell

2009-01-07 Thread Corbin Dunn
howdy, There is no selected cell -- only a selected row or column, which can contain one or more cells. Do you mean the focused cell, as in tabb'ed into on SnowLeopard? Or, what are you trying to do? I may be able to offer advice. corbin On Jan 7, 2009, at 10:28 AM, Barton Wells wrote:

Re: Cannot finalize a class object

2009-01-07 Thread Bill Bumgarner
On Jan 6, 2009, at 9:08 PM, Nick Zitzmann wrote: The first thing it does is it calls objc_startCollectorThread() at the top of main(). Then later on in main(), I call an object's class method. Shortly afterward, I get the strangest exception on the collector thread: ***

Re: Python-Cocoa Development

2009-01-07 Thread Bill Bumgarner
On Jan 6, 2009, at 5:16 AM, Nascimento, Ronaldo M. wrote: I have spent some time developing in Obj-C and Cocoa, however most of my previous work was done in python. So I am trying to develop Cocoa (AppKit) stuff with Python and Xcode 3.1.2 but the documentation is sorely lacking. And if

Re: [iPhone] Search control like in App Store

2009-01-07 Thread Mohan Parthasarathy
Hi, I agree that IB is useful but sometimes does not work as expected (mostly because i am doing something wrong). I am new to Cocoa Application development and perhaps takes times to get used to it. Recently i was trying to use UIWebView (one of the views in my navigation hierarchy). And my

NSScrollView refuses to scroll

2009-01-07 Thread Jason Cox
Hey guys, If you, in IB, create a new window, throw a NSScrollView in there, set its autosizing to keep 100% width / height when you resize the superview, then put an NSTextView at the bottom edge of the scrollview, compile and resize the window up to hide the NSTextView it wont put a

Re: NSScrollView refuses to scroll

2009-01-07 Thread j o a r
On Jan 7, 2009, at 1:13 PM, Jason Cox wrote: If you, in IB, create a new window, throw a NSScrollView in there, set its autosizing to keep 100% width / height when you resize the superview, then put an NSTextView at the bottom edge of the scrollview, compile and resize the window up to

Re: Scheduling an application

2009-01-07 Thread Scott Ribe
If you mean run a task at a particular time when your application is already running, see NSTimer. If you mean launch your application at a particular time, see launchd--although what you'd probably want is launchd to run a background app at login which would always run, monitoring the schedules,

Re: NSScrollView refuses to scroll

2009-01-07 Thread j o a r
On Jan 7, 2009, at 1:26 PM, j o a r wrote: // A suggestion The correct thing to do is typically not to start with a scroll view. If you simply drag out a text view from the library it comes wrapped in a scroll view already - No need to add a scroll view manually. If you need to set it up

How to obtain icon displayed by Finder for a file

2009-01-07 Thread David
Hello,Is there a way to obtain the icon that finder uses to display for a file system object? Such things as the folder icon for folders, PDF icon for pdfs etc. Thanks ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin

Re: Manual Core Data schema migration in -[NSPersistentDocument configurePersistentStoreCoordinatorForURL:ofType:...] without document changed error?

2009-01-07 Thread sanchezm
NSDocument tracks the moving of the file and this is done after the code in configurePersistentStore... is executed. One way to possibly work around this is to delay the setting of the URL and modification date. At the end of your configurePersistentStore... implementation, do a call to

Re: How to obtain icon displayed by Finder for a file

2009-01-07 Thread Rob Rix
Check out -[NSWorkspace iconForFile:] in the docs. Rob On 7-Jan-09, at 4:42 PM, David wrote: Hello,Is there a way to obtain the icon that finder uses to display for a file system object? Such things as the folder icon for folders, PDF icon for pdfs etc. Thanks

Re: How to obtain icon displayed by Finder for a file

2009-01-07 Thread Peter Ammon
On Jan 7, 2009, at 1:42 PM, David wrote: Hello,Is there a way to obtain the icon that finder uses to display for a file system object? Such things as the folder icon for folders, PDF icon for pdfs etc. You can use -[NSWorkspace iconForFile:] if you want to get a specific file's icon,

Re: How to obtain icon displayed by Finder for a file

2009-01-07 Thread j o a r
On Jan 7, 2009, at 1:42 PM, David wrote: Hello,Is there a way to obtain the icon that finder uses to display for a file system object? Such things as the folder icon for folders, PDF icon for pdfs etc. See: NSWorkspace j o a r ___

Re: Cocoa Support for Mail

2009-01-07 Thread David Hoerl
Cocoa provides the NSMailDelivery class to support sending email from a Cocoa application. Is there an analog for receiving email? what is the best way for the application to receive emails? Look at EDMessage - for historical information look at this page:

Can I call unbind: in finalize? Is it thread safe?

2009-01-07 Thread Sean McBride
Hi all, Is it safe to call unbind: in finalize? Is unbind: thread-safe? Traditionally, Apple has recommended calling unbind: in a view's dealloc method. With GC one might be tempted to call it in finalize, but 1) finalize is discouraged in general 2) finalize implementations must be thread

Re: Problem with AFP server Notification seek advice.

2009-01-07 Thread Sandro Noel
Is there any documentation available for this framework besides the Header files description ? Thanks you. Sandro Noel. On 7-Jan-09, at 9:39 AM, Alastair Houghton wrote: On 6 Jan 2009, at 16:58, Sandro Noel wrote: when a server is mounted, and it notifies that it is going offline, I get

MEETING: Chicago CocoaHeads / CAWUG Tuesday Jan. 13th

2009-01-07 Thread Bob Frank
The Chicago CocoaHeads / Chicago Cocoa and WebObjects User Group is holding our next meeting Tuesday, January 13th, at 7:00 PM at the Apple Store on Michigan Ave. Agenda: - Special Apple Store Presentation: Jason Fried, founder of 37 Signals - adjournment to O'Toole's

Re: Dock menu item action isn't performed in modal state

2009-01-07 Thread Peter Ammon
On Jan 7, 2009, at 8:05 AM, Ondrej Valik wrote: Hello. I'm using delegate's applicationDockMenu: method for returning my custom dock menu. It has a single menu item. This menu item has its target/action properly set up and my dock menu delegate implements worksWhenModal method (returning

[MEET] CocoaHeads-NYC meeting Thu 01/08

2009-01-07 Thread Andy Lee
The January meeting of CocoaHeads-NYC is Thursday Jan 8 (Elvis's birthday) from 6:00PM to 8:00PM at Tekserve, at 119 West 23rd between 6th and 7th http://www.tekserve.com. This month once again you're encouraged to bring Cocoa programming questions and see if any among us can help.

Re: Can I call unbind: in finalize? Is it thread safe?

2009-01-07 Thread Ron Lue-Sang
On Jan 7, 2009, at 1:55 PM, Sean McBride wrote: Hi all, Is it safe to call unbind: in finalize? Is unbind: thread-safe? Traditionally, Apple has recommended calling unbind: in a view's dealloc method. With GC one might be tempted to call it in finalize, but 1) finalize is discouraged in

Re: substitute of QLThumbnailImageCreate() for 10.4 Tiger compatability

2009-01-07 Thread Andrew Farmer
On 07 Jan 09, at 07:08, Parimal Das wrote: my app needs to extract finder icons in preview mode. i am using QLThumbnailImageCreate() to get those in 10.5 leopord i want my app to run on 10.4 Tiger also , but icon services api is filled with deprecated methods so how it is possible to write a

Re: How to obtain icon displayed by Finder for a file

2009-01-07 Thread David
Great! Thanks for the info. I hoped it was something simple. Next question though... how do I set the icon (image) for a 1st column of an outline view and have it show text as well? I found an example using NSBrowserCell but that doesn't seem to work in an outline view. I can't find any other

Re: Manual Core Data schema migration in -[NSPersistentDocument configurePersistentStoreCoordinatorForURL:ofType:...] without document changed error?

2009-01-07 Thread Barry Wark
On Wed, Jan 7, 2009 at 1:46 PM, sanchezm sanchez...@gmail.com wrote: NSDocument tracks the moving of the file and this is done after the code in configurePersistentStore... is executed. One way to possibly work around this is to delay the setting of the URL and modification date. At the end of

Re: How to obtain icon displayed by Finder for a file

2009-01-07 Thread Rob Rix
Either make your own cell class, or use two columns for that. I’d recommend the latter due to simplicity, but it may not give you the look you’re going for. Sincerely, Rob On 7-Jan-09, at 5:36 PM, David wrote: Great! Thanks for the info. I hoped it was something simple. Next question

Re: Cocoa Support for Mail

2009-01-07 Thread Torsten Curdt
EDMessage had fallen into disrepair and would not build when I looked at it last year. I updated the source and merged in SSL and authentication from OPMessageServices, and turned it over to the original EDMessage team. The updated source is now on the web at:

Custom tracking in a NSTextFieldCell

2009-01-07 Thread Eric Gorr
I need to do some custom mouse tracking in a NSTextFieldCell. Based on the documentation, when a cell is clicked, - (BOOL)startTrackingAt:(NSPoint)startPoint inView:(NSView *)controlView should be called. However, neither this method nor - (void)stopTracking:(NSPoint)lastPoint

Re: Convert GWorldPtr into a NSImage

2009-01-07 Thread Eric Gorr
On Jan 7, 2009, at 11:31 AM, Daniel Kennett wrote: To further support this theory, take a look at this NSImage where I mistakenly only flipped half of my data - the garbled half of the image is from data with the wrong endian-ness: Well, I wrote the code to change the pixel format from

re: Large Core Data memory allocations for small rows

2009-01-07 Thread Ben Trumbull
We're running into a situation where Core Data is making very large memory allocations when faulting in small amounts of data. The entity has: - 2x Date - Int16 - 4x Int32 - Boolean - String - to-one relationship - String (in a subentity) - to-one relationship (in a subentity)

Re: Binding of Object and Value in NSPopupButtonCell

2009-01-07 Thread Jerry Krinock
On 2009 Jan, 06, at 19:19, Ken Thomases wrote: I would think you would want Content to refer to the allowed ranks in their raw object form, not their string. So, don't use a value transformer here. You wouldn't bind Content Objects because it would just be the same as Content. In order

Re: Convert GWorldPtr into a NSImage

2009-01-07 Thread Graham Cox
On 8 Jan 2009, at 10:27 am, Eric Gorr wrote: On Jan 7, 2009, at 11:31 AM, Daniel Kennett wrote: To further support this theory, take a look at this NSImage where I mistakenly only flipped half of my data - the garbled half of the image is from data with the wrong endian-ness: Well, I

NSOperation Question

2009-01-07 Thread Sandro Noel
Greetings! I've been using NSOperation in my applications and I enjoy it's simplicity. All my Operations go into a NSOperationQueue. How would I go about having an operation stay alive as long as my application is alive, This is what I want to do. I use DiskAppearedCallback /

Returning value from detached NSThread selector with multiple arguments.

2009-01-07 Thread John Cassington
Hi, I have a class (JCDataCollector) which I use to collect a large amount of data from the users machine. JCDataCollector has a publicly-accessible method named collectData:usingFile:shouldLogOutput:. This method is very resource-intensive, and I would like to move it onto its own thread. So

How can I draw a custom bezel/background for an NSSegmentedCell?

2009-01-07 Thread Jim Correia
I have an NSSegmentedControl for which I'd like to draw a custom background or bezel for the overall control. Normally I'd do this by overriding -drawWithFrame:iinView: or - drawInteriorWithFrame:inView: to do this. However, if I do this for NSSegmentedCell, I also bypass all the extra

Re: Returning value from detached NSThread selector with multiple arguments.

2009-01-07 Thread Graham Cox
On 8 Jan 2009, at 12:13 pm, John Cassington wrote: Hi, I have a class (JCDataCollector) which I use to collect a large amount of data from the users machine. JCDataCollector has a publicly-accessible method named collectData:usingFile:shouldLogOutput:. This method is very resource-intensive,

Tiger vs Leopard Printing

2009-01-07 Thread David Blanton
I build my app with the MACOSX10.4u.sdk. When the following is executed: [[NSPrintOperation printOperationWithView:catalog] runOperationModalForWindow:mainWindow delegate:self didRunSelector:nil contextInfo:nil]; the Tiger and Leopard print panels are different. In Leopard you can

Re: Returning value from detached NSThread selector with multiple arguments.

2009-01-07 Thread John Cassington
After testing, the dictionary concept works perfectly! Thanks! With regard to the originating thread retaining a reference to the dictionary, is there a way for the original thread to know when processing has completed on the secondary thread? I would like my method to be run on a separate

NSOutlineView indentation

2009-01-07 Thread James Walker
Is there any way to change the difference in indentation between levels in an NSOutlineView, without changing the indentation of the top level? Having the indentation affect the top level may be technically consistent, but I don't know why anyone would want it to work that way. I searched

Re: NSOperation Question

2009-01-07 Thread Nick Zitzmann
On Jan 7, 2009, at 5:45 PM, Sandro Noel wrote: I use DiskAppearedCallback / DiskDisappearedCallback from the DiskArbitration Framework in my application and I want the to be in their separate thread. How can i have the thread not quit as soon as the callback's are registered? The

  1   2   >