Re: Example DotView from Learning Cocoa.
Re: Example DotView from Learning Cocoa.
- Subject: Re: Example DotView from Learning Cocoa.
- From: Lamar Williams <email@hidden>
- Date: Fri, 14 Sep 2001 21:13:10 -0700
There is only 1 instance within the .nib files.
What I did notice is that, if I delete the instance, of DotView, from the
MainMenu.nib window and recompile and run, I still get a horizontal
slider and a color well in the view. Why? This is my problem.
On Friday, September 14, 2001, at 08:48 PM, David Rehring wrote:
Lamar,
What I meant is that there might be two instances of Dot View within a
single .nib file.
One Dot View copy in a window view [ie, this would be visible in
InterfaceBuilder in a window that you have laid out to display to the
end-user when your program is running]
A second copy of Dot View in the .nib file [ie, this would be visible in
InterfaceBuilder in the 'info.nib' or 'classes.nib' or 'objects.nib'
window,
which would not be displayed to the end-user when your program is
running]
I checked, there is only 1 copy of each nib (classes.nib, info.nib and
objects.nib) file.
On Friday, September 14, 2001, at 07:13 PM, David Rehring wrote:
Hello,
Can someone tell me why the address of "self" is different in
different
functions in the DotView class? A printout of the value of self from
diffrent functions is shown below.
----------------------------------------------------------------------------
--
-------
Sep 14 17:53:23 Dot View[1027] initWithFram self = 0x18d2020
Sep 14 17:53:23 Dot View[1027] initWithFram self = 0x18d4860
Sep 14 17:53:23 Dot View[1027] awakeFromNib self = 0x18d2020
Sep 14 17:53:23 Dot View[1027] awakeFromNib self = 0x18d4860
Sep 14 17:53:23 Dot View[1027] isOpaque self = 0x18d2020
Sep 14 17:53:23 Dot View[1027] isOpaque self = 0x18d2020
Sep 14 17:53:23 Dot View[1027] isOpaque self = 0x18d2020
Sep 14 17:53:23 Dot View[1027] drawRect self = 0x18d2020
Sep 14 17:53:26 Dot View[1027] setRadius self = 0x18d4860
Sep 14 17:53:26 Dot View[1027] setRadius self = 0x18d4860
Sep 14 17:53:26 Dot View[1027] setRadius self = 0x18d4860
Sep 14 17:53:26 Dot View[1027] setRadius self = 0x18d4860
Sep 14 17:53:26 Dot View[1027] setRadius self = 0x18d4860
Sep 14 17:53:26 Dot View[1027] setRadius self = 0x18d4860
Sep 14 17:53:26 Dot View[1027] setRadius self = 0x18d4860
Sep 14 17:53:28 Dot View[1027] mouseUp self = 0x18d2020
Sep 14 17:53:28 Dot View[1027] isOpaque self = 0x18d2020
Sep 14 17:53:28 Dot View[1027] drawRect self = 0x18d2020
----------------------------------------------------------------------------
--
----
The real question is why are there 2 instances of the DotView class?
It would appear you have two copies of it in your 'nib' file.
Could it be that you've dragged one copy into a 'window' for placement
purposes, and you've dragged a second copy to the 'nib' window? This
would
result in two copies being created.
Later,
--
David Rehring Psychos do not explode when light hits
Senior Software Engineer them, no matter how crazy they are...
Atimi Software, Inc.
www.atimi.com And totally insane guy!