Cocoa WebKit Editing

  • Hello Everyone,

    I was wondering if there were any good examples of how to enable
    editing inside a WebView? I have looked in the Developer/Examples
    folder on my local machine and it seems that Blot is a pretty good
    example. But when I add an Outlet to MyDocument and connect it to the
    appropriate WebView, and setEditable in the - (id)init, it doesn't
    seem to set the editing feature. Am I doing something incorrectly? or
    should I create a controller and setEditable in - (void)awakeFromNib?

    If anyone can provide step by step instructions or a PDF, or other
    resource I can read I would greatly appreciate it.

    Rick Langschultz
  • Hi, Rick,

    I may be overlooking something else, but you'll probably want to use -
    setEditable: in -awakeFromNib, rather than -init.  Until -
    awakeFromNib, you have no guarantee that the object has been
    unarchived yet from the nib.

    Cheers,
        Andrew

    On Sep 11, 2007, at 3:24 PM, Rick Langschultz wrote:

    > Hello Everyone,
    >
    > I was wondering if there were any good examples of how to enable
    > editing inside a WebView? I have looked in the Developer/Examples
    > folder on my local machine and it seems that Blot is a pretty good
    > example. But when I add an Outlet to MyDocument and connect it to
    > the appropriate WebView, and setEditable in the - (id)init, it
    > doesn't seem to set the editing feature. Am I doing something
    > incorrectly? or should I create a controller and setEditable in -
    > (void)awakeFromNib?
    >
    > If anyone can provide step by step instructions or a PDF, or other
    > resource I can read I would greatly appreciate it.
    >
    > Rick Langschultz
  • Here is some sample code:

    @implementation MYApplicationController
    - (void)awakeFromNib {
    [documentView setEditable:YES];
    }

    I don't see a reason why this is a problem. documentView is connected
    to a WebView. I will read some more documentation, and peer over some
    more code.
    Thanks for the reply.

    On Sep 11, 2007, at 6:30 PM, Andrew Merenbach wrote:

    > Hi, Rick,
    >
    > I may be overlooking something else, but you'll probably want to
    > use -setEditable: in -awakeFromNib, rather than -init.  Until -
    > awakeFromNib, you have no guarantee that the object has been
    > unarchived yet from the nib.
    >
    > Cheers,
    > Andrew
    >
    > On Sep 11, 2007, at 3:24 PM, Rick Langschultz wrote:
    >
    >> Hello Everyone,
    >>
    >> I was wondering if there were any good examples of how to enable
    >> editing inside a WebView? I have looked in the Developer/Examples
    >> folder on my local machine and it seems that Blot is a pretty good
    >> example. But when I add an Outlet to MyDocument and connect it to
    >> the appropriate WebView, and setEditable in the - (id)init, it
    >> doesn't seem to set the editing feature. Am I doing something
    >> incorrectly? or should I create a controller and setEditable in -
    >> (void)awakeFromNib?
    >>
    >> If anyone can provide step by step instructions or a PDF, or other
    >> resource I can read I would greatly appreciate it.
    >>
    >> Rick Langschultz
    >
previous month september 2007 next month
MTWTFSS
          1 2
3 4 5 6 7 8 9
10 11 12 13 14 15 16
17 18 19 20 21 22 23
24 25 26 27 28 29 30
Go to today