• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Notifying that a TextView's content has been changed?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Notifying that a TextView's content has been changed?


  • Subject: Re: Notifying that a TextView's content has been changed?
  • From: chaitanya pandit <email@hidden>
  • Date: Sat, 15 Nov 2008 01:52:43 +0530

Try posting a NSTextDidChangeNotification with your text view as the object, after you do setString:

On 15-Nov-08, at 1:23 AM, Jean-Nicolas Jolivet wrote:

I have a TextView set up so its data is bound to my User Defaults controller so that its content is saved when I press a button...

If I enter some text manually and click on my "Save" button (the one that saves the preference) everything goes well, however, if I set some text to my TextView programatically, via its outlet like this:

[myTextView setString:@"Some text"];

and then click save... the User Default are not saved...

somehow it seems that the text view isn't "aware" that its content has changed because, if I set its text programatically, and then actually go in the text view and insert some more text THEN click save, it works...

It only fails when the textview's content has been set programatically only but not been touched by the user...

Any help would be appreciated....


Jean-Nicolas Jolivet email@hidden http://www.silverscripting.com

_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden

_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Follow-Ups:
    • Re: Notifying that a TextView's content has been changed?
      • From: Jean-Nicolas Jolivet <email@hidden>
    • Re: Notifying that a TextView's content has been changed?
      • From: Douglas Davidson <email@hidden>
References: 
 >Notifying that a TextView's content has been changed? (From: Jean-Nicolas Jolivet <email@hidden>)

  • Prev by Date: Re: How do you get the OS X version number in C or C++?
  • Next by Date: Re: How do you get the OS X version number in C or C++?
  • Previous by thread: Notifying that a TextView's content has been changed?
  • Next by thread: Re: Notifying that a TextView's content has been changed?
  • Index(es):
    • Date
    • Thread