On Saturday, April 13, 2013 10:32:15 AM UTC-5, Newbee wrote:
>
> Oh thanks Vinny, i was actually trying
> Text t3 = t1.getValue()+t2.getValue(); and it was asking me to change the
> type of t3 to String.
> Text t3 = new Text(t1.getValue()+t2.getValue()); worked for me.Just a
> stupid mistake.Thanks a lot.
>
No problem! Com.google.appengine.api.datastore.Text objects can be
confusing to new GAE users, especially since all the other Java datastore
functions use well-known types such as String, Date, etc.
On Saturday, April 13, 2013 11:01:47 AM UTC-5, Newbee wrote:
>
>
> I still have one question.If i want to split a Text how can i do that
> because it is saying "The method split() is undefined for the type Text".
>
Text doesn't subclass String, so you can't use it directly. You have to use
something similar to this (assuming *text_obj* is a
com.google.appengine.api.datastore.Text object):
String[] components = text_obj.getValue().split("text that you want to
split by");
-----------------
-Vinny P
Technology & Media Advisor
Chicago, IL
@GOV on AppDotNet: https://alpha.app.net/gov
--
You received this message because you are subscribed to the Google Groups
"Google App Engine" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/google-appengine?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.