From: Wolfgang K. <wol...@xm...> - 2009-10-11 07:06:06
|
The only features a UIButton supports right now is creation, setting its title and to register an event handler. Especially all the color stuff you mentioned is currently not supported. What you saw in the Java version of UIButton (these methods based on java.awt.Color) are only used inside our Java emulator to create a UIAlertView with properly colored buttons. This Java implementation should be fixed as soon as we support color operations based in UIColor. And thanks for mentioning the UIButtonTest. Since this uses the java.awt.Color based methods it cannot be cross-compiled. I think we should remove that from the repository to avoid confusion. Coming to the String question. I lately noticed that the java_lang_String implementation is based on NSMutableString. This should be fixed since in Java strings are immutable. That's one thing I have on my list - but not with highest priority. -- Wolfgang Panayotis Katsaloulis wrote: > OK, now things start to get a bit dirty! > > The urge of this post was my effort to compile ibutton test (to do > some real work at last :P ) This demo does not compile, since > java.awt.Color is missing. > So, although methods in java.lang.Math seem to be straight forward how > to implement them ;-) , this gets a bit more complicated (since it > doesn't exist at all). > And it gets even more complicated if I had a look at "mixed" files, > such as UITextView and UIButton. > > I have to admit it, I am totally lost :) > > UITextField is pretty clear what it does, no surprises there. What is > on the java-side is also on the obj-c side. > > UIButton though is completely out of sync. Except the static method > which created the UIButton (which makes sense) and setTitle forState, > all other methods are missing! > Are missing methods actually methods *not* really allowed to be > executed in the obj-c environment (e.g. for emulation purposes?). Is > for example "setPressedBackgroundColor(Color)" one of them? > At the end of the day, is org_xmlvm_iphone_UIButton actually a UIButton? > > Let's go back to the original problem: > UILabel.setBackgroundColor wants a Color argument. Is this on purpose? > Isn't there a confusion whether UIColor or Color should be used? Can > this be solved? > What exactly should I do to implement the missing link? > > And a question out of curiosity: is java.lang.String a NSMutableString > after all? > > Too many questions, I know, but I's all new (and exciting) for me… and > I want to help :) > ------------------------------------------------------------------------------ > Come build with us! The BlackBerry(R) Developer Conference in SF, CA > is the only developer event you need to attend this year. Jumpstart your > developing skills, take BlackBerry mobile applications to market and stay > ahead of the curve. Join us from November 9 - 12, 2009. Register now! > http://p.sf.net/sfu/devconference > _______________________________________________ > xmlvm-users mailing list > xml...@li... > https://lists.sourceforge.net/lists/listinfo/xmlvm-users > |