mersenneforum.org  

Go Back   mersenneforum.org > Extra Stuff > Programming

Reply
 
Thread Tools
Old 2010-05-22, 03:09   #1
Prime95
P90 years forever!
 
Prime95's Avatar
 
Aug 2002
Yeehaw, FL

160708 Posts
Default Any Cocoa experts?

I have 2 problems that I cannot find an answer to quickly:

1) When I click on a text field and change the value and then click on the "OK" button, the changed value is ignored. The changed text is only registered if I tab out of the field. What have I done wrong?

2) Is there any way to get the Test/Status NSTextField to not highlight misspelled words like "Mersenne", "Lucas", and "Lehmer"?
Prime95 is offline   Reply With Quote
Old 2010-05-22, 13:28   #2
rogue
 
rogue's Avatar
 
"Mark"
Apr 2003
Between here and the

6,037 Posts
Default

For the button, does this help? http://osdir.com/ml/cocoa-dev/2010-04/msg00457.html

And for spelling, how about this? http://developer.apple.com/mac/libra...isspelledWords
rogue is offline   Reply With Quote
Old 2010-05-22, 21:07   #3
Prime95
P90 years forever!
 
Prime95's Avatar
 
Aug 2002
Yeehaw, FL

23×3×7×43 Posts
Default

Quote:
Originally Posted by rogue View Post
For the button, does this help?
Googling that method found the recommended procedure to use (makeFirstResponder). Thanks.

Quote:
And for spelling, how about this?
I'd seen that before. I think it is a dead end.

At least the more offensive of the two bugs is fixed.
Prime95 is offline   Reply With Quote
Old 2010-05-22, 22:35   #4
rogue
 
rogue's Avatar
 
"Mark"
Apr 2003
Between here and the

6,037 Posts
Default

I realized after I posted that NSTextField does not inherit from NSText, thus it probably works differently.

Would NSTextView work better for you than NSTextField? It inherits from NSText.

Something else I see is that NSTextField contains an NSTextView object. You can find that here: http://developer.apple.com/mac/libra...troAppKit.html, which you have probably already seen. In other words, if you access that NSTextView object of the NSTextField class then you should be able to add words to the ignore list as shown in the other link I provided.
rogue is offline   Reply With Quote
Old 2010-05-23, 00:51   #5
Prime95
P90 years forever!
 
Prime95's Avatar
 
Aug 2002
Yeehaw, FL

23×3×7×43 Posts
Default

I was hoping to just turn spell checking off rather than assembling a list of words to ignore.
Prime95 is offline   Reply With Quote
Old 2010-05-26, 00:57   #6
potonono
 
potonono's Avatar
 
Jun 2005
USA, IL

193 Posts
Default

This has a solution for turning it on, so perhaps you can set it to NO to turn it off.

http://stackoverflow.com/questions/2...ld-on-mac-os-x

Quote:
// Focus TextField
[textField becomeFirstResponder];

// Disable Continous Spelling
NSTextView *textView = (NSTextView *)[self.window firstResponder];
[textView setContinuousSpellCheckingEnabled:NO];
potonono is offline   Reply With Quote
Reply

Thread Tools


Similar Threads
Thread Thread Starter Forum Replies Last Post
Any ODBC experts here? xilman Programming 30 2011-08-16 06:47
Any Qt experts here? ET_ Programming 0 2011-08-15 10:52
Proxy server / apache experts? Prime95 Software 6 2002-10-02 16:24

All times are UTC. The time now is 16:43.

Wed Dec 2 16:43:45 UTC 2020 up 83 days, 13:54, 2 users, load averages: 2.32, 1.94, 1.73

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.

This forum has received and complied with 0 (zero) government requests for information.

Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.2 or any later version published by the Free Software Foundation.
A copy of the license is included in the FAQ.