Audio question

2012-03-31 Thread Luca Ciciriello
Hi All, I'm using an AVAudioPlayer object to run some Garage Band loop in my App. My question is how to delete the object when I live the view. I've set to "stop" the AVAudioPlayer object when I live to stop the music, but the object is not destroyed. Have I to set "object=nil;" befor exit? Anyw

drawing lines in and NSTextView

2012-03-31 Thread Koen van der Drift
I have an NSTextView to which I want to add some lines that connect certain words. When the text changes, either by editing, or scrolling, that lines should follow the words. I thought about using CoreAnimation, but text in a CATextLayer does not appear to be editable like the text in an NSTextView

Re: drawRect using a Category

2012-03-31 Thread David Duncan
On Mar 30, 2012, at 8:31 PM, Peter Teeson wrote: > In a Document app I have an NSMatrix. I only need to override drawRect. > Rather than using a sub-class, which seems overkill to me, > I decided to try a Category instead. Categories don't override, they replace. As has already been noted , t

Re: Best Way to Append Bytes With Encoding To CFMutableString

2012-03-31 Thread Andreas Grosam
Thank you all for your answers and suggestions. My use case is to create CFStrings from Unicode - which in the majority of cases are "short" strings - say, less than 100 characters. In this case, I create an immutable CFString directly in one go. Less frequently in the typical use case of the a

iPad 5.1 simulator

2012-03-31 Thread Luca Ciciriello
Is it possible to use MPMediaPickerController with the iOS 5.x simulator? I've used it but I get the following exception: 'NSInternalInconsistencyException', reason: 'Unable to load iPodUI.framework' The code I've used is: MPMediaPickerController *picker = [[MPMediaPickerController alloc] in

Re: Best Way to Append Bytes With Encoding To CFMutableString

2012-03-31 Thread Jean-Daniel Dupas
Le 31 mars 2012 à 18:20, Andreas Grosam a écrit : > Thank you all for your answers and suggestions. > > My use case is to create CFStrings from Unicode - which in the majority of > cases are "short" strings - say, less than 100 characters. In this case, I > create an immutable CFString directl

Re: iPad 5.1 simulator

2012-03-31 Thread Roger Dalal
No, Luca, you can not use the iPod framework in the simulator. On Mar 31, 2012, at 1:10 PM, Luca Ciciriello wrote: > Is it possible to use MPMediaPickerController with the iOS 5.x simulator? > > I've used it but I get the following exception: > > 'NSInternalInconsistencyException', reason: 'Unab

Convert to Objective-C ARC Syntax Error

2012-03-31 Thread Brad Stone
I used "Edit->Refactor->Convert to Objective-C ARC...". My app works fine but I'm getting a syntax error in Apple's header files. They're all in the same place: @private. There error is '__strong' only applies to objective-c object or block pointer types; type here is 'void *' Here's an exa

Order of Finder labels

2012-03-31 Thread Fritz Anderson
Mac OS 10.7, Xcode 4.3.2 I have an application with which I would like to set Finder labels (colors) for directories. I use the URL resource API to read and write NSURLLabelNumberKey for the target directory. This works, up to a point. If I set the label number to 0, it behaves as expected: Any

Re: Order of Finder labels

2012-03-31 Thread Seth Willits
On Mar 31, 2012, at 5:29 PM, Fritz Anderson wrote: > +[NSWorkspace fileLabelColors] returns the available label colors in the same > order as the index. > > What I'd really like is to use the same order as appears in the preferences, > and in the File/contextual menu. That is, I'd like to confo

Re: drawing lines in and NSTextView

2012-03-31 Thread Graham Cox
On 31/03/2012, at 11:08 PM, Koen van der Drift wrote: > I have an NSTextView to which I want to add some lines that connect > certain words. When the text changes, either by editing, or scrolling, > that lines should follow the words. I thought about using > CoreAnimation, but text in a CATextLay

Re: drawing lines in and NSTextView

2012-03-31 Thread Douglas Davidson
On Mar 31, 2012, at 6:09 PM, Graham Cox wrote: > > On 31/03/2012, at 11:08 PM, Koen van der Drift wrote: > >> I have an NSTextView to which I want to add some lines that connect >> certain words. When the text changes, either by editing, or scrolling, >> that lines should follow the words. I

Re: drawRect using a Category

2012-03-31 Thread Peter Teeson
Thanks very much for your input guys. David: I had carefully read the Categories and Extensions page in OBJ-C Programming Language. And, based on the first paragraph, assumed I could add functionality to drawRect for my particular case. Stephen: In my app there is only the one NSMatrix instan

Re: NSDocument disc undo stack

2012-03-31 Thread Doug Clinton
I don't know if this was the issue that Steven was asking about, but I've been wondering if there is a recommended way to persist the undo stack so that it's still available if you restart the app, or close and re-open the document. It's always bothered me that there is this great mechanism for

How do I get the hot spot from a .cur file in objective c on MAC Cocoa?

2012-03-31 Thread Oshrat Fahima
Hi In our plug-ins we are using cursors kept in a *.CUR file. In windows there's no problem to identify the hot spot from the *.CUR file (because it's a WIN file, LoadCursor already knows where is the hot spot automatically). But in MAC Cocoa, we've encountered a problem when we create a new NSCu

UISplitViewController, Popovers, and default behavior

2012-03-31 Thread Brad Ringel
With the release of iOS 5.1, the default behavior for SplitViews has changed so that when you hide the Master ViewController in a BarButtonItem, instead of presenting a Popover, the Master VC slides in from the left side of the screen. Since this is the default behavior now, is it recommended th

Gesture library for OS X?

2012-03-31 Thread Doug Clinton
Does anyone know of an open-source library that implements Cocoa touch-style gesture recognisers on OS X? Thanks, Doug ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact t

Stenography

2012-03-31 Thread deoxy t2
Hello friends. I'm new to the list and new in Objective-C and Apple programming and I have a very timely question, I want to manipulate images to develop stenography, but do not know where begin. I'm reading:1.-vImage Programming Guide2 Core Image Programming Guide But it is not clear which l

Re: drawing lines in and NSTextView

2012-03-31 Thread Salman Khilji
You may want to look at the freely downloadable Session 114 - Advance Cocoa Text Tip and Tricks from iTunesU in WWDC 2010 videos. It may help. Salman On Mar 31, 2012, at 5:08 AM, Koen van der Drift wrote: > I have an NSTextView to which I want to add some lines that connect > certain words. W

Drawing when app is in active

2012-03-31 Thread Jonathan Guy
Hi all This is must be the most simple a puzzling problem I've had. Take a new app, create a custom view class with a drawrect of - (void)drawRect:(NSRect)dirtyRect { if ([NSApp isActive]) { [[NSColor redColor] set]; } else { [[NSColor blueColor

Re: How do I get the hot spot from a .cur file in objective c on MAC Cocoa?

2012-03-31 Thread Stephen J. Butler
Wikipedia says that cur/ico files have a very simple format: http://en.wikipedia.org/wiki/ICO_(file_format) Part of the ICONDIRENTRY structure is the hotspot information. Should be pretty easy to write a basic parser. On Sun, Mar 25, 2012 at 4:25 AM, Oshrat Fahima wrote: > Hi > In our plug-ins

Re: Stenography

2012-03-31 Thread Alex Zavatone
On Mar 27, 2012, at 4:19 PM, deoxy t2 wrote: > > > Hello friends. > I'm new to the list and new in Objective-C and Apple programming and I have a > very timely question, I want to manipulate images to develop stenography, but > do not know where begin. I'm reading:1.-vImage Programming Guide