Re: a bug in iphone SDK's creation of view based xib files.

2009-09-02 Thread Joey Hagedorn
Hi Jon, On Aug 30, 2009, at 8:01 AM, jon wrote: a bug in iphone SDK's creation of view based xib files. (this is using 3.1, but other's probably apply) steps to reproduce. Please do not discuss unreleased software on this list. You have access to the developer forums which are an approp

Re: Image Thresholding

2009-09-02 Thread Greg Guerin
fawad shafi wrote: I want to convert grayscale or RGB image to Binary Image. Please provide sample code. "What Have You Tried?": http://mattgemmell.com/2008/12/08/what-have-you-tried "Why Questions Go Unanswered": http://perl.plover.com/Questions.html -- GG __

Image Thresholding

2009-09-02 Thread fawad shafi
Hello, I want to convert grayscale or RGB image to Binary Image. Please provide sample code. Thanks in advance. Regards, Fawad Shafi iPhone Application DeveloperAddictive Mobility (ATC). Hotmail® is up to 70% faster. Now good news travels really fast. Try it now. Windows Live: Make it e

[Workaround] Re: My NSUndoManager subclass is broken on SL - how to fix?

2009-09-02 Thread Graham Cox
For anyone interested (doesn't seem like anyone is, unfortunately) I have worked out a solution which can only be described as an inglorious hack. I have submitted a bug report requesting that NSUndoManager is made (optionally) backwards compatible with earlier subclasses of it. Bug# 719339

Re: Getting a StringPtr from Gestalt on 64-bit

2009-09-02 Thread Kyle Sluder
NSHost now does this. --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-admins(at)lists.apple.com Help/Unsubscribe/Update your

Re: NSServices

2009-09-02 Thread Kyle Sluder
Re-read the docs. Your plist needs to specify an array (possibly empty) of valid contexts. Otherwise Snow Leopard assumes you haven't updated your service for 10.6. --Kyle Sluder ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not

Trouble with NSButtonCell

2009-09-02 Thread Dave DeLong
Hi everyone, I'm using Brandon's excellent BWToolkit in a project of mine right now. I'm specifically using the BWTransparentTableView and BWTransparentCheckBoxCell classes. I'd like to customize the CheckBoxCell to fulfill the following requirements: 1. Only invoke the target's action

Re: drawing my image in snow leopard

2009-09-02 Thread Rick C.
yes it does steve thank you very much...still so much to learn! rick From: Steve Christensen To: Rick C. Cc: cocoa dev Sent: Thursday, September 3, 2009 12:37:19 AM Subject: Re: drawing my image in snow leopard Does this not do what you want? [myImage dra

Re: Getting a StringPtr from Gestalt on 64-bit

2009-09-02 Thread Jim Correia
On Sep 2, 2009, at 9:02 PM, Scott Lahteine wrote: My preference pane uses Gestalt(gestaltUserVisibleMachineName, &mySInt32), coercing the SInt32 into a StringPtr to get the Machine Name. On 64-bit I get a warning because StringPtr is a 64-bit pointer on that architecture. Does Gestalt() ens

FW: Image Problem

2009-09-02 Thread fawad shafi
Hello, I am doing the work on Augmented Reality, I have managed to detect the edges of camera captured image as shown in attached file. Now i want to the check that whether the marker image (Colored image) exists anywhere in black and white image or not? Thanks in advance. Regards, Fawad Sh

Getting a StringPtr from Gestalt on 64-bit

2009-09-02 Thread Scott Lahteine
My preference pane uses Gestalt(gestaltUserVisibleMachineName, &mySInt32), coercing the SInt32 into a StringPtr to get the Machine Name. On 64-bit I get a warning because StringPtr is a 64-bit pointer on that architecture. Does Gestalt() ensure that the returned pointer is in the low 4 gigs

NSServices

2009-09-02 Thread Colin Deasy
Hi, I've been trying to get NSServices working for my application recently with no success. I have set it up according to the documentation but it does not appear in the services menu ( however it does appear in the keyboard shortcuts section of the System Preferences as a service menu item)Any

iPhone-detecting call event...

2009-09-02 Thread Farooq zaman
Hi All, Is it possible to detect phone-call event on iPhone? If yes, what are the available APIs? Any help would be highly appreciated, Farooq- ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator c

Binding custom properties in NSCollectionView?

2009-09-02 Thread Rick Mann
Hi. I'm trying to use NSCollectionView. In my NSCollectionViewItem's view, I'd like to have a custom view and bind some of its properties to properties in the NSCollectionViewItems's represented object. Bindings exposed in IB are easy to hook up. I'm not sure where to put code to connect cr

Re: Larger "round button" in Interface Builder?

2009-09-02 Thread Graham Cox
On 03/09/2009, at 8:51 AM, Gabriel Zachmann wrote: Thanks a lot for your response and for the hint! The main reason why I chose the bevel buttons is that I need a row of large buttons. You might consider writing a custom button cell class. Then you can make them look however you want. D

Re: NSTask flaky about posting terminate notification, in 10.6

2009-09-02 Thread Adam R. Maxwell
On Sep 2, 2009, at 3:39 PM, Jens Alfke wrote: On Sep 2, 2009, at 3:25 PM, Dave Keck wrote: o Recently I've found myself rolling my own solutions to problems such as yours, in order to guarantee its level of robustness. I've been resisting giving up on NSTask, but it might be necessary.

Re: I can't find it in the docs so I know I'm missing it some where

2009-09-02 Thread Michael Ash
On Wed, Sep 2, 2009 at 4:41 PM, Harry Jordan wrote: > There' s a good reason to enforce the 99 cent rule. Imagine a scenario in > which a user downloads an app that is advertised as free, only to find that > it's crippled beyond use without a subscription to a service or an internal > upgrade. That

Re: What's the purpose of the "fax" received action?

2009-09-02 Thread Tim McGaughy
On Sep 2, 2009, at 2:58 PM, M Pulis wrote: On Sep 2, 2009, at 9:10 AM, Tim McGaughy wrote: On Aug 25, 2009, at 8:19 AM, Andy Lee wrote: On Aug 25, 2009, at 8:29 AM, Graham Cox wrote: On 24/08/2009, at 5:57 PM, Behrang Saeedzadeh wrote: Hi all, What's the purpose of the "fax" receiv

Re: Larger "round button" in Interface Builder?

2009-09-02 Thread Gabriel Zachmann
In my GUI, I am arranging a row of the so-called "bevel buttons" of Interface Builder at the bottom of the window. Bevel buttons have fallen out of favor, and the HIG recommends you consider alternatives: Thanks a lot for your response and for the hint! The main reason why I chose the bevel

Re: What's actually important to do before exiting?

2009-09-02 Thread Jens Alfke
Erik Buck wrote: - NFS file locks may tie up a file for several minutes when processes terminate incorrectly. That should only be an issue if there's a kernel panic or network partition; the filesystem manages locking and unlocking remote NFS files just like local files, and removes the

Re: NSTask flaky about posting terminate notification, in 10.6

2009-09-02 Thread Jens Alfke
On Sep 2, 2009, at 3:25 PM, Dave Keck wrote: o Recently I've found myself rolling my own solutions to problems such as yours, in order to guarantee its level of robustness. I've been resisting giving up on NSTask, but it might be necessary. Is your code open-source or otherwise available?

Re: What's actually important to do before exiting?

2009-09-02 Thread Jean-Daniel Dupas
Le 2 sept. 2009 à 23:11, Erik Buck a écrit : - Posix message queues are a finite kernal resource that is not freed when processes terminate incorrectly. - Posix semaphores are a finite kernal resource that is not freed when processes terminate incorrectly. - MACH IPC message queues are a fin

Re: NSTask flaky about posting terminate notification, in 10.6

2009-09-02 Thread Dave Keck
In the past I've also had some issues with NSTask, its 'isRunning' property and NSTaskDidTerminateNotification, albeit on 10.5. Here's two notes based on what I've experienced: o Recently I've found myself rolling my own solutions to problems such as yours, in order to guarantee its level of robus

Re: Larger "round button" in Interface Builder?

2009-09-02 Thread Kyle Sluder
On Wed, Sep 2, 2009 at 2:30 PM, Gabriel Zachmann wrote: > In my GUI, I am arranging a row of the so-called "bevel buttons" of > Interface Builder at the bottom of the window. Bevel buttons have fallen out of favor, and the HIG recommends you consider alternatives: http://developer.apple.com/mac/li

Larger "round button" in Interface Builder?

2009-09-02 Thread Gabriel Zachmann
In my GUI, I am arranging a row of the so-called "bevel buttons" of Interface Builder at the bottom of the window. Because the right one will be a very special one, I would like to make it visually very different; so I would like to use the "round button" for it, but this is much smaller th

Re: What's actually important to do before exiting?

2009-09-02 Thread Erik Buck
- Posix message queues are a finite kernal resource that is not freed when processes terminate incorrectly. - Posix semaphores are a finite kernal resource that is not freed when processes terminate incorrectly. - MACH IPC message queues are a finite kernal resource that is not freed when proces

Re: I can't find it in the docs so I know I'm missing it some where

2009-09-02 Thread Harry Jordan
There' s a good reason to enforce the 99 cent rule. Imagine a scenario in which a user downloads an app that is advertised as free, only to find that it's crippled beyond use without a subscription to a service or an internal upgrade. That's no way to build trust in the App Store. Yes, Appl

Re: What's actually important to do before exiting?

2009-09-02 Thread Bill Bumgarner
On Sep 2, 2009, at 1:26 PM, Sidney San Martín wrote: It's well-established that some tasks, like deallocating memory, are totally unnecessary before your application exits, but others, like calling asl_close() if you've called asl_open() earlier, are less established. With the advent of sudden t

What's actually important to do before exiting?

2009-09-02 Thread Sidney San Martín
It's well-established that some tasks, like deallocating memory, are totally unnecessary before your application exits, but others, like calling asl_close() if you've called asl_open() earlier, are less established. With the advent of sudden termination, knowing what needs to be done before exitin

NSTask flaky about posting terminate notification, in 10.6

2009-09-02 Thread Jens Alfke
After upgrading to 10.6 I started seeing problems with my app Murky, which uses NSTask to run the Mercurial version-control tool. What seems to be going on is that an asynchronous NSTask sometimes (maybe 5% of the time?) fails to post its NSTaskDidTerminateNotification. When this happens I

Re: What's the purpose of the "fax" received action?

2009-09-02 Thread M Pulis
On Sep 2, 2009, at 9:10 AM, Tim McGaughy wrote: On Aug 25, 2009, at 8:19 AM, Andy Lee wrote: On Aug 25, 2009, at 8:29 AM, Graham Cox wrote: On 24/08/2009, at 5:57 PM, Behrang Saeedzadeh wrote: Hi all, What's the purpose of the "fax" received action in NSTableView and is it document

Contextual Menus in Snow Leopard

2009-09-02 Thread Knut Lorenzen
This appears to be the final word on Contextual Menus in Snow Leopard: Cheers, Knut ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Ple

Re: Problem with NSFileManager

2009-09-02 Thread Ken Thomases
Moving this to Cocoa-Dev where it's appropriate... On Sep 2, 2009, at 1:50 PM, K. Chen wrote: I ran into a weird situation with NSFileMnager. First my code want to see if a file already exists if (![fileManager fileExistsAtPath:myConfigFile]) the result is NO, so my code goes into the if block

Re: Core Data migration from xml to sqlite

2009-09-02 Thread Adam Swift
On Sep 2, 2009, at 4:51 AM, Ian Kennedy wrote: Hi all, How would I go about doing a one-time migration of application data from an xml persistent store to a sqlite persistent store? i.e. the model stays the same, the data is migrated, and the app uses the sqlite store from there on out.

Re: Macros

2009-09-02 Thread Kyle Sluder
It's more of a language issue than an Xcode issue. (That is, you need to understand the language part before you can set up the Xcode part.) Start here: http://www2.its.strath.ac.uk/courses/c/subsection3_13_4.html#SECTION00013400 --Kyle Sluder ___

Re: Macros

2009-09-02 Thread Steve Christensen
Wouldn't this be better asked on the xcode-users mailing list (assuming you're talking about Xcode debug/release builds)? It doesn't have anything to do with Cocoa. On Sep 2, 2009, at 8:54 AM, Development wrote: Ok I cannot find an example of how to do this online so I'nm asking here. I w

Re: NSOutlineView Source List not looking like expected

2009-09-02 Thread Corbin Dunn
On Sep 2, 2009, at 8:45 AM, Florian Soenens wrote: Hi Corbin, i actually followed the example and if you look closely, it doesn't exactly match mail.app SourceList either. That's why i thought some custom implementation was going on in the other Apple apps. If i find the time i will post

Re: drawing my image in snow leopard

2009-09-02 Thread Steve Christensen
Does this not do what you want? [myImage drawInRect:NSIntegralRect(myCenteredRect) fromRect:...]; steve On Sep 2, 2009, at 9:22 AM, Rick C. wrote: thank you markus i do see that now. since my icon centers the numbers will always change. this should be obvious but what would be the least

Re: drawing my image in snow leopard

2009-09-02 Thread Rick C.
thank you markus i do see that now. since my icon centers the numbers will always change. this should be obvious but what would be the least memory intensive way to constantly round this number... center.x = bounds.width *.5 if center.x is a round number it works as you say. i'm probably mis

Re: Finder-style sorting and the SQL Core Data store, best practice?

2009-09-02 Thread Dave Fernandes
Here's what I came up with (subclass NSArrayController). // Override to strip off the sort descriptor and sort in memory. - (BOOL)fetchWithRequest:(NSFetchRequest*)fetchRequest merge:(BOOL)merge error:(NSError**)error { // Copy fetch request without sort descriptor. NSFetchReques

Re: Finder contextual menu plugin 10.6

2009-09-02 Thread Jean-Daniel Dupas
Le 2 sept. 2009 à 14:10, Marco Cassinerio a écrit : Hi, so far i've build finder plugin using Carbon and SampleCMPlugin code example. Now, with 10.6, Carbon support has been dropped. So, how can i create a finder plugin that works only on 10.6? Use System Services: http://developer.app

Re: What's the purpose of the "fax" received action?

2009-09-02 Thread Tim McGaughy
On Aug 25, 2009, at 8:19 AM, Andy Lee wrote: On Aug 25, 2009, at 8:29 AM, Graham Cox wrote: On 24/08/2009, at 5:57 PM, Behrang Saeedzadeh wrote: Hi all, What's the purpose of the "fax" received action in NSTableView and is it documented somewhere at all? Did a quick search and couldn't

Macros

2009-09-02 Thread Development
Ok I cannot find an example of how to do this online so I'nm asking here. I was never any good at writing macros but I have a bool that needs to be yes if the current build is debug and no if it is release and I'm not sure how to write the macro for that. Could some one point me at a macro

Re: NSOutlineView Source List not looking like expected

2009-09-02 Thread Florian Soenens
Hi Corbin, i actually followed the example and if you look closely, it doesn't exactly match mail.app SourceList either. That's why i thought some custom implementation was going on in the other Apple apps. If i find the time i will post some screenshots to show the difference. Thanks, Flo

Re: Need a launch/loading screen to be displayed while app is starting/initializing?

2009-09-02 Thread Graham Cox
On 03/09/2009, at 1:28 AM, Michael A. Crawford wrote: Anyway, I thought of changing the structure of my app so that the main nib displays the startup and then loads what used to be my main nib with my primary view, menu, etc. I'm not experienced enough with AppKit to know whether or not t

Re: NSOutlineView Source List not looking like expected

2009-09-02 Thread Corbin Dunn
You should see the source list example on the dev site. are you implementing the isGroupRow method and returning YES? You need to do that for the group/title rows. corbin On Sep 2, 2009, at 2:41 AM, Florian Soenens wrote: Hi list, in our app i implemented an NSOutlineView set to SourceLis

Need a launch/loading screen to be displayed while app is starting/initializing?

2009-09-02 Thread Michael A. Crawford
I'm looking for techniques on how to display a startup or loading panel for my app. There is some initial processing that needs to be done and it can sometimes be moderately lengthy in terms of making the user wait. What I'd like to do is display a startup graphic with licensing and copy

Re: how to get a managedObjectContext in a nib file

2009-09-02 Thread Michael Thon
On Sep 2, 2009, at 4:16 PM, Sean Kline wrote: To what entity is your Array Controller bound? (just checking to see if you did this...forgive the question if it is too basic) I finally got it working. Instead of having the window controller set its own managedObjectContext in awakeFromNib,

My NSUndoManager subclass is broken on SL - how to fix?

2009-09-02 Thread Graham Cox
My app subclasses NSUndoManager, so that it can provide a couple of extra things to the app, namely, task coalescing and a change count that I track to see if certain operations which come from a wide variety of places actually submitted an undo task (and hence the undo manager itself is th

Re: how to get a managedObjectContext in a nib file

2009-09-02 Thread Sean Kline
To what entity is your Array Controller bound? (just checking to see if you did this...forgive the question if it is too basic) On Wed, Sep 2, 2009 at 7:53 AM, Michael Thon wrote: > I created a new nib file in my project and in that nib file I need an array > controller bound to my app's managed

Re: contextual menu plugin example in cocoa

2009-09-02 Thread Stephane Madrau
On 01.09.2009 21:02, cocoa-dev-requ...@lists.apple.com wrote: Jean-Daniel Dupas wrote: Yes. CM are deprecated (means do not work at all in Snow Leopard) and should be rewrote as Services. (see Services Programming Guide) That is exactly the kind of little, but spot on comment I find so sore

Re: Changes in KVO behavior on SL?

2009-09-02 Thread Derek Chesterfield
On 2 Sep 2009, at 13:47, Kevin Brock wrote: Likewise, there's never been any guarantee that invoking - observeValueForKeyPath:ofObject:change:context: will provoke the receiver to call -valueForKeyPath: on the object whose property has changed. If the observer wants, it can rely totally on

Re: Changes in KVO behavior on SL?

2009-09-02 Thread Kevin Brock
On Sep 1, 2009, at 6:11 PM, Ken Thomases wrote: On Sep 1, 2009, at 7:14 PM, Kevin Brock wrote: We've got an app that is using keyValueForPath: and observeValueForKeyPath:ofObject:change:context: to keep a status window up-to-date. On 10.5 it works fine. On 10.6 keyValueForPath: is calle

Re: NSScroller width

2009-09-02 Thread Massimiliano Gargani
I'm still stuck with this problem. Anyone can drive me in the right direction? Thanks, Max Il giorno 31/ago/09, alle ore 10:34, Massimiliano Gargani ha scritto: Thanks a lot, I had to subclass also the scroll view but it partially works. Now my code is: @implementation MyScroller + (CGFlo

Re: Finder contextual menu plugin 10.6

2009-09-02 Thread Dave Keck
http://www.cocoabuilder.com/archive/message/cocoa/2009/8/20/243101 http://lists.apple.com/archives/cocoa-dev/2009/Sep/msg00055.html ...etc ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to

Re: drawing my image in snow leopard

2009-09-02 Thread Markus Spoettl
On Sep 2, 2009, at 12:33 PM, Rick C. wrote: i've been using NSImage drawInRect:fromRect:operation:fraction: to draw and center my .icns image in a resizable custom view for some time without issues. now in snow leopard the same code works, however when the custom view is at its minimum size

Finder contextual menu plugin 10.6

2009-09-02 Thread Marco Cassinerio
Hi, so far i've build finder plugin using Carbon and SampleCMPlugin code example. Now, with 10.6, Carbon support has been dropped. So, how can i create a finder plugin that works only on 10.6? Thanks Marco ___ Cocoa-dev mailing list (Cocoa-dev@li

how to get a managedObjectContext in a nib file

2009-09-02 Thread Michael Thon
I created a new nib file in my project and in that nib file I need an array controller bound to my app's managed object context. I made an instance of AppDelegate in the nib file and bound to that. The array controller works except that entities added to the array are not being permanent

Core Data migration from xml to sqlite

2009-09-02 Thread Ian Kennedy
Hi all, How would I go about doing a one-time migration of application data from an xml persistent store to a sqlite persistent store? i.e. the model stays the same, the data is migrated, and the app uses the sqlite store from there on out. I've been unsuccessfully trying to do it inside

Re: After changing to MacOS 10.6 XCode no longer compiles

2009-09-02 Thread I. Savant
On Sep 2, 2009, at 6:20 AM, Horst Jäger wrote: after changing to MacOS 10.6 my XCode no longer compiles. No error message and XCode doesn't freeze. It just says "CompileXIB ..." and that's it. Any idea what I could do? Nothing to do with Cocoa: xcode-users list, please. -- I.S. ___

drawing my image in snow leopard

2009-09-02 Thread Rick C.
hello, i've been using NSImage drawInRect:fromRect:operation:fraction: to draw and center my .icns image in a resizable custom view for some time without issues. now in snow leopard the same code works, however when the custom view is at its minimum size the image is slightly blurry. when i r

Re: After changing to MacOS 10.6 XCode no longer compiles

2009-09-02 Thread Jean-Daniel Dupas
Le 2 sept. 2009 à 12:20, Horst Jäger a écrit : Hi, after changing to MacOS 10.6 my XCode no longer compiles. No error message and XCode doesn't freeze. It just says "CompileXIB ..." and that's it. Any idea what I could do? Which Xcode version ? _

After changing to MacOS 10.6 XCode no longer compiles

2009-09-02 Thread Horst Jäger
Hi, after changing to MacOS 10.6 my XCode no longer compiles. No error message and XCode doesn't freeze. It just says "CompileXIB ..." and that's it. Any idea what I could do? Thanks ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please

Re: Have sheet delay until done?

2009-09-02 Thread Carl Harris
Chase Meadors wrote: The problem is, the -runNewItemSheet method is returning right after starting the sheet. What I want is for it to wait until the didEnd selector is called to return from the - runNewItemSheet method. That way, "readyNewItem" will be properly assigned and not nil. Is there an

NSOutlineView Source List not looking like expected

2009-09-02 Thread Florian Soenens
Hi list, in our app i implemented an NSOutlineView set to SourceList in IB. I implemented the datasource method to set the group items etc but my group items (the ones in uppercase like mail.app, iTunes etc...) don't look exactly like the ones seen in the other Apple apps. What i mean is, the