-2

if your app use this solution , do do you plan port the app to other platform ? for example, iPhone app --> Android or Backberry.

I do not want user it , but some code is exist ...

Peter Hosey
  • 95,783
  • 15
  • 211
  • 370
iXcoder
  • 1,564
  • 4
  • 20
  • 41

2 Answers2

1

Any Cocoa code is not going to be easily portable to Android or Blackberry, regardless of whether or not you use KVC or KVO, since Objective-C doesn't exist on those platforms. If you want a cross-platform app, your best bet is to write basic underlying code (such as data models) in C or C++ and write the GUI in Cocoa.

shosti
  • 7,332
  • 4
  • 37
  • 42
  • hi, no, I meaning is that KVC/KVO is not exist in Java ... I know Object c is different to other language, but that most is the same theory, obviously, KVC/KVO does not exist in java ... if a app framework does not use KVC/KVO or other special mechanism , then I think that I just need translate the object c to other language with the same algorithm ... – iXcoder Apr 12 '10 at 09:49
  • 1
    Oh, I see what you mean. It's true that KVO has no real equivalent in Java, although KVC does--see [http://stackoverflow.com/questions/1604141/key-value-coding-for-java]. In general, there a quite a few fundamental Objective-C concepts and patterns that don't have direct equivalents in Java (and vice versa), such as delegation, target/action, etc. – shosti Apr 13 '10 at 03:02
0

I have used both KVC (key value coding) and KVO (key value observing) in applications in the past and find it to be a very useful feature of cocoa (and cocoa touch). It does create some challenges for porting, however I do not have any plans to port to Blackberry or Android at the moment.

Kevin Sylvestre
  • 37,288
  • 33
  • 152
  • 232