NSProgressIndicator thread safe?

2008-07-03 Thread Micha Fuhrmann
Hi everyone, one of my user has its MBP crashing on me, I just can't figure what the problem is, here's the crashed thread: Thread 5 Crashed: 0 com.apple.CoreFoundation0x964dd0eb CFArrayAppendValue + 43 1 com.apple.AppKit 0x94be0819 -[NSView _focusInto:withClip

Re: How to converting a Carbon nib to Cocoa?

2008-07-03 Thread Jean-Daniel Dupas
Anyway, it does note make sense, as upgrading the view without rewriting all the logic using Cocoa paradigms is probably not a good idea. Unlike Carbon nib, Cocoa nib are not just a set of interface object with some property and flags, they also contains lots of information about action, ta

Re: Core data transformer direction

2008-07-03 Thread Quincey Morris
On Jul 2, 2008, at 23:37, mmalc crawford wrote: It's not clear in what way the first paragraph "says that the forward transformation is NSData->SomeClass" -- it states that the transformer is used "to convert the attribute to and from an instance of NSData" -- at worst it's ambiguous. The

Loading Debugger After playing audio file

2008-07-03 Thread SridharRao M
Hi, I am developing application for playing audio on iPhone.I am using AudioFileServices & AudioQueueServices to play the audio. After Playing one audio file it's loading GDB .I am properly using audioqueuedispose & audiofileclose after playing completed. But i am not able to identify why the

Re: Loading Debugger After playing audio file

2008-07-03 Thread SridharRao M
On Thu, Jul 3, 2008 at 2:09 PM, SridharRao M <[EMAIL PROTECTED]> wrote: > Hi, > > I am developing application for playing audio on iPhone.I am using > AudioFileServices & AudioQueueServices to play the audio. > > After Playing one audio file it's loading GDB .I am properly using > audioqueuedisp

NSImageView not responding to clicks.

2008-07-03 Thread Papa-Raboon
Hi all, I have a method that when run opens a web browser and takes the user to a URL and I have figured out how to use a button to call this method but if I wanted to click on an image in an NSImageView instead then is there something extra i have to do to make the image or image view respond to

RE: NSProgressIndicator thread safe?

2008-07-03 Thread Abernathy, Joshua
None of the AppKit is thread-safe. Check out -performSelectorOnMainThread. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] ] On Behalf Of Micha Fuhrmann Sent: Thursday, July 03, 2008 3:30 AM To: Cocoa-Dev List Subject: NSProgressIndicator thread safe? Hi everyone, on

Re: How to converting a Carbon nib to Cocoa?

2008-07-03 Thread Tommy Nordgren
On 3 jul 2008, at 06.47, Steve Christensen wrote: This question was asked recently on the carbon-dev list and the answer was that there is no way to automate the process, nor even a method to get you part-way. Unfortunately this is likely to be one of those painful transitions for you...

Re: How to converting a Carbon nib to Cocoa?

2008-07-03 Thread Kyle Sluder
On Thu, Jul 3, 2008 at 8:27 AM, Tommy Nordgren <[EMAIL PROTECTED]> wrote: > So it is a matter of writing and applying a suitable xsl stylesheet file. The transformations required to obtain a meaningful Cocoa XIB from a Carbon NIB are impossible to express in XSL. Or any language for that matter.

Re: How to converting a Carbon nib to Cocoa?

2008-07-03 Thread Tommy Nordgren
On 3 jul 2008, at 14.54, Kyle Sluder wrote: On Thu, Jul 3, 2008 at 8:27 AM, Tommy Nordgren <[EMAIL PROTECTED] > wrote: So it is a matter of writing and applying a suitable xsl stylesheet file. The transformations required to obtain a meaningful Cocoa XIB from a Carbon NIB are impossible to

Re: NSImageView not responding to clicks.

2008-07-03 Thread Papa-Raboon
Anybody got any tips for this one please? 2008/7/3 Papa-Raboon <[EMAIL PROTECTED]>: > Hi all, > > I have a method that when run opens a web browser and takes the user > to a URL and I have figured out how to use a button to call this > method but if I wanted to click on an image in an NSImageView

Re: NSImageView not responding to clicks.

2008-07-03 Thread Andy Lee
Do you really need to use an NSImageView? You can use a button that contains an image instead of text. In IB, open the inspector and select the Button Attributes tab. You can specify the "Image" and the "Alt. Image". --Andy On Jul 3, 2008, at 6:53 AM, Papa-Raboon wrote: Hi all, I ha

Re: Methods that return autoreleased objects?

2008-07-03 Thread Mike Ferris
And, as long as we're on the topic... who can name the only other exceptional case for the "release only if you alloc,new, copy or retain" rule? (It's pretty old-school...) How about if you're implementing an initializer for a class cluster that decides, perhaps based on parameters, tha

Re: NSOutlineView assertion failure on redraw .. ?

2008-07-03 Thread Corbin Dunn
Hi Michael, The assertion is definitely bad. Can you please log a bug for this? Ideally, if you have a test case for it, please include that in the bug report. To get you moving on the problem, please run it under the debugger and break on objc_exception_throw (I think that is hit with NSA

How to support dictionary service in a custom text view?

2008-07-03 Thread Charles Srstka
Okay, so I've got a custom text view that's a subclass of NSView (not NSTextView). I've followed the instructions on this page: http://developer.apple.com/documentation/Cocoa/Conceptual/InputManager/Tasks/TextViewTask.html#/ /apple_ref/doc/uid/20001040 I override acceptsFirstResponder to ret

Does this caution need fixed? (newb)

2008-07-03 Thread Chris Paveglio
I have a loop that gets the user's home directory, and then adds a string to complete the file path for several files. This line: theSettings = [NSHomeDirectory() stringByAppendingPathComponent:[myPrefs objectAtIndex:i]]; gives me a caution sign when I compile. It says "assignment from distinct

Re: Does this caution need fixed? (newb)

2008-07-03 Thread Andy Lee
You're assigning a value to theSettings. That's what the "assignment" in the warning message refers to. What is theSettings declared as? You should fix your code so that all warnings go away. Warnings almost always indicate that something could potentially go wrong, so you might as well

Re: tracking area problems on 10.4.11

2008-07-03 Thread Wesley Smith
Hi Tony, Thanks for the response. I'm still not getting the trigger. Based on your advice, I changed the code to: NSRect f = [mWindow frame]; f.origin.x += 10.; f.origin.y += 10.; f.size.width -= 20.; f.size.height -= 20.; [[mWindow contentView] addTrackin

Re: tracking area problems on 10.4.11

2008-07-03 Thread Wesley Smith
I did that. my window and content view both have those methods defined. I've tried setting both of them to owner to no avail :( wes On Wed, Jul 2, 2008 at 11:18 AM, Tony Becker <[EMAIL PROTECTED]> wrote: > Change the owner: parameter from [mWindow contentView] to self, or whatever > class insta

Re: tracking area problems on 10.4.11

2008-07-03 Thread Wesley Smith
> The rect parameter here is in the coordinate system of the receiver, > so this makes no sense. Instead pass [[mWindow contentView] bounds]. Thanks!! Hit the nail on the head. Now it actually works. > By passing the window's frame, you're taking the window's location in > screen coordinates an

Re: NSProgressIndicator thread safe?

2008-07-03 Thread Corbin Dunn
On Jul 3, 2008, at 5:10 AM, Abernathy, Joshua wrote: None of the AppKit is thread-safe. Check out -performSelectorOnMainThread. While generally true, this isn't the case. The heart beat thread is run by appkit. Micha: what does thread 1's bt look like? corbin -Original Message---

RE: tracking area problems on 10.4.11

2008-07-03 Thread Abernathy, Joshua
Owner should be whoever responds to your tracking events. I really doubt that's the contentView. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] ] On Behalf Of Wesley Smith Sent: Wednesday, July 02, 2008 2:11 PM To: Tony Becker Cc: Cocoa mailing list Subject: Re: track

[ANN] PreFab Event Taps Testbench 1.1

2008-07-03 Thread Bill Cheeseman
I've posted PreFab Event Taps Testbench 1.1 at . This is a free utility for software developers. Use it to explore what your applications can do with Quartz event taps. In addition, you should find it to be a useful tool to test drivers for hardware inp

Re: Does this caution need fixed? (newb)

2008-07-03 Thread Kyle Sluder
On Thu, Jul 3, 2008 at 12:40 PM, Chris Paveglio <[EMAIL PROTECTED]> wrote: > I have a loop that gets the user's home directory, and then adds a string to > complete the file path for several files. > > This line: > theSettings = [NSHomeDirectory() stringByAppendingPathComponent:[myPrefs > objectA

Re: How to converting a Carbon nib to Cocoa?

2008-07-03 Thread Gary L. Wade
Apparently you haven't perused the XML used by Carbon NIBs. There's lots of linkages across the format so that any particular object is not as completely self-contained as you believe. > >On 3 jul 2008, at 14.54, Kyle Sluder wrote: > >> On Thu, Jul 3, 2008 at 8:27 AM, Tommy Nordgren <[EMAIL PRO

NSTokenField and NSFormatter

2008-07-03 Thread [EMAIL PROTECTED]
i would like to use a subclass of NSFormatter with a NSTokenField. i've discovered that the partial string passed to -isPartialStringValid:proposedSelectedRange:originalString:originalSelectedRange:errorDescription: consists of zero or more unicode object replacement characters (\ufffc) as

Re: Does this caution need fixed? (newb)

2008-07-03 Thread Sherm Pendley
On Thu, Jul 3, 2008 at 1:47 PM, Kyle Sluder <[EMAIL PROTECTED]> wrote: > > Many (dare I say most?) developers consider warnings to be the > equivalent of the compiler vomiting in its mouth -- errors are the > subsequent suffocation. Perhaps you can tell how strongly I feel > about this. I complet

newbie memory management

2008-07-03 Thread ghe
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Xcode 3.1, Leopard, Intel, garbage collector My program acts like a jukebox sometimes, playing one cut after another. Every time it starts a new one, the memory usage (as reported by ActivityMonitor) goes up by the size of the cut's sound file. And a

Re: Does this caution need fixed? (newb)

2008-07-03 Thread Chris Paveglio
My code is like this: NSMutableString *theSettings; theSettings = [[NSMutableString alloc] init]; //myPrefs is an array of strings, each item is like "Library/Safari" int i; for (i = 0; i < 8; i++ { theSettings = [NSHomeDirectory() stringByAppendingPathComponent:[myPrefs objectA

Re: Does this caution need fixed? (newb)

2008-07-03 Thread Jason Stephenson
Chris Paveglio wrote: My code is like this: NSMutableString *theSettings; theSettings = [[NSMutableString alloc] init]; //myPrefs is an array of strings, each item is like "Library/Safari" int i; for (i = 0; i < 8; i++ { theSettings = [NSHomeDirectory() stringByAppendingPathCom

Re: How to support dictionary service in a custom text view?

2008-07-03 Thread Charles Srstka
On Jul 3, 2008, at 12:03 PM, Charles Srstka wrote: Okay, so I've got a custom text view that's a subclass of NSView (not NSTextView). I've followed the instructions on this page: http://developer.apple.com/documentation/Cocoa/Conceptual/InputManager/Tasks/TextViewTask.html#/ /apple_ref/doc/u

Re: Does this caution need fixed? (newb)

2008-07-03 Thread Michael Watson
Well, look at what you're doing: 1. First, you declare a pointer to an NSMutableString object called "theSettings". 2. You then allocate and initialize an empty NSMutableString object. A pointer to some address in memory is returned, and you assign theSettings to this value. Now theSettin

Re: Does this caution need fixed? (newb)

2008-07-03 Thread Andy Lee
On Jul 3, 2008, at 2:57 PM, Chris Paveglio wrote: My code is like this: NSMutableString *theSettings; There's the cause of the warning. NSMutableString is a subclass of NSString, which means every NSMutableString is an NSString, but not vice versa. The stringByAppendingPathComponent: m

NSDateFormatter question

2008-07-03 Thread Chuck Soper
Hello, Currently, I'm creating a NSDateFormatter instance as follows: dateFormatter = [[NSDateFormatter alloc] init]; [dateFormatter setDateStyle:kCFDateFormatterMediumStyle]; [dateFormatter setTimeZone:myTimeZone]; Assuming that the user hasn't modified their International formats using

launchd daemon at boot time

2008-07-03 Thread Nathan Wan
Hi all, I followed documentation here (http://developer.apple.com/documentation/MacOSX/Conceptual/BPSystemStartup/ Articles/LaunchOnDemandDaemons.html#//apple_ref/doc/uid/TP40001762-108425) but still cannot get my daemon to work. I have written the proper .plist to be loaded into launchctl, an

Re: Does this caution need fixed? (newb)

2008-07-03 Thread Steve Christensen
On Jul 3, 2008, at 9:40 AM, Chris Paveglio wrote: Also, should my code be "caution free" as a sign of clean coding or can some cautions that don't affect functionality be dismissed? I'm one of those people who turns on just about every warning and then fixes the code that generates the warn

Re: Contextual menu in Finder

2008-07-03 Thread Peter Ammon
On Jul 2, 2008, at 9:27 PM, Klaus Wik wrote: In OSX up to 10.4 we could use Contextual Menu Workshop and similar (based on carbon) to make your own CM for finder. Now for 10.5 I have been searching the devdocs and hit a wall. Does anyone have any pointers to how I can make a menu item appea

Re: Does this caution need fixed? (newb)

2008-07-03 Thread Steve Christensen
On Jul 3, 2008, at 11:57 AM, Chris Paveglio wrote: My code is like this: NSMutableString *theSettings; theSettings = [[NSMutableString alloc] init]; //myPrefs is an array of strings, each item is like "Library/Safari" int i; for (i = 0; i < 8; i++ { theSettings = [NSHomeDirect

Re: Does this caution need fixed? (newb)

2008-07-03 Thread Sean McBride
On 7/3/08 9:40 AM, Chris Paveglio said: >I have a loop that gets the user's home directory, and then adds a >string to complete the file path for several files. > >This line: >theSettings = [NSHomeDirectory() stringByAppendingPathComponent:[myPrefs >objectAtIndex:i]]; > >gives me a caution sign wh

Re: newbie memory management

2008-07-03 Thread Kyle Sluder
On Thu, Jul 3, 2008 at 3:11 PM, ghe <[EMAIL PROTECTED]> wrote: > Any suggestions what I'm doing wrong? Probably a leak, but you shouldn't be using NSSound anyway. Look into Audio Queue Services. Leopard only, but your app is GC so that doesn't matter. --Kyle Sluder _

NSPopUpButtonCell NSDecimalNumber and locale

2008-07-03 Thread Cocoa
Hello, I encounter a problem with an NSPopUpButtonCell in a NSTableView The column containing this cell is binded to an NSUserDefaultsController (for Content and Content Values keys), @"Selected Value" is stored using coredata and a property with a decimal attribute The values of the nsu

Re: Does this caution need fixed? (newb)

2008-07-03 Thread Chris Paveglio
Thanks all for your help and insight! I believe Jason's solution will work for me as I am changing the assignment of what "theSetting" is each time through the loop. I have a list (array) of files that gets copied from one place to the other, and I change the origin and the destination each time

Re: launchd daemon at boot time

2008-07-03 Thread Herb Petschauer
{Snip} > but still cannot get my daemon to work. I have written the proper .plist to > be loaded into launchctl, and it works when I load it manually, yet, when I > place the same plist in either /Library/LaunchDaemons or > System/Library/LaunchDaemons, it does not load when the mac boots up. The

Re: launchd daemon at boot time

2008-07-03 Thread Mike Fischer
Am 03.07.2008 um 23:40 schrieb "Nathan Wan" <[EMAIL PROTECTED]>: Hi all, I followed documentation here (http://developer.apple.com/documentation/MacOSX/Conceptual/ BPSystemStartup/ Articles/LaunchOnDemandDaemons.html#//apple_ref/doc/uid/ TP40001762-108425) but still cannot get my daemon to

Re: NSDateFormatter question

2008-07-03 Thread Deborah Goldsmith
Correct. We're aware there is a need for what you want to do, but there is currently no way to do it. Please file an enhancement request. Deborah Goldsmith Apple Inc. [EMAIL PROTECTED] On Jul 3, 2008, at 1:13 PM, Chuck Soper wrote: Hello, Currently, I'm creating a NSDateFormatter instance

Re: NSPredicateEditor

2008-07-03 Thread Peter Ammon
On Jun 26, 2008, at 6:48 PM, Chris wrote: On Fri, Jun 27, 2008 at 10:09 AM, Peter Ammon <[EMAIL PROTECTED]> wrote: On Jun 25, 2008, at 7:27 PM, Chris wrote: The net effect is that NSPredicateEditor can't display a predicate like NOT (foo = "bar") A bug in NSPredicateEditor system

RE: launchd daemon at boot time

2008-07-03 Thread Wan, Nathan (CIV)
I am sorry, I do not find the launchd-dev list on lists.apple.com I did not use sudo, just "lauchctl load " when i loaded it manually. File is readable by everyone. Thanks, please tell me what else I can tell you Nathan -Original Message- From: Mike Fischer [mailto:[EMAIL PROTECTED]

Re: Does this caution need fixed? (newb)

2008-07-03 Thread Jason Stephenson
Chris Paveglio wrote: Thanks all for your help and insight! I believe Jason's solution will work for me as I am changing the assignment of what "theSetting" is each time through the loop. I have a list (array) of files that gets copied from one place to the other, and I change the origin and the

Crashes with no backtrace when printing

2008-07-03 Thread Ben
I have just been getting my app to print two custom views. One uses a layer-backed NSView (many CALayer sublayers, in the region of 450- ish), one a plain NSView. Sometimes (rarely, but often enough), with no apparent pattern, the app is crashing just before showing the print dialog. The pro

NSStatusItem custom view with menu

2008-07-03 Thread Jacob Bandes-Storch
I'm making an NSStatusItem with a custom view. In drawRect:, it draws things based on the value of the "highlighted" instance variable. When mouseDown: is called, it pops up a menu using the status item's popUpStatusItemMenu: method. Using the mouseUp: event does not work, because it is not

NSTextView and Spell Checking with a layer backed view

2008-07-03 Thread Chilton Webb
Hi, It appears that all 'check while typing' dots for both spelling and grammar show up at seemingly random places in an NSTextView if the view is layer backed. Is there some way around this? Thank you, -Chilton ___ Cocoa-dev mailing list (Cocoa-dev

Re: launchd daemon at boot time

2008-07-03 Thread Mike Fischer
Am 04.07.2008 um 01:43 schrieb Wan, Nathan (CIV): I am sorry, I do not find the launchd-dev list on lists.apple.com That's because it's not on the Apple but on the MacOSForge site. Launchd is an Open Source project. See: (It wou

Re: A question of style: Returning 'pairs'

2008-07-03 Thread David Casseres
I've run into this many times, and I think I've used all the techniques you mention and some others less hygienic. I've been most satisfied with your 2) and 3) solutions. There's not really that much overhead in making a struct or Obj-C class for two specific kinds of values, and once you'

Changing views from within another view

2008-07-03 Thread Wayne Pascoe
Hi all, I think I've hacked myself into a corner and I could use some advice / clarity in getting out of it. I am trying to build a tool that uses multiple views inside one window as well as additional windows when appropriate. The code for changing between views (changeViewController and

Re: Crashes with no backtrace when printing

2008-07-03 Thread Brian Stern
On Jul 3, 2008, at 7:24 PM, Ben wrote: I have just been getting my app to print two custom views. One uses a layer-backed NSView (many CALayer sublayers, in the region of 450- ish), one a plain NSView. Sometimes (rarely, but often enough), with no apparent pattern, the app is crashing just

Re: Crashes with no backtrace when printing

2008-07-03 Thread Jens Alfke
On 3 Jul '08, at 4:24 PM, Ben wrote: Attaching to program: `/Path/goes/here', process 14859. Cannot access memory at address 0x9ead7 Cannot access memory at address 0x9ead7 I've found that gdb-in-Xcode is more reliable at being able to get a backtrace if you launch the program with the debu

Get view events

2008-07-03 Thread Tran Kim Bach
Hi everybody, One more newbie question. I cannot get events of the view after I used setContentView method of my NSBox object. Here is what I am doing. I have a main window with a NSBox object in it. I create a view ( A) using Interface Builder and use a class along with A having the view A outlet

Binding an NSTextField

2008-07-03 Thread Alex Wait
I have two methods setTheString and theString. They return the value of another NSTextField on my window. In IB I binded the value of the textField to App Controller and the Model Key Path to "theString". theString() is only called when the app first starts up. How come the binding doesn't fire

IB3 and custom controls: problem with actions

2008-07-03 Thread Vitaly Ovchinnikov
Hello all, I'm porting my project from XCode 2.5 to 3.0 and have a big trouble with custom controls. I have some custom controls (subclassed from NSControl), that I use in Interface Builder to create GUI. When I used IB 2.5, I placed "Custom View" object to the window, changed it's class and then

Re: Changing views from within another view

2008-07-03 Thread Cathy Shive
Hi Wayne, One way you could do this is to connect the control to the "First Responder" object in Interface Builder, instead of to the "File's Owner". This means that when the action is triggered, it will go to the window's first responder (probably the view at that point), and then move