Outlet from Different Implementation?

2008-09-16 Thread Jeshua Lacock
Greetings, Is it possible to get the value of an outlet from a different @implementation? For instance, if I have the two following interfaces and the outlets have been connected in IB: @interface MyGLView : NSOpenGLView { NSTimer *pTimer; } @end @interface MyContent : NSView {

Re: Outlet from Different Implementation?

2008-09-16 Thread Graham Cox
On 16 Sep 2008, at 12:19 pm, Jeshua Lacock wrote: Is it possible to get the value of an outlet from a different @implementation? For instance, if I have the two following interfaces and the outlets have been connected in IB: @interface MyGLView : NSOpenGLView { NSTimer *pTimer; } @end

Re: NSWindowController

2008-09-16 Thread Chris Idou
I see. But if some other object was the File's Owner, then how would you link the Window to the window Outlet of the Window Controller, which I presume is necessary? --- On Mon, 9/15/08, Graham Cox [EMAIL PROTECTED] wrote: From: Graham Cox [EMAIL PROTECTED] Subject: Re: NSWindowController

Re: NSWindowController

2008-09-16 Thread Chris Idou
OK, but if you had the window controller in the NIB, then you wouldn't be calling NSWindowController initWithWindowNibName:owner: in the first place. So the mystery of this API remains. --- On Mon, 9/15/08, Graham Cox [EMAIL PROTECTED] wrote: From: Graham Cox [EMAIL PROTECTED] Subject: Re:

Re: NSWindowController

2008-09-16 Thread Graham Cox
On 16 Sep 2008, at 2:45 pm, Chris Idou wrote: I see. But if some other object was the File's Owner, then how would you link the Window to the window Outlet of the Window Controller, which I presume is necessary? You'd still have the window controller object in your nib, it just

Re: Strange property behavior

2008-09-16 Thread atebits
This seems, to me, to be a bug in the compiler (I can easily reproduce it on the desktop). Please file a report at http://bugreport.apple.com. Yep, it's a bug all right. A report has been filed. Loren ___ Cocoa-dev mailing list

Re: NSWindowController

2008-09-16 Thread Graham Cox
On 16 Sep 2008, at 3:34 pm, Chris Idou wrote: OK, but if you had the window controller in the NIB, then you wouldn't be calling NSWindowController initWithWindowNibName:owner: in the first place. So the mystery of this API remains. And if the window controller were not in the nib, but

Does NSTextField sends delegate messages to itself?

2008-09-16 Thread Ron Fleckner
Greetings, I've subclassed NSTextField so that I can override - acceptsFirstResponder to return NO. I've noticed an unexpected behaviour which I hope is the right thing because now I want to rely on it. To wit: without explicitly setting the text field's delegate, I can receive delegate

Re: Does NSTextField sends delegate messages to itself?

2008-09-16 Thread Graham Cox
On 16 Sep 2008, at 4:37 pm, Ron Fleckner wrote: So my question is, I suppose, does NSTextField send delegate messages to instances of itself? It doesn't, but the shared field editor object does. The text field is the delegate of the shared field editor when it is active. see:

Re: Does NSTextField sends delegate messages to itself?

2008-09-16 Thread Ron Fleckner
On 16/09/2008, at 4:46 PM, Graham Cox wrote: On 16 Sep 2008, at 4:37 pm, Ron Fleckner wrote: So my question is, I suppose, does NSTextField send delegate messages to instances of itself? It doesn't, but the shared field editor object does. The text field is the delegate of the shared

Re: structs in Mutable containers

2008-09-16 Thread Phil
On Tue, Sep 16, 2008 at 9:18 PM, Christian Giordano [EMAIL PROTECTED] wrote: Hi guys, I'm finding myself trying to add to mutable containers like NSMutableDictionary or NSMutableArray instead of NSObjects subclasses, just structs. For instance in a NSMutableDictionary the key was an integer

Re: structs in Mutable containers

2008-09-16 Thread Christian Giordano
I didn't think about NSValue, thanks. Do you mean valueWithPointer? Cheers, chr On Tue, Sep 16, 2008 at 11:00 AM, Phil [EMAIL PROTECTED] wrote: On Tue, Sep 16, 2008 at 9:18 PM, Christian Giordano [EMAIL PROTECTED] wrote: Hi guys, I'm finding myself trying to add to mutable containers like

Re: Can't get to work setDoubleAction on NSMatrix with NSButtonCell

2008-09-16 Thread Oleg Krupnov
Thanks Graham. I have checked your DrawKit demo and indeed everything seems identical except that your code works and mine does not :) Well, I ended up with copy/pasting the XIB of your tool palette and its associated window controller and then completely replacing your code with mine. Guess

Re: structs in Mutable containers

2008-09-16 Thread Graham Cox
On 16 Sep 2008, at 7:18 pm, Christian Giordano wrote: ... forKey:[[NSNumber alloc] initWithInt:BAND_RED]]; Not a really elegant solution but I can understand that those containers require pointers. Now I need to create a NSMutableArray of CGPoint, how can I make it became a pointer? ...

Re: structs in Mutable containers

2008-09-16 Thread Christian Giordano
I just realized valueWithPoint is not available on the iPhone SDK and, I can't understand why, it can't be discussed here. Both things of course suck! :) Thanks a lot, chr On Tue, Sep 16, 2008 at 11:24 AM, Graham Cox [EMAIL PROTECTED] wrote: On 16 Sep 2008, at 7:18 pm, Christian Giordano

Re: structs in Mutable containers

2008-09-16 Thread Roland King
well can you manage the lifetime of the CGPoints well enough to use valueWithPointer: which, if I read it correctly, doesn't free the pointer when it's done? Or just write your own NSObject derivation you can pass a CGPoint to, by value and have it copied, or as a pointer, but which it

Re: structs in Mutable containers

2008-09-16 Thread Phil
On Tue, Sep 16, 2008 at 10:46 PM, Christian Giordano [EMAIL PROTECTED] wrote: I just realized valueWithPoint is not available on the iPhone SDK It's just a convenience method for something like: [NSValue valueWithBytes:somePoint objCType:@encode(NSPoint)] You can implement this yourself in a

Re: structs in Mutable containers

2008-09-16 Thread Christian Giordano
Yep, this should work as well. Thanks, chr On Tue, Sep 16, 2008 at 1:41 PM, Phil [EMAIL PROTECTED] wrote: On Tue, Sep 16, 2008 at 10:46 PM, Christian Giordano [EMAIL PROTECTED] wrote: I just realized valueWithPoint is not available on the iPhone SDK It's just a convenience method for

Re: structs in Mutable containers

2008-09-16 Thread Phil
On Wed, Sep 17, 2008 at 12:41 AM, Phil [EMAIL PROTECTED] wrote: [NSValue valueWithBytes:somePoint objCType:@encode(NSPoint)] Should be: NSPoint somePoint = NSMakePoint(x,y); [NSValue valueWithBytes:somePoint objCType:@encode(NSPoint)]; Phil ___

Re: referencing XML Data

2008-09-16 Thread Amy Heavey
On 14 Sep 2008, at 02:51, Nathan Kinsinger wrote: On Sep 13, 2008, at 12:50 PM, Amy Heavey wrote: I've got an NSXMLDocument *custdoc but I can't work out how to actually access the data in the document, I've looked at NSXMLElement, NSXMLParser, NSXMLNode but I just can't work out the

Re: structs in Mutable containers

2008-09-16 Thread Mike Abdullah
What's wrong with +[NSValue valueWithCGPoint:CGPointMake(x, y)] ? On 16 Sep 2008, at 13:41, Phil wrote: On Tue, Sep 16, 2008 at 10:46 PM, Christian Giordano [EMAIL PROTECTED] wrote: I just realized valueWithPoint is not available on the iPhone SDK It's just a convenience method for

Re: Using NSAlert with PyObjc - basics

2008-09-16 Thread Tobias Prinz
Am 12.09.2008 um 16:40 schrieb Tobias Prinz: Hello there, I am trying to display a little pop-up using NSAlert. I've used a fairly standard snippet from this page (which is written in German, plus it is ObjC code): http://cocoa-coding.de/nsalert/nsalert.html As far as I know, my message

How do I check if at least one TWAIN device is available

2008-09-16 Thread Ulf Dunkel
In TWAINhandler.cpp (by Apple Inc.) and the relevant files, I get all that nice stuff to access a TWAIN data source etc. in my app. The following line in TWAINHandler::selectDS() e.g. opens the 'Select Device' window provided by Mac OS X: DSM_Entry(mAppIdentity, NULL, DG_CONTROL,

Re: async NSOperation and NSOperationQueue

2008-09-16 Thread John Love
Couple of things... you don't wanna create a queue every time. You should pretty much have just one queue that you add NSOperation objects to. You probably want to re-write this to be a singleton object that you get from your app controller or some other relevant place. Queue

Re: structs in Mutable containers

2008-09-16 Thread Sean McBride
On 9/16/08 8:24 PM, Graham Cox said: CGPoints and NSPoints have the same structure so you can cast one to t'other. You shouldn't really. You should use NSPointFromCGPoint/ NSPointToCGPoint. Their implementation is in NSGeometry.h and is not a simple cast. NSPoint and CGPoint may be the same

Re: async NSOperation and NSOperationQueue

2008-09-16 Thread Michael Ash
On Tue, Sep 16, 2008 at 10:12 AM, John Love [EMAIL PROTECTED] wrote: Specifically, for example, while the queue is doing its calculation, I cannot press CMD-N to create a new document window. To continue with this specific example, CMD-N does do its thing, but only after the queue operation's

NSXMLParser and multithreading

2008-09-16 Thread Mark Thomas
Resending, as wondered if anybody had any views on this ? --- Hi All, Was wondering if somebody could answer how thread safe NSXMLParser is, as I need to use it with NSURL set to remote server and the response could take a while, so this why I want to put off into another thread. While I

Re: NSXMLParser and multithreading

2008-09-16 Thread Benjamin Stiglitz
Excerpts from Mark Thomas's message of Tue Sep 16 11:36:41 -0400 2008: Was wondering if somebody could answer how thread safe NSXMLParser is, as I need to use it with NSURL set to remote server and the response could take a while, so this why I want to put off into another thread. Instances

Re: structs in Mutable containers

2008-09-16 Thread Clark Cox
On Tue, Sep 16, 2008 at 7:49 AM, Sean McBride [EMAIL PROTECTED] wrote: On 9/16/08 8:24 PM, Graham Cox said: CGPoints and NSPoints have the same structure so you can cast one to t'other. You shouldn't really. You should use NSPointFromCGPoint/ NSPointToCGPoint. Their implementation is in

(Newb) Multiple NSWindowControllers and bindings

2008-09-16 Thread John Velman
In my app, I'm using multiple windows to get multiple perspectives on the model. If I understand correctly, MyDocument should typically be the Model controller as well as owner of the NSWindowControllers. And in a NIB (or XIB), the NSWindowController is the File's Owner, and is the main View

Re: structs in Mutable containers

2008-09-16 Thread Sean McBride
On 9/16/08 9:45 AM, Clark Cox said: NSPoint and CGPoint may be the same now, but they may not always be. (Consider that NSAffineTransformStruct and vImage_AffineTransform were the same, but the former changed from float to CGFloat and the latter stayed float, even in 64 bit.) Also, they are

Core data grand-children list

2008-09-16 Thread Tomaž Kragelj
I have the following core data model: Project Session Measurement On my form I want the user to select the desired project from the table and then based on that selection, I want to display all measurements (for all sessions) for that project. I have two array controllers - one

Re: referencing XML Data

2008-09-16 Thread Amy Heavey
Thanks for your help Nathan, but I'm obviously doing something really wrong, I've got the following code, NSArray *customerArray = [custdoc nodesForXPath:@.//customer error:nil]; if ([customerArray count]){ NSXMLNode *customerNode;

Re: async NSOperation and NSOperationQueue

2008-09-16 Thread John Love
+ Michael Ash wrote: When your application becomes unresponsive, pause it in the debugger and look at the backtraces of all the threads. (You can do this in a single step by typing t a a bt at the debugger console. This is a shortcut for thread apply all backtrace.) This should quickly tell

Control bar on top of the screen

2008-09-16 Thread Hugo Habel
Hi! I am new to this mail list and also to Cocoa development. I am sure that the best way to learn a new programming language is to define yourself a project and try to complete it. So it is what I am doing. Before I start coding I want to have an idea about everything my program should do. So

How to uniquely determine MD5-sum of a dict?

2008-09-16 Thread Arthur C .
I have an NSDictionary that has to be written to disk, distributed and read in again. I would like to add an MD5 sum to the dictionary to make sure it has not been modified/corrupted on the way. That can be done by making NSData using NSArchiver and then passing it to MD5() from openssl/md5.h.

Re: Bug with -changeAttributes: in NSFontManager/Font Panel?

2008-09-16 Thread Preston Jackson
Graham, [[NSFontManager sharedFontManager] setTarget:self] only sets the target to the changeFont: method. Alternatively, you can put changeFont: in the responder chain it will get called without having to explicitly set the target of the shared NSFontManager. The changeAttributes:

Re: referencing XML Data

2008-09-16 Thread Sherm Pendley
On Tue, Sep 16, 2008 at 7:39 AM, Amy Heavey [EMAIL PROTECTED]wrote: NSArray *customerArray = [custdoc nodesForXPath:@.//customer error:nil]; if ([customerArray count]){ NSXMLNode *customerNode; for (customerNode in customerArray) {

Re: Abusing targetForAction: with non-action selectors

2008-09-16 Thread Michael Ash
On Mon, Sep 15, 2008 at 7:49 PM, Charles Srstka [EMAIL PROTECTED] wrote: On Sep 15, 2008, at 3:13 PM, Dave Dribin wrote: Hello, Is it safe to use -[NSApplication targetForAction:] with non-action selectors? For example, selectors that have more than one argument, non-id first argument, or

Re: async NSOperation and NSOperationQueue

2008-09-16 Thread Michael Ash
On Tue, Sep 16, 2008 at 12:50 PM, John Love [EMAIL PROTECTED] wrote: + Michael Ash wrote: When your application becomes unresponsive, pause it in the debugger and look at the backtraces of all the threads. (You can do this in a single step by typing t a a bt at the debugger console. This

Re: async NSOperation and NSOperationQueue

2008-09-16 Thread I. Savant
On Tue, Sep 16, 2008 at 12:50 PM, John Love [EMAIL PROTECTED] wrote: [theQueue waitUntilAllOperationsAreFinished]; From the documentation for this method: When called, this method blocks the current thread and waits for the receiver's current and pending operations to finish executing. While

Re: referencing XML Data

2008-09-16 Thread Amy Heavey
Thanks, I've been messing about with code all over the place, gone a little blind I think, however, I now get 2 errors on this line: 1 - nested functions are disabled, use -fnested-functions to renable 2 - syntax error before in NSArray *customerArray = [custdoc nodesForXPath:@.//customer

Re: How to uniquely determine MD5-sum of a dict?

2008-09-16 Thread I. Savant
On Tue, Sep 16, 2008 at 2:40 PM, Arthur C. [EMAIL PROTECTED] wrote: I have an NSDictionary that has to be written to disk, distributed and read in again. I would like to add an MD5 sum to the dictionary to make sure it has not been modified/corrupted on the way. That can be done by making

Re: How to uniquely determine MD5-sum of a dict?

2008-09-16 Thread Michael Ash
On Tue, Sep 16, 2008 at 2:40 PM, Arthur C. [EMAIL PROTECTED] wrote: I have an NSDictionary that has to be written to disk, distributed and read in again. I would like to add an MD5 sum to the dictionary to make sure it has not been modified/corrupted on the way. That can be done by making

Re: referencing XML Data

2008-09-16 Thread Nathan Kinsinger
On Sep 16, 2008, at 1:24 PM, Amy Heavey wrote: Thanks, I've been messing about with code all over the place, gone a little blind I think, however, I now get 2 errors on this line: 1 - nested functions are disabled, use -fnested-functions to renable 2 - syntax error before in NSArray

Re: referencing XML Data

2008-09-16 Thread Nathan Kinsinger
On Sep 16, 2008, at 12:52 PM, Sherm Pendley wrote: On Tue, Sep 16, 2008 at 7:39 AM, Amy Heavey [EMAIL PROTECTED] wrote: NSArray *customerArray = [custdoc nodesForXPath:@.//customer error:nil]; if ([customerArray count]){ NSXMLNode *customerNode;

Re: Core data grand-children list

2008-09-16 Thread Steve Steinitz
Hi Toma On 16/9/08, Toma? Kragelj [EMAIL PROTECTED] wrote: I have the following core data model: Project Session Measurement On my form I want the user to select the desired project from the table and then based on that selection, I want to display all measurements (for all

Re: referencing XML Data

2008-09-16 Thread Nathan Kinsinger
On Sep 16, 2008, at 2:15 PM, Amy Heavey wrote: I've just tried this again, I just changed the start: void import( NSArray *array ) { and it is all called by: import(custNodes); I assume that means you did something like: NSArray *custNodes = [custdoc nodesForXPath:@.//customer

Re: Core Data and ordered relationships

2008-09-16 Thread Sean McBride
On 9/15/08 3:13 PM, Jamie Hardt said: b) add an attribute named 'index' (value 1 to 6) and code methods named employee1, etc. in my NSManagedObject subclass? Certainly do the second one, unless there's some factor in your business logic that demands exactly six employees, but I can't imagine

Swapping IB-created views and keeping IBOutlets hooked up

2008-09-16 Thread Alex Kac
I have two views that are different layouts of the same UI loaded by a NSViewController. Now lets say that I have an IBOutlet to an NSButton* button1 that is present in both views. I want to swap one view out for the other and when I do so have the IBOutlet for button1 swap to the button1

Re: Drawing on Another App's CGDisplayCapture

2008-09-16 Thread Greg Hoover
I'm building a very similar function to the one described by Ben, but using PowerPoint -- I have an overlay window that is supposed to show auxiliary info during a PowerPoint presentation. I've verified that the drawing routines are running on my overlay window, but the updates are never

Re: Swapping IB-created views and keeping IBOutlets hooked up

2008-09-16 Thread Keary Suska
9/16/08 4:33 PM, also sprach [EMAIL PROTECTED]: I have two views that are different layouts of the same UI loaded by a NSViewController. Now lets say that I have an IBOutlet to an NSButton* button1 that is present in both views. I want to swap one view out for the other and when I do so have

Re: Drawing on Another App's CGDisplayCapture

2008-09-16 Thread David Duncan
On Sep 16, 2008, at 3:44 PM, Greg Hoover wrote: I'm building a very similar function to the one described by Ben, but using PowerPoint -- I have an overlay window that is supposed to show auxiliary info during a PowerPoint presentation. I've verified that the drawing routines are running

Re: Swapping IB-created views and keeping IBOutlets hooked up

2008-09-16 Thread Ken Thomases
On Sep 16, 2008, at 5:33 PM, Alex Kac wrote: I have two views that are different layouts of the same UI loaded by a NSViewController. Is that one view controller managing two views? Or two view controllers, one for each view? In the second case (which makes more sense to me), I'd have

Re: NSOutlineView: Which row is selected.

2008-09-16 Thread John Cebasek
Hi Nick, et al: Well, I did use [self selectedRow], in a previous version of the code. but that also returned -1. I don't think I'm doing anything 'weird', the view has a delegate and a datasource which are in the same class connected in the xib. The awakeFroNib message populates the

Page Curl Transition of Layers

2008-09-16 Thread Timothy Larkin
I am working on animating the swapping of layers into views. By overriding defaultActionForKey for my layer class, I get correct transitions for all of the transition filters in the standard set, except for CIPageCurlTransition. Instead of the page curl, I am seeing a push transition,

Re: referencing XML Data

2008-09-16 Thread Amy Heavey
I've just tried this again, I just changed the start: void import( NSArray *array ) { and it is all called by: import(custNodes); so I beleive this line is uneccessary: NSXMLDocument *custdoc = [[NSXMLDocument alloc] initWithData:[NSData dataWithContentsOfFile:@/Users/nathan/Desktop/xml

Dealing with encoding in XML parsing

2008-09-16 Thread Laurent Cerveau
Hi I have an XML document with obviously some problems with it but that needs to be parsed in all cases. One of the problem is apparently an encoding one as some text read in an editor as Restaurant, Bar, Bistro, CafÈ (reopening with an ISO-8859-1 Windows apparently is solving the

Re: NSOutlineView: Which row is selected.

2008-09-16 Thread Corbin Dunn
On Sep 16, 2008, at 4:17 PM, John Cebasek wrote: Hi Nick, et al: Well, I did use [self selectedRow], in a previous version of the code. but that also returned -1. I don't think I'm doing anything 'weird', the view has a delegate and a datasource which are in the same class connected in

Re: Bug with -changeAttributes: in NSFontManager/Font Panel?

2008-09-16 Thread Graham Cox
On 17 Sep 2008, at 4:46 am, Preston Jackson wrote: [[NSFontManager sharedFontManager] setTarget:self] only sets the target to the changeFont: method. Alternatively, you can put changeFont: in the responder chain it will get called without having to explicitly set the target of the shared

Re: Dealing with encoding in XML parsing

2008-09-16 Thread James Walker
Laurent Cerveau wrote: I have an XML document with obviously some problems with it but that needs to be parsed in all cases. One of the problem is apparently an encoding one as some text read in an editor as Restaurant, Bar, Bistro, CafÈ (reopening with an ISO-8859-1 Windows apparently is

Inverse or remove alpha mask from tiff

2008-09-16 Thread Nate Alf
HI all, Can anyone here recommend a way to inverse an alpha mask, or remove it altogether when exporting to a new file using NSImage? Thanks- Nathan ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests

NSMutableString question

2008-09-16 Thread John Zorko
Hello, all ... I've another simple ObjC question that I hope someone can answer -- this has to do with memory management and NSMutableString. If I do this: NSString *str = [NSMutableString string]; ... what is the best way to reclaim that space? Do I do [str release] (no alloc was

Re: NSMutableString question

2008-09-16 Thread Dave DeLong
The general rule with convenience class methods like that is that they return an autoreleased object. What that means is that unless you retain it, it will disappear at some time in the future (whenever the current AutoreleasePool gets drained). So if you want to reclaim the space, you

Re: NSMutableString question

2008-09-16 Thread Graham Cox
On 17 Sep 2008, at 10:59 am, Dave DeLong wrote: NSString * str = [NSMutableString string]; //do stuff with str [[str retain] release]; HOWEVER, that might cause funky things to happen with the autorelease pool. So the best idea is to do nothing and let the autorelease pool take care of

Re: NSMutableString question

2008-09-16 Thread Jason Coco
On Sep 16, 2008, at 20:59 , Dave DeLong wrote: The general rule with convenience class methods like that is that they return an autoreleased object. What that means is that unless you retain it, it will disappear at some time in the future (whenever the current AutoreleasePool gets

Re: NSMutableString question

2008-09-16 Thread Jim Correia
On Sep 16, 2008, at 8:59 PM, Dave DeLong wrote: The general rule with convenience class methods like that is that they return an autoreleased object. The rules are encapsulated in the object ownership policy:

Re: Outlet from Different Implementation?

2008-09-16 Thread Jeshua Lacock
On Sep 16, 2008, at 4:16 AM, Graham Cox wrote: Well, the accessor method I had in mind, in its entirety, is: - (id) myOutlet { return MyOutlet; } Thanks Graham, Looks simple enough, however, I can't seem to make it work. I get a warning warning: instance variable 'MyOutlet'

Re: NSMutableString question

2008-09-16 Thread Ken Thomases
On Sep 16, 2008, at 7:59 PM, Dave DeLong wrote: The general rule with convenience class methods like that is that they return an autoreleased object. They return an object for which you do not have responsibility to release. It may or may not be technically autoreleased. What that means

Re: NSMutableString question

2008-09-16 Thread Dave DeLong
Earlier today I was experimenting with NSAutoreleasePools and built a little demo app. Basically it was two nested loops (the outer having 100 iterations, the inner 1000), and on each iteration of the inner loop, I created an autoreleased string (using stringWithFormat:). I ran it twice.

Re: NSMutableString question

2008-09-16 Thread Graham Cox
On 17 Sep 2008, at 11:11 am, Dave DeLong wrote: because only a couple days ago I had a crash when I tried releasing an already autoreleased object Yes, because that would be an over-release. release must be balanced by a preceding retain. But once an object has been added to an

Re: NSMutableString question

2008-09-16 Thread Dave DeLong
On 16 Sep, 2008, at 7:22 PM, Graham Cox wrote: On 17 Sep 2008, at 11:11 am, Dave DeLong wrote: because only a couple days ago I had a crash when I tried releasing an already autoreleased object Yes, because that would be an over-release. release must be balanced by a preceding retain.

Re: NSMutableString question

2008-09-16 Thread Jason Coco
On Sep 16, 2008, at 21:24 , Dave DeLong wrote: On 16 Sep, 2008, at 7:22 PM, Graham Cox wrote: On 17 Sep 2008, at 11:11 am, Dave DeLong wrote: because only a couple days ago I had a crash when I tried releasing an already autoreleased object Yes, because that would be an over-release.

Re: NSMutableString question

2008-09-16 Thread Bill Bumgarner
On Sep 16, 2008, at 6:29 PM, Jason Coco wrote: Is it actually retained by the pool, or does the pool just delay the final release? It doesn't really matter how it's implemented... either way, you shouldn't release it unless you own it (i.e., you've retained it yourself or gotten it from

Re: Outlet from Different Implementation?

2008-09-16 Thread Graham Cox
On 17 Sep 2008, at 11:18 am, Jeshua Lacock wrote: - (id) myOutlet { return MyOutlet; } Thanks Graham, Looks simple enough, however, I can't seem to make it work. I get a warning warning: instance variable 'MyOutlet' accessed in a class method Does your accessor look like

Re: NSMutableString question

2008-09-16 Thread Jason Coco
On Sep 16, 2008, at 21:58 , Bill Bumgarner wrote: On Sep 16, 2008, at 6:29 PM, Jason Coco wrote: Is it actually retained by the pool, or does the pool just delay the final release? It doesn't really matter how it's implemented... either way, you shouldn't release it unless you own it

Re: NSMutableString question

2008-09-16 Thread Roland King
Jason Coco wrote: NSMutableString *str = [[NSMutableString alloc] initWithCapacity:someAssumedCapacity]; /* do stuff */ [str release]; Is that actually guaranteed to release the string *right now*? I only ask because I seem to recall a message a couple of months ago about a more

Re: NSMutableString question

2008-09-16 Thread Bill Bumgarner
On Sep 16, 2008, at 7:41 PM, Roland King wrote: Jason Coco wrote: NSMutableString *str = [[NSMutableString alloc] Â initWithCapacity:someAssumedCapacity]; /* do stuff */ [str release]; Is that actually guaranteed to release the string *right now*? I only ask because I seem to recall a

Re: NSMutableString question

2008-09-16 Thread Graham Cox
On 17 Sep 2008, at 12:41 pm, Roland King wrote: Is that actually guaranteed to release the string *right now*? I only ask because I seem to recall a message a couple of months ago about a more complicated object where it appeared that the initializer did a retain/autorelease on the object

Re: NSMutableString question

2008-09-16 Thread Jason Coco
On Sep 16, 2008, at 22:41 , Roland King wrote: Jason Coco wrote: NSMutableString *str = [[NSMutableString alloc] initWithCapacity:someAssumedCapacity]; /* do stuff */ [str release]; Is that actually guaranteed to release the string *right now*? I only ask because I seem to recall a

Re: Swapping IB-created views and keeping IBOutlets hooked up

2008-09-16 Thread Jonathan Hess
Hey Alex - If your controller is the File's Owner, and in your NIB there is a connection connecting the the File's Owner's 'myButton' outlet to a button, then when you load the nib, the controller's myButton instance variable will be connected to the button in the nib. So far, everything

Re: Bug with -changeAttributes: in NSFontManager/Font Panel?

2008-09-16 Thread Kyle Sluder
On Tue, Sep 16, 2008 at 7:50 PM, Graham Cox [EMAIL PROTECTED] wrote: I'm not using a text view directly, but I do have attributed text that could take advantage of the Font Panel's UI if this worked. Since I'm trying to receive this in a dialog that has text fields, I wonder if the message is

Re: Bug with -changeAttributes: in NSFontManager/Font Panel?

2008-09-16 Thread Graham Cox
On 17 Sep 2008, at 1:43 pm, Kyle Sluder wrote: On Tue, Sep 16, 2008 at 7:50 PM, Graham Cox [EMAIL PROTECTED] wrote: I'm not using a text view directly, but I do have attributed text that could take advantage of the Font Panel's UI if this worked. Since I'm trying to receive this in a

Re: Outlet from Different Implementation?

2008-09-16 Thread Jeshua Lacock
On Sep 16, 2008, at 8:11 PM, Graham Cox wrote: Does your accessor look like mine above, or does it look like this: + (id) myOutlet { return MyOutlet; } The '+' or '-' symbol in front of the method is very important. + means it's a class method, - means it's an instance method. See

Re: NSOutlineView: Which row is selected.

2008-09-16 Thread Andy Lee
On Sep 16, 2008, at 7:17 PM, John Cebasek wrote: Well, I did use [self selectedRow], in a previous version of the code. but that also returned -1. I don't think I'm doing anything 'weird', the view has a delegate and a datasource which are in the same class connected in the xib. The

Re: Swapping IB-created views and keeping IBOutlets hooked up

2008-09-16 Thread Alex Kac
Perfect - I appreciate it. On Sep 16, 2008, at 10:11 PM, Jonathan Hess wrote: Hey Alex - If your controller is the File's Owner, and in your NIB there is a connection connecting the the File's Owner's 'myButton' outlet to a button, then when you load the nib, the controller's myButton

Re: Animation curve is always linear though specified to be S-like

2008-09-16 Thread Oleg Krupnov
I have got no response, but still I wasn't able to fix this problem. Any ideas? On Wed, Aug 20, 2008 at 9:49 PM, Oleg Krupnov [EMAIL PROTECTED] wrote: The problem is that my animation always seems to perform linearly, not S-like, although I specify it to do the latter. Here's my code:

Re: Animation curve is always linear though specified to be S-like

2008-09-16 Thread Graham Cox
On 17 Sep 2008, at 2:56 pm, Oleg Krupnov wrote: I get the following log: 0.166700 0.333450 0.499950 0.10 0.833090 0.999710 1.00 It follows that the animation is linear (the increment is constant) Does it? The likelihood is that the animation is performed using a regular

Re: Animation curve is always linear though specified to be S-like

2008-09-16 Thread Graham Cox
On 17 Sep 2008, at 3:04 pm, Graham Cox wrote: Does it? The likelihood is that the animation is performed using a regular interval, but the position is modified according to the S- curve function. With only 7 steps of animation, it's probable that you are just not noticing the easing in and

Re: Animation curve is always linear though specified to be S-like

2008-09-16 Thread Oleg Krupnov
It has just dawned at me that I should use [self currentValue] instead of [self currentProgress] as the argument for the function that alters the position during animation, i.e. NSLog( [NSString stringWithFormat:@%f, [self currentValue]]); The progress indeed grows linearly, at regular time

NSApplication subclass crashes on 10.3 with Xcode 3

2008-09-16 Thread Kevin Wojniak
I'm working on an app that was recently brought over to Xcode 3 from a 2.X version. The app uses an NSApplication subclass that's in a framework, and crashes upon startup on 10.3 when using the Xcode 3 build. However, with Xcode 3/10.5 and Xcode 2.5/10.3, it works. I've successfully