• 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
NSTextField setStringValue not updating properly
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

NSTextField setStringValue not updating properly


  • Subject: NSTextField setStringValue not updating properly
  • From: email@hidden
  • Date: Wed, 10 Dec 2008 11:31:44 -0500

Namaste!

I've written a simple interface for ICA as part of my application.

In that interface I have an NSTextField which holds a default path & filename.

Next to that field I have an NSButton for changing that information. It opens an NSSavePanel.

I also have a Preview button that grabs the image on the scanner bed. This process downloads the file to a temporary directory & filename.

I pass the resulting path and filename via an IBOutlet which is hooked to the text field. These values can originate from the scan preview operation, the user typing, or the change button operation.

The text field is not bound to any datasource.

It *appears* to work on the surface, athough sometimes not even then. This is confusing the heck out of me.

Anytime the value for the text field needs to change, I call [NSTextField setStringValue:(NSString *)aString].

After searching through the message archives, I either find bound fields or something else. The messages that address stuff close this stipulate using the above call.

I have also tried validateEditing and display, both to no avail. I can't seem to locate another viable method to get the data stored (like a "refresh").

What appears to happen (in terms as best I can describe it, not necessarily technically correct) is that the text is written to the control's view, but, isn't saved to the underlying data structure.

Thus, when I actually need the value later, I don't get what I see currently, but what was stored before. Hopefully that will make sense. In other words, it is as if there are two values: one for display, and one for data. They don't appear to get synched when I use setStringValue.

So, my question is, what do I need to do to get the value actually stored and not just displayed?

Thanks in advance!

Peace, Love, and Light,

/s/ Jon C. Munson II



_______________________________________________

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


  • Prev by Date: RE: how to pass arguments by reference
  • Next by Date: Re: Wake up Reason
  • Previous by thread: Re: Depressed, Etched Style For Toolbar?
  • Next by thread: [SOLVED] Re: NSTextField setStringValue not updating properly
  • Index(es):
    • Date
    • Thread