Super Deluxe with Checkboxes


Here I am again.
I finished the chapter but wanted to have the BigLetterView to set the checkboxes I have for bold, italics, dropshadow
based on the current NSView Selected.

I tried to Bind the values in BigLetterView values:mybold for example, but nothing gets updated.
in BigLetterView.h

@property (readwrite, assign) BOOL mybold,italics,dropShadow;

and added to BigLetterVew.m

[code]// binding elements //

  • (BOOL)mybold {
    return mybold;

return italics;

return dropShadow;
I think it is seeing it but not getting updated on the screen.

am I missing something?? where should I put the [self setNeedsDisplay:YES];

if it is that.


Do I have to make an appController?? but then how do I index this to the NSView currently in use/ blue fuzzy boxed ???

is there an easy way to get this to happen???



The saga continues.

Added a Objective-C class called globals. Which have bold, italic, dropshadow BOOL switches
I then KVC them binding them in Interface builder.
also added a textfield to check what the value being set to.
So When I manually change the Value. click on the checkmark or (apple-b)
It changes but

HOW do I get it to update when I switch NSViews???
any help/ hints would be muchly appreciated.



I rebuilt the interface in IB from the ground up.
and now it’s Different

Before the rebuild. When I selected a View I could change the bold, italics, dropshadows and I seem to remember saving PDFs as well
for the selected view. Now it only does one. Am I missing something. I tried to set all the Button/checkmarks and Save PDF in one view
and duplicate, but it doesn’t seem to retain the links. Could this have been a really useful bug???

What is the proper way to handle this??

  1. two BigLetterViews and one set of buttons/checkboxes to set the current view
  2. to change the Checkboxes based on flags set in the current view?



Approaching an answer:

Here’s how I solved this.

I created a global using. The Technique laid out by: … variables/

with that I wrote out the current Selected Views settings
then triggered by:

[NSNotificationCenter defaultCenter addObserver:self selector:@selector(viewDidChangeNotification:) name:@"NSWindowDidUpdateNotification" object:nil];

I then read the Settings and KVC (key-value-coding) (bound) Binding those to the Checkmarks.

Now I just need to Create a controller that will signal and set the values in the view.
This will more than likely entail a View Controller. sigh…

hope this helps someone …and any ideas or additions would be welcome…

ps. answer was easy-ish researching the answer HARD