Register FAQ / Rules Forum Spy Search Today's Posts Mark Forums Read
Go Back   MacRumors Forums > Apple Systems and Services > Programming > Mac Programming

Reply
 
Thread Tools Search this Thread Display Modes
Old Jul 17, 2006, 11:47 PM   #1
munkees
macrumors 65816
 
munkees's Avatar
 
Join Date: Sep 2005
Location: Pacific Northwest
has NSView changed

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
__________________
iMacs, MBA and iPhone.
munkees is offline   0 Reply With Quote
Old Jul 18, 2006, 02:45 AM   #2
robbieduncan
Moderator
 
robbieduncan's Avatar
 
Join Date: Jul 2002
Location: London
Nope. According to the documentation (at file:///Developer/ADC%20Reference%20...ide/index.html on your harddrive under a normal XCode install) the coordinate system is still based from the bottom left.
robbieduncan is offline   0 Reply With Quote
Old Jul 18, 2006, 10:32 AM   #3
HiRez
macrumors 601
 
HiRez's Avatar
 
Join Date: Jan 2004
Location: Western US
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).
__________________
Go outside, the graphics are amazing!
HiRez is offline   0 Reply With Quote
Old Jul 18, 2006, 11:03 AM   #4
slooksterPSV
macrumors 68030
 
Join Date: Apr 2004
Location: Nowheresville
Send a message via AIM to slooksterPSV Send a message via MSN to slooksterPSV Send a message via Yahoo to slooksterPSV
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.
__________________
AMD Phenom 9600, 2GB RAM, 250GB HDD, ATI Radeon 4850, Vista Home Premium 64-bit
Gateway NV53 with Windows 7 Home Premium 64-bit & Ubuntu 10.04 Lucid Lynx 64-bit
slooksterPSV is offline   0 Reply With Quote
Old Jul 18, 2006, 12:47 PM   #5
savar
macrumors 68000
 
savar's Avatar
 
Join Date: Jun 2003
Location: District of Columbia
Send a message via AIM to savar
Quote:
Originally Posted by munkees
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.
__________________
Mehce
savar is offline   0 Reply With Quote

Reply
MacRumors Forums > Apple Systems and Services > Programming > Mac Programming

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Similar Threads
thread Thread Starter Forum Replies Last Post
Pixar President: 'Steve Jobs Changed Pixar Even as Pixar Changed Him' MacRumors MacRumors.com News Discussion 30 Apr 10, 2014 10:16 AM
Custom NSView with subview of NSSplitView ArtOfWarfare Mac Programming 3 Aug 20, 2013 05:16 AM
Resolved: Trying to subclass NSView Hans Kamp Mac Programming 9 Mar 25, 2013 04:43 PM
NSView and NSBezierPath - modelling free fall of an object moray95 Mac Programming 0 Mar 7, 2013 09:53 AM
Speakers changed? crazyman3005 iPhone 2 Sep 18, 2012 08:32 PM

Forum Jump

All times are GMT -5. The time now is 02:59 AM.

Mac Rumors | Mac | iPhone | iPhone Game Reviews | iPhone Apps

Mobile Version | Fixed | Fluid | Fluid HD
Copyright 2002-2013, MacRumors.com, LLC