Difference between revisions of "Snippets"

From GNUstepWiki
Jump to navigation Jump to search
 
(Redirect to category)
 
(11 intermediate revisions by 3 users not shown)
Line 1: Line 1:
== Testing ''chars'' entered by users in ''NSTextField'' ==
+
{{category redirect|Snippets}}
(just for the case if someone else has the same problem)
 
 
 
1. Subclass NSTextField
 
 
 
2. In your subclass adopt the
 
        - (BOOL) textView: (NSTextView*) textView
 
        shouldChangeTextInRange: (NSRange) range
 
        replacementString: (NSString*) replacementString
 
method.
 
 
 
3. In this method you can access to the ''replacementString'' as ''char'' with the following line:
 
        char c = *([replacementString cString) + 0]; 
 
 
 
4. Then you are free to examinate the conditions...
 
 
 
--[[User:Andras|Andras]] 13:17, 26 Jun 2005 (CEST)
 

Latest revision as of 09:54, 4 January 2007

This page is being or has been relocated.

The contents are now (or should soon be) located at Category:Snippets.