Re: IB v7.03 appears to corrupt an xib last generated by IB v7.02

2009-02-08 Thread Stephen Bannasch
At 10:38 PM -0500 2/7/09, Kyle Sluder wrote: Interface Builder is currently on version 3.1.2 (build 677). I have no idea what version number you're talking about here. I misinterpreted the what the version # in this line in the xib file: -archive

Re: How to draw text with fade out effect?

2009-02-08 Thread Oleg Krupnov
Wow, Ken! It works like magic (the second method I mean). Thank you very much. I think I would never guess it myself. For those who will reuse this code, don't forget to save/restore the graphics context because CGContextClipToMask modified the clipping region. Sorry for late thanking, I had to

Re: -[NSTreeController moveNode:toIndexPath:] broken?

2009-02-08 Thread Rob Keniger
2009/2/8 Tomas Franzén to...@lightheadsw.com Hi, I recently began exploring NSTreeController, but I'm experiencing problems with its moveNode:toIndexPath:. It's new to Leopard, but seems to be consistently moving nodes to incorrect indexes. There's a previous list post about exactly this,

[Q] NSTextField and binding: What gets called?

2009-02-08 Thread admin
I' override an NSTextField to handle re-size if text size changes. Problem is it only reacts on text input by the user [self textDidChange:] but not if changed through binding because [self textDidChange:] is never called. Which of the methods do I need to override in order to get notice

Re: Read lines from very large text file

2009-02-08 Thread Michael Ash
On Sun, Feb 8, 2009 at 2:44 AM, Joar Wingfors j...@joar.com wrote: On Feb 7, 2009, at 7:13 PM, Michael Ash wrote: What's wrong is that they won't allow you to specify the text encoding to use. The same thing is true for the *deprecated* method +stringWithCString: by the way. That is

Re: NSProgressIndicator (spinning) on a dark background?

2009-02-08 Thread Michael Hanna
I was trying to solve this problem before too. I thought you could get the CIImage of the individual frames of the progress indicator and apply an Invert filter on it. I'm not even sure if it'd work though ... I never implemented it and It's probably simpler to just use the

Borderless and resize

2009-02-08 Thread Geert B. Clemmensen
Hello all, I have a borderless subclassed NSWindow with own subclassed NSView as contentView. Overriding the content view's mouseDown: and do [win setFrame:newFrame display:YES]; in order to resize the window works, well kinda, the displaying appear jagged. If the exact same

Fwd: Borderless and resize - Solved

2009-02-08 Thread Geert B . Clemmensen
Hello all, There is nice article on borderless windows here: http://www.cocoadev.com/index.pl?BorderlessWindow The thing I had overseen/ignored is at the bottom: Ok, in my sleep deprivation i didn't realize that my window was set to be moveable by the background, so it was trying to move

Re: Animated toolbar

2009-02-08 Thread Christian Graus
Fair enough. I guess that brings this discussion to a close, so thanks to everyone who responded. It's been very valuable to me, even if it didn't go in the direction I was hoping. It's certainly convinced me that our toolbar needs to go, although what we replace it with, I have no idea

passing argument 1 of 'setContents:' from incompatible pointer type

2009-02-08 Thread David Blanton
NSString* imageFileName = [[[NSBundle mainBundle] resourcePath] stringByAppendingPathComponent:@Level 1 top.png]; CGDataProviderRef provider = CGDataProviderCreateWithFilename([imageFileName UTF8String]); _level1 = [[CALayer layer] retain]; _level1.contents =

Re: passing argument 1 of 'setContents:' from incompatible pointer type

2009-02-08 Thread David Blanton
Yep. I realized after posting that .contents takes id. _level1.contents = (id)CGImageCreateWithPNGDataProvider(provider, NULL, true, kCGRenderingIntentDefault); clears the warning ... maybe I should not code and drink beer on Sunday unless it is Windows code. On Feb 8, 2009, at 2:30

Re: passing argument 1 of 'setContents:' from incompatible pointer type

2009-02-08 Thread Stephen J. Butler
On Sun, Feb 8, 2009 at 2:54 PM, David Blanton aired...@tularosa.net wrote: NSString* imageFileName = [[[NSBundle mainBundle] resourcePath] stringByAppendingPathComponent:@Level 1 top.png]; Just a comment... you should probably be using pathToResource:ofType: here. NSString*

Re: passing argument 1 of 'setContents:' from incompatible pointer type

2009-02-08 Thread Kyle Sluder
On Sun, Feb 8, 2009 at 4:48 PM, Stephen J. Butler stephen.but...@gmail.com wrote: Just a comment... you should probably be using pathToResource:ofType: here. Or use +[NSImage imageNamed:] and use -[NSBitmapImageRep CGImage] on its first representation... _level1.contents = (id)NSImage

Re: passing argument 1 of 'setContents:' from incompatible pointer type

2009-02-08 Thread David Blanton
Kyle and Stephen ... great comments - so there are three ways to get the image file what criteria should I use in deciding which to use ? On Feb 8, 2009, at 4:21 PM, Kyle Sluder wrote: On Sun, Feb 8, 2009 at 4:48 PM, Stephen J. Butler stephen.but...@gmail.com wrote: Just a

Re: passing argument 1 of 'setContents:' from incompatible pointer type

2009-02-08 Thread Stephen J. Butler
On Sun, Feb 8, 2009 at 5:40 PM, David Blanton aired...@tularosa.net wrote: Kyle and Stephen ... great comments - so there are three ways to get the image file what criteria should I use in deciding which to use ? I think it's mostly preference. My impression is that most experienced

How do I unit test an object delegate?

2009-02-08 Thread Sean DeNigris
I'm unit testing a cocoa app in xcode by injecting a test bundle into the executable, so the unit tests get run at the end of every build. Example: @interface AppController : NSObject { ... IBOutlet NSButton* startButton; NSSpeechSynthesizer* speechSynthesizer; }

Re: Drag and drop images to other application using NSFilesPromisePboardType

2009-02-08 Thread Dikshith Rai
The reason I used only NSFilesPromisePboardType and not NSFilenamesPboardType is:My app data is stored as a package. Instead of extracting image from the package while I initiate dragging, I do it when the destination asks for the data that is promised to it. I personally feel

Re: Mixing C++ and Objective-C

2009-02-08 Thread Steve Wart
Thanks Peter. I realized after posting my question that it wasn't actually Cocoa-related, nor even Objective-C related - the error was a result of my inexperience with C++. Apologies to everyone for posting off-topic. I appreciate that this is a high-volume list and didn't intend to distract

CGFloat and 64 Bit

2009-02-08 Thread Gerriet M. Denkmann
When I build a Cocoa Project with 32/64 bit, this line gets a warning: NSSize a = NSMakeSize( 11.2, 22.4); which went away using: NSSize a = NSMakeSize( (CGFloat)11.2, (CGFloat)22.4); Is this the only and correct way to use NSMakeSize() ? Looks kind of ugly. A somehow related

Re: CGFloat and 64 Bit

2009-02-08 Thread Rob Keniger
On 08/02/2009, at 9:52 PM, Gerriet M. Denkmann wrote: When I build a Cocoa Project with 32/64 bit, this line gets a warning: NSSize a = NSMakeSize( 11.2, 22.4); which went away using: NSSize a = NSMakeSize( (CGFloat)11.2, (CGFloat)22.4); Is this the only and correct way to use

Re: passing argument 1 of 'setContents:' from incompatible pointer type

2009-02-08 Thread Michael Ash
On 2/8/09, Stephen J. Butler stephen.but...@gmail.com wrote: One thing to watch out for -- and it's generated some traffic on this list recently -- is that NSImage creates hidden windows to manage resources. So if you're loading many, many, many images, NSImage can lockup the Window

Re: CGFloat and 64 Bit

2009-02-08 Thread Rob Keniger
On 09/02/2009, at 3:37 PM, Rob Keniger wrote: Try this: NSSize a = NSMakeSize( 11.2f, 22.4f); The f suffix is a hint to the compiler that it's a float value. To clarify further, the compiler treats number literals with a decimal point as a double, so you need to use the f suffix to have

Re: How do I unit test an object delegate?

2009-02-08 Thread Michael Ash
On Sun, Feb 8, 2009 at 10:50 PM, Sean DeNigris s...@clipperadams.com wrote: I'm unit testing a cocoa app in xcode by injecting a test bundle into the executable, so the unit tests get run at the end of every build. Example: @interface AppController : NSObject { ... IBOutlet

Re: Mixing C++ and Objective-C

2009-02-08 Thread Michael Ash
On Sun, Feb 8, 2009 at 8:42 PM, Peter N Lewis pe...@stairways.com.au wrote: At 12:29 -0800 7/2/09, Steve Wart wrote: It works fine in 10.5.6 with XCode 3.1 if I change the file type of BasicOpenGLView.m to sourcecode.cpp.objcpp. You normally use the extension .mm for Objective C++ code. At

Constrained layer-backed control stops responding

2009-02-08 Thread Alejandro Rodriguez
Hello, I have a NSView that is layer-backed (setWantsLayer:YES) and when I add it to another subview it works fine. But if I use a CAConstraint to chage it's location then controls inside the view stop responding to events. Any clues anyone? Thanks and regards, Alejandro

Creating audio files in iphone

2009-02-08 Thread Mahaboob
I'm using a table view to show all the audio files. When I'm selecting one file among these and click on the record button, the newly recording sound should be attached to the end of the selected file. I'm referring the SpeakeHere example of apple. But in the documentation, I found a method that

Re: CGFloat and 64 Bit

2009-02-08 Thread Nick Zitzmann
On Feb 8, 2009, at 4:52 AM, Gerriet M. Denkmann wrote: When I build a Cocoa Project with 32/64 bit, this line gets a warning: NSSize a = NSMakeSize( 11.2, 22.4); which went away using: NSSize a = NSMakeSize( (CGFloat)11.2, (CGFloat)22.4); Is this the only and correct way to use

Re: CGFloat and 64 Bit

2009-02-08 Thread Clark Cox
On Sun, Feb 8, 2009 at 3:52 AM, Gerriet M. Denkmann gerr...@mdenkmann.de wrote: When I build a Cocoa Project with 32/64 bit, this line gets a warning: NSSize a = NSMakeSize( 11.2, 22.4); which went away using: NSSize a = NSMakeSize( (CGFloat)11.2, (CGFloat)22.4); Is this the

Re: passing argument 1 of 'setContents:' from incompatible pointer type

2009-02-08 Thread Ken Ferry
On Sun, Feb 8, 2009 at 9:39 PM, Michael Ash michael@gmail.com wrote: On 2/8/09, Stephen J. Butler stephen.but...@gmail.com wrote: One thing to watch out for -- and it's generated some traffic on this list recently -- is that NSImage creates hidden windows to manage resources. So if

Re: passing argument 1 of 'setContents:' from incompatible pointer type

2009-02-08 Thread Stephen J. Butler
On Mon, Feb 9, 2009 at 1:20 AM, Ken Ferry kenfe...@gmail.com wrote: On Sun, Feb 8, 2009 at 9:39 PM, Michael Ash michael@gmail.com wrote: This really needs a qualifier: NSImage *can* create hidden windows to manage resources. To be more specific, NSImage can create an NSCachedImageRep,