I have placed it change event under TextField1
if (TextField1.rawValue="We")
TextField2.rawValue = "are";
else if (TextField1.rawValue="I")
TextField2.rawValue = "am";
When I type "I'' in TextField1, TextField2 always shows are.
What is the correct code and where should I place?
Solved! Go to Solution.
Views
Replies
Total Likes
Yes, there is a assignment error you are not taken care off.
if (TextField1.rawValue="We") -------> here you are actually assigning the value "We" to text field
TextField2.rawValue = "are";
else if (TextField1.rawValue="I")
TextField2.rawValue = "am";
use this code, it works
if (TextField1.rawValue == "We") -------> use comparision operator NOT assignment operator,
TextField2.rawValue = "are";
else if (TextField1.rawValue == "I")
TextField2.rawValue = "am";
try this.
thanks,
Rajesh
Views
Replies
Total Likes
Yes, there is a assignment error you are not taken care off.
if (TextField1.rawValue="We") -------> here you are actually assigning the value "We" to text field
TextField2.rawValue = "are";
else if (TextField1.rawValue="I")
TextField2.rawValue = "am";
use this code, it works
if (TextField1.rawValue == "We") -------> use comparision operator NOT assignment operator,
TextField2.rawValue = "are";
else if (TextField1.rawValue == "I")
TextField2.rawValue = "am";
try this.
thanks,
Rajesh
Views
Replies
Total Likes
Thanks a lot.
Views
Replies
Total Likes
Views
Likes
Replies
Views
Likes
Replies