On Aug 21, 2009, at 02:51, Jeremy Hughes wrote:
How about...
From Kevin Cathey (10/6/09, 06:37):
"We encourage you to use the controller's controller specific methods
for knowing when you content is loaded:
NSWindowController -- windowDidLoad
UIViewController -- viewDidLoad
Since the behavio
Quincey Morris (20/8/09, 19:31) said:
>On Aug 20, 2009, at 11:02, I. Savant wrote:
>
>> I missed that thread. Do you happen to know some keywords from the
>> subject?
>
>No, I've looked for it but I can't find it. It was one of a number of
>similar questions around that time, possibly about iPhon
c. A couple of weeks ago on this list, one of our Apple experts
(Luke, maybe, but I can't remember for sure) said to use the more
specialized method (such as 'windowDidLoad') *instead of* the
generic 'awakeFromNib', if the class has it.
I missed that thread. Do you happen to know some keywo
Le 20 août 2009 à 20:02, I. Savant a écrit :
On Aug 20, 2009, at 1:12 PM, Quincey Morris wrote:
a. I'm not sure how 'loadWindow' got into this discussion -- the
documentation says not to call 'loadWindow' directly but to call
'window' instead and let *it* call 'loadWindow'.
You're right
On Aug 20, 2009, at 11:05 AM, I. Savant wrote:
On Aug 20, 2009, at 10:59 AM, Kyle Sluder wrote:
Use -awakeFromNib to do view setup (turning on layer backing,
creating caches colors, etc.). Use -windowDidLoad (or -
windowControllerDidLoadNib or whatever that NSDocument method is)
for setting
On Aug 20, 2009, at 2:31 PM, Quincey Morris wrote:
All I can remember is that it sent me scurrying to change some
window controller awakeFromNib's to windowDidLoad's.
:-)
It has me rethinking some things too, but I won't scurry just yet.
--
I.S.
___
On Aug 20, 2009, at 11:02, I. Savant wrote:
I missed that thread. Do you happen to know some keywords from the
subject?
No, I've looked for it but I can't find it. It was one of a number of
similar questions around that time, possibly about iPhone views, and
the comment was an afterthoug
On Aug 20, 2009, at 1:12 PM, Quincey Morris wrote:
a. I'm not sure how 'loadWindow' got into this discussion -- the
documentation says not to call 'loadWindow' directly but to call
'window' instead and let *it* call 'loadWindow'.
You're right, my mistake. I was responding to Jean-Daniel's
On Aug 20, 2009, at 07:21, I. Savant wrote:
I'm not convinced yet that relying on -loadWindow is as good as
keeping nib-loading-related startup code in -awakeFromNib.
a. I'm not sure how 'loadWindow' got into this discussion -- the
documentation says not to call 'loadWindow' directly but t
On Aug 20, 2009, at 8:05 AM, "I. Savant"
wrote:
Hmm ... so would you say to do otherwise is "doing it wrong" or
"doing it sub-optimally"?
No, but if it winds up mattering, that's how it usually shakes out. So
I tend to follow that pattern even before it begins to matter.
--Kyle Sluder
On Aug 20, 2009, at 10:59 AM, Kyle Sluder wrote:
Use -awakeFromNib to do view setup (turning on layer backing,
creating caches colors, etc.). Use -windowDidLoad (or -
windowControllerDidLoadNib or whatever that NSDocument method is)
for setting up inter-view relationships.
Hmm ... so wou
On Aug 20, 2009, at 7:43 AM, "I. Savant"
wrote:
The remaining questions are "is one better than the other?" and "if
so, which?"
Use -awakeFromNib to do view setup (turning on layer backing, creating
caches colors, etc.). Use -windowDidLoad (or -
windowControllerDidLoadNib or whatever th
On Aug 20, 2009, at 10:40 AM, Jean-Daniel Dupas wrote:
It's fine too.
From the NSWindowController subclass note (at bottom of the
reference):
"windowDidLoad : Override to perform tasks after the window nib file
is loaded."
And the -[NSWindowController window] and -[NSWindowController
Le 20 août 2009 à 16:21, I. Savant a écrit :
On Aug 20, 2009, at 9:37 AM, Jean-Daniel Dupas wrote:
I managed to find a issue when you don't bind the window outlet and
try to call [self window] in awakeFromNib.
Instead of returning nil, it try to load the nib again, falls in a
infinite recu
On Aug 20, 2009, at 9:37 AM, Jean-Daniel Dupas wrote:
I managed to find a issue when you don't bind the window outlet and
try to call [self window] in awakeFromNib.
Instead of returning nil, it try to load the nib again, falls in a
infinite recursive loop and crash when the stack is full. Tha
Le 20 août 2009 à 13:55, I. Savant a écrit :
On Aug 20, 2009, at 3:41 AM, Jean-Daniel Dupas wrote:
The -[NSWindowController loadWindow] methods says you can call -
[NSWindowController window] to load the window, so I don't think it
should be an issue..
Just a point, I think that in NSWind
On Aug 20, 2009, at 3:41 AM, Jean-Daniel Dupas wrote:
The -[NSWindowController loadWindow] methods says you can call -
[NSWindowController window] to load the window, so I don't think it
should be an issue..
Just a point, I think that in NSWindowController it may be better to
initialize de
On Aug 19, 2009, at 10:13 PM, Todd Heberlein wrote:
or
-viewDidLoad
on the iPhone (?).
Sure. The OP mentioned NSImage and NSImageView (Mac), so I focused
on that. You're right, though. There, too. :-)
--
I.S.
___
Cocoa-dev mailin
Le 20 août 2009 à 01:13, I. Savant a écrit :
On Aug 19, 2009, at 6:49 PM, Jean-Daniel Dupas wrote:
You're probably calling setImage: before the nib is loaded (and so
the outlet is connected).
You can force it to load by calling [aWindowController window]
before trying to set the image.
The standard practice is to start any nib-dependent startup stuff
on -awakeFromNib ... forcing it to load seems dirty. :-)
or
-viewDidLoad
on the iPhone (?).
Todd
___
Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
Please do not post
As others have suggested ... the NIB had not been fully loaded and
ready for my changes. As a test, i modified the image view in
awakeFromNib and things worked marvelously.
Thank you for the help!
I knew it had to be something simple that i was missing.
Jack
On Aug 19, 2009, at 8:37 PM, Jo
Hey Jack -
That means that either the outlet isn't connected, or the NIB hasn't
been loaded yet when setImage: is called.
Also, are you sure you aren't creating more instances of your class
than you think you are? A common mistake is to instantiate the class
in code, and tell it to load a
What happens if you include this log to your setImage method?
NSLog(@"image view: %@", boxPic);
Also, rather than logging you should see if you can find the time to
learn to use the debugger. It's much more efficient than printf
debugging.
Good Luck -
Jon Hess
On Aug 19, 2009, at 2:31 PM,
On Aug 19, 2009, at 6:49 PM, Jean-Daniel Dupas wrote:
You're probably calling setImage: before the nib is loaded (and so
the outlet is connected).
You can force it to load by calling [aWindowController window]
before trying to set the image.
The standard practice is to start any nib-depen
You're probably calling setImage: before the nib is loaded (and so the
outlet is connected).
You can force it to load by calling [aWindowController window] before
trying to set the image.
Le 20 août 2009 à 00:39, Jack Carbaugh a écrit :
You are correct. Logging of boxPic is indeed null.
Ho
You are correct. Logging of boxPic is indeed null.
How do i proceed then?
here is a snippet of the code ...
aWindowController *theWindowController = [[aWindowController alloc]
initWithMyName:[who name]];
// snip several assignments to theWindowController
if ( [[who serverItems] objectForKe
On Aug 19, 2009, at 14:31, Jack Carbaugh wrote:
100% certain it is connected in the xib.
That's not proof it's connected (yet) at the time 'setImage:' is
invoked. Log the value of 'boxPic' too, and I bet it will be nil.
___
Cocoa-dev mailing li
100% certain it is connected in the xib.
On Aug 19, 2009, at 5:19 PM, Dave DeLong wrote:
Are you sure the outlet hasn't gotten disconnected? Or maybe you
connected it, then changed the name of the outlet in Xcode? That's
the output you would see if the outlet were null.
Dave
On Aug 19,
Are you sure the outlet hasn't gotten disconnected? Or maybe you
connected it, then changed the name of the outlet in Xcode? That's
the output you would see if the outlet were null.
Dave
On Aug 19, 2009, at 3:15 PM, Jack Carbaugh wrote:
I am simply trying to set an NSImageView to an NSIma
I am simply trying to set an NSImageView to an NSImage. I'm certain
i'm doing the right methods, but alas, no images show.
Suggestions ?
Thanks in advance.
jack
boxPic is an IBOutlet connected to the NSImageView in the NIB.
-(void)setImage:(NSImage *)newImage;
{
NSLog(@"Incoming image: %
30 matches
Mail list logo