Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

munkees

macrumors 65816
Original poster
Sep 3, 2005
1,027
1
Pacific Northwest
I am learning Cocoa with Objective-c using the book, I am in chapter 8 which has a Dot View program, it use NSBezier, the book was writen for Mac OS X 10.2 I am using xcode 2.3 on Tiger. When I run the program it does not draw the dot.

Has the x/y start point moved from the bottom left corner?

Just don't under stand why it does not display any Ideas
 
As to why it does not display, posting your drawing code may help. There are a number of things that could cause it not to display (including your drawRect or other drawing method never being called at all).
 
You need to update the view, so let's say the mouse clicked on the view, in the mouseDown method put this at the end:

[self setNeedsDisplay:YES];

Whatever tells NSView to display put:

[viewObject setNeedsDisplay:YES];
if you are calling it from a function outside of NSView.
 
munkees said:
I am learning Cocoa with Objective-c using the book, I am in chapter 8 which has a Dot View program, it use NSBezier, the book was writen for Mac OS X 10.2 I am using xcode 2.3 on Tiger. When I run the program it does not draw the dot.

Has the x/y start point moved from the bottom left corner?

Just don't under stand why it does not display any Ideas

It is possible to flip the coordinate system.

I suggest you post your code.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.