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

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
thread Thread Starter Forum Replies Last Post
Rotate a NSView and make it's origin point starts from the bottom left corner smokyonion Mac Programming 2 May 25, 2011 01:33 PM
Download biz has to change, or digital sales will be playing... MacBytes MacBytes.com News Discussion 10 Feb 20, 2007 03:30 PM
Switchers, how has switching changed your life? bob5820 Mac Pro 20 Nov 3, 2006 06:44 PM
Complaint: Something has to change with some of you! slooksterPSV Site and Forum Feedback 18 Jun 20, 2005 08:17 AM
Humanity has been changing the climate for 8000 years! Stelliform Current Events 16 Dec 12, 2003 11:26 PM


All times are GMT -5. The time now is 04:13 AM.

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

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