Re: Where do these come from...

2012-08-16 Thread Graham Cox
On 16/08/2012, at 1:02 PM, Charlie Dickman <3tothe...@comcast.net> wrote: > Here's the whole method... it is being called from within a view's drawRect > method... > > iDie = iRand(1, 6); This is also nuts (though unrelated to your problem). You will get a new random value every time

Re: Where do these come from...

2012-08-16 Thread Mike Abdullah
On 16 Aug 2012, at 04:02, Charlie Dickman <3tothe...@comcast.net> wrote: > Here's the whole method... it is being called from within a view's drawRect > method... > > - (void) showDiceAtX: (float) x Y: (float) y { > NSRect imageRect1, imageRect2; > NSImage *die1 = nil, *die2 = nil;

Re: Where do these come from...

2012-08-16 Thread Quincey Morris
On Aug 15, 2012, at 20:39 , Charlie Dickman <3tothe...@comcast.net> wrote: > I DO NOT call drawRect directly. I DO call [self setNeedsDisplay: YES] to > keep things going. All drawing is done from inside drawRect which has been > invoked through the use of [self setNeedsDisplay: YES], That's g

Re: Where do these come from...

2012-08-15 Thread Graham Cox
On 16/08/2012, at 1:20 AM, Charlie Dickman <3tothe...@comcast.net> wrote: > I have isolated their source to the following code... But WHERE is this code? If it's not with a view's -drawRect: method, you might not have a valid context. --Graham ___

Re: Where do these come from...

2012-08-15 Thread Stephen J. Butler
On Wed, Aug 15, 2012 at 10:39 PM, Charlie Dickman <3tothe...@comcast.net> wrote: > I DO NOT call drawRect directly. I DO call [self setNeedsDisplay: YES] to > keep things going. All drawing is done from inside drawRect which has been > invoked through the use of [self setNeedsDisplay: YES], May

Re: Where do these come from...

2012-08-15 Thread Charlie Dickman
I DO NOT call drawRect directly. I DO call [self setNeedsDisplay: YES] to keep things going. All drawing is done from inside drawRect which has been invoked through the use of [self setNeedsDisplay: YES], On Aug 15, 2012, at 11:19 PM, Stephen J. Butler wrote: > On Wed, Aug 15, 2012 at 10:02 PM

Re: Where do these come from...

2012-08-15 Thread Stephen J. Butler
On Wed, Aug 15, 2012 at 10:02 PM, Charlie Dickman <3tothe...@comcast.net> wrote: > Here's the whole method... it is being called from within a view's drawRect > method... Are you calling drawRect directly from your code? If so, don't do that. You should be sending one of the setNeedsDisplay messa

Re: Where do these come from...

2012-08-15 Thread Kyle Sluder
On Aug 15, 2012, at 8:20 AM, Charlie Dickman <3tothe...@comcast.net> wrote: > I have been getting the following messages in the console window while my > program is running... > > Wed Aug 15 11:13:51 charlie-dickmans-mac-pro.local Mah-Jongg[4416] : > CGContextSetFillColorWithColor: invalid cont

Re: Where do these come from...

2012-08-15 Thread Charlie Dickman
Here's the whole method... it is being called from within a view's drawRect method... - (void) showDiceAtX: (float) x Y: (float) y { NSRect imageRect1, imageRect2; NSImage *die1 = nil, *die2 = nil; iDie = iRand(1, 6); switch (iDie) { case 1:

Re: Where do these come from...

2012-08-15 Thread Stephen J. Butler
On Wed, Aug 15, 2012 at 10:20 AM, Charlie Dickman <3tothe...@comcast.net> wrote: > [[NSColor whiteColor] set]; > [die1 drawInRect: iDieDrawRect > fromRect: imageRect1 > operation: NSCompositeSourceOver > fr

Where do these come from...

2012-08-15 Thread Charlie Dickman
I have been getting the following messages in the console window while my program is running... Wed Aug 15 11:13:51 charlie-dickmans-mac-pro.local Mah-Jongg[4416] : CGContextSetFillColorWithColor: invalid context 0x0 Wed Aug 15 11:13:51 charlie-dickmans-mac-pro.local Mah-Jongg[4416] : CGContext