Re: Newbie question
Re: Newbie question
- Subject: Re: Newbie question
- From: James Mooney <email@hidden>
- Date: Thu, 13 Mar 2003 14:32:55 -0500
I do not know who that author is, but my book says Apple Computer and
James Davidson.......
Perhaps he wrote the first version and the newer book which include
Object C primer is written by a second party....Davidson.
I do not see any explaination of the differences in instantiating a
class in Interface builder and not doing so....
There is a big difference and I am dieing to find out what the
differences are....
Jim
On Thursday, March 13, 2003, at 02:14 PM, jim kitchen wrote:
Jim,
An author posted an email a few hours ago and, in this author's web
page,
located here:
<http://web.sabi.net/nriley/software/#launch>
I noticed that he revised and, or modified some of the examples you are
working on. Dot view is one of his examples.
Check his page out and see what he did. It looked interesting.
jim k
On 3/13/03 9:35 AM, "James Mooney" <email@hidden> wrote:
Greetings,
I recently went through the book Cocoa and Objective C and had a
question on one of the examples.
If anyone is familiar with the book, great. There is an example which
deals with events. Chapter 8 Dotview
The app has three items in a window. A slider, a colorwell, and an
NSView box. When you click in the NSView box a circle is drawn in the
box at the point where the mouse event occurred. The slider makes the
circle radius bigger and small. The colorwell changes the color of
the
circle drawn.
There is one class call Dotview that handles everything in the window.
When I first went through the tutorial, the slider and the colorwell
would not work. After several hours of checking and rechecking, I
found something that was causing my problem. This is the basis for my
question.
In this example, you are not supposed to instantiate the class
Dotview.
When you do, the problem above occurs. When you delete the
instatiaion in the interface builder, everything works fine. The
slider changes the size of the shape and the colorwell works fine. It
wasn't until I downloaded the complete project from the publishers
website that I saw there was no little Dotview icon. I immediately
saw
what I was doing wrong. However, I do not understand how
instantiating
in the interface builder effects the operation of my project. All
examples I have seen so far told you to instantiate the class and then
write the classes to the project. In this case.....you are only
supposed to do the later. The Dotview.h and .m files were created.
What does instantiating a class do when you tell it to be done in the
interface builder? Whether you do it or not, the slider and the
colorwell gets drawn. If I instantiate the Dotview class, the
communication of the slider and the NSView do not work, not
instantiating and they talk to each other? There is no change in the
code in the .m or .h files so I assume there is some plist or xml doc
the app uses where info is added or subtracted when you instruct a
class to be instantiated. Anyone know the reason why? What is going
on?
Jim
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.