Sign In/My Account | View Cart  

advertisement

AddThis Social Bookmark Button

Article:
  BYOB: Build Your Own Browser, Part 3
Subject:   re: Not so good...
Date:   2004-06-07 07:59:29
From:   aaanderson
Response to: Not so good...

sorry about missing the preference window hook up, it was a paragraph that fell out while editing it on my side. I will get the editors to put the paragraph in as soon as possible.


what did you need to comment out in awakefromnib to get it working ? this error seems strange since the code comes from a perfectly working version that I built. Not having an import statement for MyDocument.h would force the compile to fail, but that is in the code in the article. Can you post the errors that you are getting ?


ignoreContent wasn't just as you say "thrown in". it was a way to demonstrate the policy delegate, within the confines of an article of resonable length. as for the issue with the two variables named "ignoreContent", they are in two different objects; one is in Controller the other is in MyDocument so there will be no collision problems.


andrew


Full Threads Oldest First

Showing messages 1 through 7 of 7.

  • re: Not so good...
    2004-06-07 18:48:29  johnts [View]

    Well I played around with it, and put a new text box in the preference window for the ignore content items. I also hooked up the Preferences menu item to show the window.

    The only thing that doesn't happen is the ignore content preference isn't saved. Quitting and restarting the app and the ignore content pref goes back to the default.
    • re: Not so good...
      2004-06-07 19:50:11  Andrew Anderson | [View]

      That section was intentionally left as to the reader to implement. It's verystraightforward if you follow the example for the default homepage

      andrew
      • Problem Closing Windows
        2005-08-01 09:06:13  Roalkl [View]

        Ok, so I know that this article has been out there for some time, but I was wondering if I could get some help with a problem I have had. Everything I have seems to work ok, but when a javascript opened window is closed, my program bombs out.

        I have been checking a few places, but thought that as others may have this problem, this would ve the best place to start.

        Thanks in advance.
      • re: Not so good...
        2004-06-07 22:01:47  johnts [View]

        Isn't that what this bit does?


        NSString* iContent = [ignoreContent stringValue];
        [defaults setObject:iContent forKey:@"ignoreContent"];
        [md setIgnoreContent:iContent];
        • re: Not so good...
          2004-06-08 05:17:58  Andrew Anderson | [View]

          This part is in the "apply" method and sets the value into the static variable and handles saving the values to the user defaults, but does not handle loading it.

          Look in Controller's "awakeFromNib" method, which handles loading the values for the defaultHomepage.
          • re: Not so good...
            2004-06-08 20:39:53  johnts [View]

            Ah ha! I knew I was overlooking something simple.

            Thanks!
  • re: Not so good...
    2004-06-07 18:28:11  johnts [View]

    I had to comment out everything that had to do with setting and getting the ignorecontent preferences:

    in the @interface section


    IBOutlet id ignoreContent;


    
    NSString* iContent = [ignoreContent stringValue];
    [defaults setObject:iContent forKey:@"ignoreContent"];
    [md setIgnoreContent:iContent];

    and

    [ignoreContent setStringValue:[md getIgnoreContent]];


    By "thrown in" I meant as I was typing in the apply: method (yeah, I typed it in, not copy and paste, figure I'd remember it better), I saw those lines and thought I had missed something.