6

Looks like apple has deprecated an api my app is using. Not sure how to work around this. The specific usage can be seen here:

http://code.google.com/p/jarzilla/source/browse/trunk/jarzilla/src/main/java/com/googlecode/jarzilla/Jarzilla.java#192

depsypher
  • 1,084
  • 11
  • 20
  • Usually when some API is deprecated, its documentation should suggest a replacement. (I do know nothing about Mac-specifics APIs, so I can't really help here.) – Paŭlo Ebermann Feb 26 '11 at 22:29
  • got it thanks. here's the diff that seems to still work for me: [link](http://code.google.com/p/jarzilla/source/diff?spec=svn31&r=31&format=side&path=/trunk/jarzilla/src/main/java/com/googlecode/jarzilla/Jarzilla.java&old_path=/trunk/jarzilla/src/main/java/com/googlecode/jarzilla/Jarzilla.java&old=30) – depsypher Feb 26 '11 at 23:12

1 Answers1

8

OK, a bit of googling got me the API doc (second hit for me), and it contains right in the first sentence:

Deprecated. replaced by AboutHandler, PreferencesHandler, AppReOpenedListener, OpenFilesHandler, PrintFilesHandler, QuitHandler, QuitResponse.

(with links to the interfaces and class in mentioned).

So it looks like you should not use one object subclassing this abstract class, but several objects for the different purposes, and register them each with your Application object.

Pang
  • 9,564
  • 146
  • 81
  • 122
Paŭlo Ebermann
  • 73,284
  • 20
  • 146
  • 210
  • You don't need to use multiple objects: you can implement all the interfaces in a single class. – Pont May 01 '17 at 19:36
  • @Pont the point of the "Adapter" classes was that they had empty implementation for all the methods, and allowed you to override just the ones which were needed. This doesn't work with interfaces (at least did not work at the time I answered that, now we have default methods in interfaces). – Paŭlo Ebermann May 02 '17 at 16:28
  • True, with the new interface approach you get coarser granularity: you have to implement all or none of each interface, rather than cherry-picking methods. But this doesn't alter my point, which is that you don't need "several objects for the different purposes", as you wrote: you can use a single object which implements all the relevant interfaces. – Pont May 07 '17 at 07:58