Re: Hillegass, Third Edition, Chapter 18

2008-07-16 Thread Jon Buys
Thanks for your help everyone! I wound up taking a look at someone else's code that is working, and basing my code off their example. (Thanks Aron!) I don't have it working just yet, but I've got a little more reading to do on NSMutableArray. My app is not adding the NSBezierPath object to my

Re: Hillegass, Third Edition, Chapter 18

2008-07-15 Thread Aron Nopanen
Jon, Your post sounds like a statement of fact more than a question, but I assume you're wondering why you can't draw multiple ovals? The view will be redrawn at various points, outside of your control, and your drawRect: routine must re-draw all previously-drawn ovals each time. This

Re: Hillegass, Third Edition, Chapter 18

2008-07-15 Thread Jeff Brown
Hi Jon Just an aside - does Hillegass, Third Edition teach you Core Data? The blurb on Amazon says it does but when I looked at the index online it didn't mention Core Data. Jeff Start at the new Yahoo!7 for a better online experience. www.yahoo7.com.au

Re: Hillegass, Third Edition, Chapter 18

2008-07-15 Thread Antonio Nunes
On 15 Jul 2008, at 07:44, Jeff Brown wrote: Just an aside - does Hillegass, Third Edition teach you Core Data? The blurb on Amazon says it does but when I looked at the index online it didn't mention Core Data. Yes, it does. Chapter 11: Basic Core Data. António

Re: Hillegass, Third Edition, Chapter 18

2008-07-15 Thread Glenn Sequeira
+ Chapter 30: Core Data Relationships On Tuesday, July 15, 2008, at 12:02AM, Antonio Nunes [EMAIL PROTECTED] wrote: On 15 Jul 2008, at 07:44, Jeff Brown wrote: Just an aside - does Hillegass, Third Edition teach you Core Data? The blurb on Amazon says it does but when I looked at the index

Re: Hillegass, Third Edition, Chapter 18

2008-07-15 Thread Antonio Nunes
On 15 Jul 2008, at 04:53, Jon Buys wrote: I'm working through the challenge app at the end of Chapter 18 of Cocoa Programming, Third Edition. I've got my app to the point where it can draw ovals, but each time I click in the window it seems like the view redraws itself. I'm sure that

Re: Hillegass, Third Edition, Chapter 18

2008-07-15 Thread Kyle Sluder
On Tue, Jul 15, 2008 at 7:25 AM, Jon Buys [EMAIL PROTECTED] wrote: How can I add a rect to an array? Do I have to convert it first? Wrap the NSRect in an NSValue using +[NSValue valueWithRect:]. --Kyle Sluder ___ Cocoa-dev mailing list

Re: Hillegass, Third Edition, Chapter 18

2008-07-15 Thread Antonio Nunes
On 15 Jul 2008, at 12:25, Jon Buys wrote: Thanks for your help, I'm going through your code now, comparing it to my old code and reading the documentation. NSUnionRect doesn't seem to be much help in the docs though: Returns the smallest rectangle that completely encloses both aRect and

Re: Hillegass, Third Edition, Chapter 18

2008-07-15 Thread Daniel Richman
Stefan Arentz wrote: Hi Jon Just an aside - does Hillegass, Third Edition teach you Core Data? The blurb on Amazon says it does but when I looked at the index online it didn't mention Core Data. No it does not teach you Core Data. There are two Core Data chapters but they are more 'click

Re: Hillegass, Third Edition, Chapter 18

2008-07-15 Thread Tommy Nordgren
On 15 jul 2008, at 13.25, Jon Buys wrote: ...snip Drawing a new rect on every mouseDown is the main problem I'm having now, but I think it's because I'm not adding the rect to an NSMutableArray. I'm working on that now, but I've run out of time this morning. How can I add a rect to an

Re: Hillegass, Third Edition, Chapter 18

2008-07-15 Thread Kyle Sluder
On Tue, Jul 15, 2008 at 2:54 PM, Tommy Nordgren [EMAIL PROTECTED] wrote: Don't even think about storing the NSRects in an NSArray. NSRect is a struct -- not a class NSRect can be wrapped up in an NSValue, as I mentioned above, and stored in an array. KVC will automatically do the same for

Re: Hillegass, Third Edition, Chapter 18

2008-07-15 Thread Jason Stephenson
Tommy Nordgren wrote: ... Don't even think about storing the NSRects in an NSArray. NSRect is a struct -- not a class Instead store NSBezierPath instances, or create an oval class. If you're feeling ambitious, you'd make your own class to hold the oval information, such as its NSRect,

Hillegass, Third Edition, Chapter 18

2008-07-14 Thread Jon Buys
Hello All, I'm working through the challenge app at the end of Chapter 18 of Cocoa Programming, Third Edition. I've got my app to the point where it can draw ovals, but each time I click in the window it seems like the view redraws itself. I'm sure that this is a very simple question with a very