cryingraven
Registered
Hi all
My problem is using the textview's string as an NSString...
What I want to do, is to trim leading and trailing whitespace from the text entered into 3 or 4 TextView elements then combine them using a separator character and place it into yet another TextView.
I have created my interface and created my classes and setup the button to call a function, but once in the function I have tried everything I could think of to access the string value and when I DO finally get to access the string value, I immediately print it to the other textview, just to see if it works.
If I send the value @"myString", then the TextView displays the word myString as expected. This means my code works. So I then replace it with myString (which is an NSMutableString or an NSString. Like I said, I tried every combination I could think of) I get weird characters like hearts and § sybols.
E.g. an example output: The value of myString is ±§&$ and is what I wanted
How do I trim/ add a character/ attach 4 TextView's String value to assign it back to another TextView?
Do I simply trim 1, trim 2, trim 3, trim 4, add " " to 1, add " " t0 2, add " " to 3, copy 1 to 5, append 2 to 5, append 3 to 5, append 4 to 5?
Do I have to send values from textview to textview only?
This would leave me with the problem of textviews 1, 2 and 3 having a space behind what the user entered so if the user wants to change the value, he first needs to delete my space before changing his text.
Not acceptable.
Is there no way of actually using the string values into a separately defined string and sending that value to the textview after all formatting has been completed?
Please say yes...
Then please tell me how...
I ask of you, oh so nicely... Please!
Been struggling with this for ages now!
My lack of string manipulation skills is what has put me off of using XCODE altogether. I love coding and have written a grand total of 0 apps since I got my first Mac 4 years ago...
You have to power to remedy this for me...
My problem is using the textview's string as an NSString...
What I want to do, is to trim leading and trailing whitespace from the text entered into 3 or 4 TextView elements then combine them using a separator character and place it into yet another TextView.
I have created my interface and created my classes and setup the button to call a function, but once in the function I have tried everything I could think of to access the string value and when I DO finally get to access the string value, I immediately print it to the other textview, just to see if it works.
If I send the value @"myString", then the TextView displays the word myString as expected. This means my code works. So I then replace it with myString (which is an NSMutableString or an NSString. Like I said, I tried every combination I could think of) I get weird characters like hearts and § sybols.
E.g. an example output: The value of myString is ±§&$ and is what I wanted
How do I trim/ add a character/ attach 4 TextView's String value to assign it back to another TextView?
Do I simply trim 1, trim 2, trim 3, trim 4, add " " to 1, add " " t0 2, add " " to 3, copy 1 to 5, append 2 to 5, append 3 to 5, append 4 to 5?
Do I have to send values from textview to textview only?
This would leave me with the problem of textviews 1, 2 and 3 having a space behind what the user entered so if the user wants to change the value, he first needs to delete my space before changing his text.
Not acceptable.
Is there no way of actually using the string values into a separately defined string and sending that value to the textview after all formatting has been completed?
Please say yes...
Then please tell me how...
I ask of you, oh so nicely... Please!
Been struggling with this for ages now!
My lack of string manipulation skills is what has put me off of using XCODE altogether. I love coding and have written a grand total of 0 apps since I got my first Mac 4 years ago...
You have to power to remedy this for me...