Re: problems loading a sound with NSSound

2010-03-07 Thread James W. Walker
On Mar 7, 2010, at 8:26 PM, Jonathan Chacón wrote: > I added a sound file to the resources of my project ( logoSound.AIF ) > > I use this function to load the resource: > > -(NSSound*) getSound:(NSString *) sndValue { > NSBundle *bundle = [ NSBundle bundleForClass: [ self class ] ]; >

Re: NSDocumentController subclass not instantiated first?

2010-03-07 Thread Graham Cox
On 08/03/2010, at 11:09 AM, Keith Blount wrote: > 2. Create an instance of your subclass in the applicationWillFinishLaunching: > method. > (I did also try calling [[MyDocumentControllerSubclass alloc] init] in my app > delegate’s -applicationWilFinishLaunching:) My app does it this way and

Transparent background for controls - some problems

2010-03-07 Thread Alexander Bokovikov
Hi, All, I'm trying to create a NSView descendent which could draw a custom bitmap background and which could contain other subviews (like labels and buttons) . The problem that all goes perfectly unless controls will change their state or any another event will cause my view redrawing.

problems loading a sound with NSSound

2010-03-07 Thread Jonathan Chacón
Hello, I added a sound file to the resources of my project ( logoSound.AIF ) I use this function to load the resource: -(NSSound*) getSound:(NSString *) sndValue { NSBundle *bundle = [ NSBundle bundleForClass: [ self class ] ]; NSString *sndName = [ bundle pathForResource: sndVal

Bypassing action method in NSSegmentedControl

2010-03-07 Thread Ulai Beekam
I have an NSSegmentedControl with 2 segments. The first has a menu set. The second has no menu. I have set a target and action for the whole segmented control. My problem is that I have to hold down the first segment to see the menu for it. By just clicking on it, the action method gets called

Re: NSDocumentController subclass not instantiated first?

2010-03-07 Thread Kyle Sluder
On Sun, Mar 7, 2010 at 4:09 PM, Keith Blount wrote: > Running some test NSLogs, it certainly seems that NSDocumentController’s > -initialize method is called before that of my application delegate - > although I’m not entirely sure that is telling or not. I’ve been through my > code looking for

Re: NSDocumentController subclass not instantiated first?

2010-03-07 Thread Quincey Morris
On Mar 7, 2010, at 16:09, Keith Blount wrote: > (I did also try calling [[MyDocumentControllerSubclass alloc] init] in my app > delegate’s -applicationWilFinishLaunching:) Can you set a symbolic breakpoint on 'sharedDocumentController' and simply find out when and where it's first called? Also

Re: short question but I don't know how to describe it

2010-03-07 Thread Sherm Pendley
On Sun, Mar 7, 2010 at 7:07 PM, Marx Bievor wrote: > Hi, > I can substitute a String with %@ and an int with %d... like in return @"Hi > I am %@ and %d years old", name, age; > what is the right command to substitute a bool and a float? I cannot find > any reference at apple's docs. > does anyone

NSDocumentController subclass not instantiated first?

2010-03-07 Thread Keith Blount
Hello, I have an NSDocumentController subclass in my application which should be used as the main doc controller, but it doesn’t always seem to get loaded before NSDocumentController itself and thus isn’t always returned by NSDocumentController’s -sharedDocumentController. The docs are very cle

Re: Using audio file services to extract ID3 tags from an incomplete mp3 payload.

2010-03-07 Thread Rodrigo Gutierrez
Hi Graham, This is true for ID3 version 1, but for version 2.x the tags live at the beginning of the file. I'm not too worried about not supporting ID3 version 1. Cheers, -Rod Sent from my iPhone On Mar 7, 2010, at 5:53 PM, Graham Cox wrote: On 08/03/2010, at 8:46 AM, Rod Gutierrez wr

Re: Using audio file services to extract ID3 tags from an incomplete mp3 payload.

2010-03-07 Thread Graham Cox
On 08/03/2010, at 8:46 AM, Rod Gutierrez wrote: > Does anyone have any thoughts? I'm trying to avoid writing my own ID3 > parser if possible, and would prefer to not using external > libraries/frameworks I think the basic problem is that the ID3 tags are appended to the end of the audio data i

Using audio file services to extract ID3 tags from an incomplete mp3 payload.

2010-03-07 Thread Rod Gutierrez
Hello, I would like to take advantage of the audio file services api for extracting ID3 information from an incomplete mp3. At the moment I am downloading just the ID3 portion of an mp3 file (using NSURLConnection), and storing it in an NSData object. I'm trying to use this ID3 data to create an A

Re: UIView as opposed to UIViewController...

2010-03-07 Thread David Duncan
You've misread. The performance note is that if your view does not need to draw, then you should not implement -drawRect:. A view with an empty -drawRect: method consumes more memory and requires more processing time to display than the same view that does not implement - drawRect: at all.

Re: Hot to move focus to a button?

2010-03-07 Thread Kyle Sluder
On Sun, Mar 7, 2010 at 11:44 AM, Matt Neuburg wrote: > On Sat, 6 Mar 2010 16:25:57 -0800, Kyle Sluder said: >>Buttons don't accept keyboard focus > > They do on my machine. It all depends on how the user has set up Full > Keyboard Access in the Keyboard prefs. m. Okay, but that is not the defaul

Re: UIView as opposed to UIViewController...

2010-03-07 Thread Matt Neuburg
On Sat, 06 Mar 2010 19:57:32 -0700, Jon said: >I get indications from reading that you shouldn't really subclass UIView in general or to do routine things, and that any time you implement drawRect in the subclass of a UIView, you are taking a performance hit compared to doing some drawing in ot

Re: Hot to move focus to a button?

2010-03-07 Thread Matt Neuburg
On Sat, 6 Mar 2010 16:25:57 -0800, Kyle Sluder said: >On Sat, Mar 6, 2010 at 12:20 PM, Jonathan Chacón wrote: >> How can I move the keyboard focus to a control? > >Buttons don't accept keyboard focus They do on my machine. It all depends on how the user has set up Full Keyboard Access in the Key

Re: Xcode 3.2.1 and OCUnit results in selector not recognized

2010-03-07 Thread Tom
In case someone else is interested - decided to switch to BHUnit. I found out that it's also possible to run tests in console mode which is as fast as OCUnit, it's slower only in GUI mode so appologies to all involved in creating the framework... I'm still moving my tests over, so can't tell for su

Re: predicate for a Core Data fetch request rejected by SQL

2010-03-07 Thread Jeffrey Oleander
> On Sat, 2010/03/06, Joanna Carter wrote: > This quote from the Core Data Programming Guide: > > There are some interactions between fetching and > the type of store. In the XML, binary, and > in-memory stores, evaluation of the predicate and > sort descriptors is performed i

Re: NSURLConnection Asynchronous vs. Synchronous Asymmetry

2010-03-07 Thread Jens Alfke
On Mar 5, 2010, at 7:54 PM, Stuart Malin wrote: > I expected the sendSynchronousRequest approach to return an NSHTTPURLResponse > object without an error because, according to the docs, the synchronous > method is built on top of the asynchronous methods. Yes, but its semantics are different;

Re: cocoa-dev vs. Apple's dev forums?

2010-03-07 Thread Gerd Knops
On Mar 6, 2010, at 10:21 AM, Ulai Beekam wrote: > > Which one would you prefer (assuming you had 99 bucks to spare each year > without trouble) and why? > Mailing list over forum any day. Don't make me hunt a bunch of forums every day! x lists, one convenient interface (Mail.app). But my big

Re: NSImageView bindings readonly ?

2010-03-07 Thread Rich Dearlove
I wish it was readonly. But it appears to set the value to blank if you drop an image on, unless I'm doing something wrong. RD On 6 Mar 2010, at 16:33, Keary Suska wrote: > On Mar 6, 2010, at 6:17 AM, Rich Dearlove wrote: > >> I've been trying to bind an NSImageView to a Dictionary element. >

Re: Hot to move focus to a button?

2010-03-07 Thread Joanna Carter
Hi Ricky > All you need to do is properly set up the key view loop in IB. i.e. connect > the 'nextKeyView' outlets. > > ... A very good point. I was assuming that Jonathan already knew this and just wanted to set focus to a button, other than by moving through the "tab order". Joanna -- J

Re: Hot to move focus to a button?

2010-03-07 Thread Ricky Sharp
On Mar 7, 2010, at 3:53 AM, Joanna Carter wrote: > Hi Kyle > >> Buttons don't accept keyboard focus. See the documentation for >> -[NSView canBecomeKeyView] and the related conceptual documentation. > > I realise this to be what the docs say but, if you use -makeFirstResponder: > the focus rin

Re: Hot to move focus to a button?

2010-03-07 Thread Joanna Carter
Hi Kyle > Buttons don't accept keyboard focus. See the documentation for > -[NSView canBecomeKeyView] and the related conceptual documentation. I realise this to be what the docs say but, if you use -makeFirstResponder: the focus ring is applied to the chosen button and pressing the spacebar cal

Re: UIView as opposed to UIViewController...

2010-03-07 Thread Alexander Spohr
Am 07.03.2010 um 03:57 schrieb Jon: > I get indications from reading that you shouldn't really subclass UIView in > general or to do routine things, and that any time you implement drawRect in > the subclass of a UIView, you are taking a performance hit compared to > doing some drawing in o