From: Arno P. <ar...@pu...> - 2010-03-06 17:18:25
|
thanks for the comments, Alex. You are right that there are some differences in the semantics. This is not done of purpose, but rather an oversight. I agree with you that the Objective-C version should behave identical to the Java version. In your example of Integer.parseInt(), we should through an exception when we encounter an error. This is one of those many cleanup things that hopefully will get done eventually. Arno On 3/6/10 4:14 AM, Dr. Alexander K. Seewald wrote: > Just to summarize some answers to questions posed by several > people recently. > > Yes, it is possible to use xmlvm to port Android apps, and it's > working really well. The speed is comparable to the Android for > complex math operations. The internal user interface classes are > very similar between iPhone and Android, so it is relatively easy to > interface what is there - e.g. I did two types of ProgressDialogs in > about two days, java.net.URL in half a day and so on. You need to know > objC, of course. > > Currently when your target is to convert the Android code with as > little changes as possible, you'd have to make a private branch of > xmlvm... there are so many things which can be solved ad-hoc, and > they won't get into the main branch (e.g. UI size tunings etc..) > without more effort. That said, I see rapid progress on this so > perhaps there will be a day when you can really put in an Android > app and have it recompile without too much hassle. ;-) > > There are two causes of bugs which I'd like to mention specifically. > > Don't compile for any iPhone OS below 2.2.1! It will work on the emulator > but will give wrong numbers on the device. There must be a bug in there > somewhere... > > The exception handling is different. When the Java code would give an > Exception and fail, the objectiveC code will usually still output > something. Especially the functions which have been mapped > one-by-one behave slightly differently in the error case. E.g. > Integer.parseInt() parses the initial numbers of an argument which > begins with a number (or even with a non-number, in which case it > returns 0) while the java original would throw an Exception. This is > a minor problem, but make sure to test your error handling! > > > Best, > Alex |