Assuming that your properties are all IBOutlets
, then the best guess is that the setters are being called during XIB loading and display
is set in between program
and graphic
being set.
That is, as the XIB is unarchived, the setters are being called as the objects are reconstituted. The order is undefined.
(This amused me; I ran into the same confusion when I was first learning about NIB loading ~23 years ago. BTW: Ya'll can get off my lawn.)
Given that those are outlets, there is no need to call setNeedsDisplay
. In fact, you shouldn't override the setters at all.
Also, class names always start with a capital letter.