Re: Drawing A Mutable String

2010-01-12 Thread Andy Lee
On Jan 12, 2010, at 1:29 PM, Michael Craig wrote: > Well, I feel dumb. Your (Andy's) mention of setNeedsDisplay: caught my eye, > and I realized soon after that the button whose method causes invalidStack to > be YES never tells the view the redraw. I still don't entirely understand why > the te

Re: Drawing A Mutable String

2010-01-12 Thread Michael Craig
Well, I feel dumb. Your (Andy's) mention of setNeedsDisplay: caught my eye, and I realized soon after that the button whose method causes invalidStack to be YES never tells the view the redraw. I still don't entirely understand why the text didn't get drawn when the view was subsequently redrawn (b

Re: Drawing A Mutable String

2010-01-11 Thread Andy Lee
Bizarre. I love bugs like this that it's easy to prove can't possibly be happening. :) The only desperate, farfetched suggestion I have is that somehow you've accidentally created two instances of your GameView, only one of which is visible, and for some reason when invalidStack is true, the c

Re: Drawing A Mutable String

2010-01-11 Thread Michael Craig
Andy: There's nothing drawing over it. I can move that chunk of code to the end of drawRect: with the same result. Quincy: rightAligned is a paragraph style object that's defined elsewhere in drawRect and used in a few different places. Fritz: All four things you mention are apparently true when

Re: Drawing A Mutable String

2010-01-07 Thread Fritz Anderson
On 7 Jan 2010, at 2:29 PM, Michael Craig wrote: >if ([theDeck.cardPile count] == 0) { >[infoStr appendString: @"\n\nThe deck is empty."]; // > *2* >} >if (gameCon.invalidStack) { >[infoStr appendString: @"\n\nThat's an invalid stack."];// > *1* >

Re: Drawing A Mutable String

2010-01-07 Thread Quincey Morris
On Jan 7, 2010, at 12:29, Michael Craig wrote: >NSDictionary *infoAtts = [NSDictionary > dictionaryWithObjectsAndKeys: [NSFont > labelFontOfSize:infoFontSize], NSFontAttributeName, > rightAligned, > NSParagraphStyleAt

Re: Drawing A Mutable String

2010-01-07 Thread Andy Lee
Looks fine to me. Is there any chance the correct text *is* being drawn but is subsequently erased or drawn over by something else in the rest of the drawRect: method? --Andy On Thursday, January 07, 2010, at 03:29PM, "Michael Craig" wrote: >Hi all, >This has me completely boggled. > >I've

Drawing A Mutable String

2010-01-07 Thread Michael Craig
Hi all, This has me completely boggled. I've got a GameController with some BOOL instance variables that it uses to make certain gamestate information available to other objects. I've also got a GameView that looks at those BOOLs and conditionally appends an NSMutableString before it gets drawn. T