Re: NSString's "mutableCopy" creating a leak?

2008-10-01 Thread D.K. Johnston
On 1 Oct, 2008, at 12:57, Christopher J Kemsley wrote: I neglected to mention in my original post that, when this object is deallocated, it explicitly deallocated the editedRowName before calling a [super dealloc], so the thing should be deallocated. But how many times is a copy assigned to

Re: NSString's "mutableCopy" creating a leak?

2008-10-01 Thread D.K. Johnston
ng list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/dkj%40shaw.ca This email sent to [E

Property attributes

2008-09-30 Thread D.K. Johnston
Am I right in assuming that property attributes like "assign" and "nonatomic" have no effect for types like NSInteger and BOOL? i.e. @property NSInteger myInteger; is exactly the same as: @property(assign,nonatomic) NSInteger myInteger; dkj __

Re: Properties and bindings

2008-09-26 Thread D.K. Johnston
It's working now, but I don't understand why. I've got two objects: MyController and MyModel. The interesting parts of the headers look like this: @interface MyModel : NSObject { NSInteger myInteger; } @property(assign) NSInteger myInteger; - (void)changeMyInteger; @end @interface

Re: Properties and bindings

2008-09-23 Thread D.K. Johnston
Thanks for the explanations: it does make some kind of sense now. The reason I was looking at both forms is that I want the myInt property to be read-only, but I want the MyObject instance to be able to set it. If I do this: @property(readonly) NSInteger myInt; I can't do this in M

Properties and bindings

2008-09-22 Thread D.K. Johnston
I'm trying to learn how to use bindings. MyObject has an NSInteger myInt. I used @property and @synthesize to make myInt into a property. In IB I bound an NSTextField to the myInt property. Now when I do this: self.myInt = 123; when initialising MyObject, the value shows up in the te

NSArchiver and NSKeyedArchiver

2008-09-22 Thread D.K. Johnston
I wrote a class that conforms to the NSCoding protocol. I used encodeObject:forKey and decodeObjectForKey: in the required methods. By mistake I used NSArchiver to archive one of the class instances. It compiled with no trouble; but then, not surprisingly, I got an exception when I ran it:

Games for iPhone

2008-09-18 Thread D.K. Johnston
I've written a couple of cute little memory games. If anyone is interested in creating an iPhone interface for them, please contact me off-list. dkj ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or modera

Re: iPod Touch apps

2008-09-17 Thread D.K. Johnston
On 17 Sep, 2008, at 13:13, Sherm Pendley wrote: For crying out loud, people, grow up! It's called the iPhone Try to develop a sense of humour: you'll do a lot less crying-out-loud. ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do n

iPod Touch apps

2008-09-17 Thread D.K. Johnston
How would I go about developing apps for the iPod Touch? Is there a separate SDK? Or would I need to use the one-whose-name-we-dare-not- speak? dkj ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderato

Re: NSMatrix mouse puzzle

2008-09-03 Thread D.K. Johnston
008, at 21:52, Graham Cox wrote: On 4 Sep 2008, at 2:40 pm, D.K. Johnston wrote: // wait 10 seconds NSUInteger i = 0, resume = time( nil ) + 10; while( i < resume ) index = time( nil ); Don't do this! This is not a good way to wait for a period

NSMatrix mouse puzzle

2008-09-03 Thread D.K. Johnston
I've got a matrix of buttons in a window that I want to disable for a short period, while data is being displayed. So I wrote something like this: [theMatrix setEnabled:NO]; // wait 10 seconds NSUInteger i = 0, resume = time( nil ) + 10; while( i < res

NSInteger

2008-09-03 Thread D.K. Johnston
I'm a bit puzzled by the new NSInteger type. Should I be using this now instead of int? (I'm just as puzzled by NSUInteger, of course.) dkj ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comment