>>I must be doing something dramatically wrong here, but how could the
>>following Java snippet
[quoted text clipped - 16 lines]
>
> patrick
Patrick, thank you for pointing that out. Trying to work through the
reams of documentation makes it very difficult at times.
One question I have to ask is, if something is deprecated, why do the
routines still compile? :-)
Thanks again for your patience and help.

Signature
-spiff
Never be bullied into silence. Never allow yourself to be made a victim.
Accept no one's definition of your life; define yourself.
Alwyn - 24 Feb 2005 07:04 GMT
> One question I have to ask is, if something is deprecated, why do the
> routines still compile? :-)
Well, 'deprecation' has a strange meaning in computing. In ordinary
parlance, if you deprecate something, you don't approve of it. In
computing parlance, it means that it is still supported, but its use is
discouraged, and it is not guaranteed to be supported in future.
Suppose you wrote:
NSTimeZone myTimeZone = NSTimeZone.defaultTimeZone();
will that solve your problem?
Alwyn
>>I must be doing something dramatically wrong here, but how could the
>>following Java snippet
[quoted text clipped - 16 lines]
>
> patrick
I hate to follow-up my own post, but I realized that if the NSTimeZone
is deprecated, then how do you use the NSGregorianDate class?
public NSGregorianDate(int year, int month, int day, int hour, int
minute, int second, NSTimeZone aTimeZone)
I assume you would use one of the other constructors, e.g.
public NSGregorianDate(double seconds)
Nu?

Signature
-spiff
Never be bullied into silence. Never allow yourself to be made a victim.
Accept no one's definition of your life; define yourself.
Patrick Machielse - 24 Feb 2005 10:00 GMT
> > It's all in the _documentation_:
> >
[quoted text clipped - 8 lines]
> public NSGregorianDate(int year, int month, int day, int hour, int
> minute, int second, NSTimeZone aTimeZone)
The above comment in the documentation says: don't use this constructor.
You _can_ use the class, but you must to use some other method to obtain
an instance of it. (Someone else pointed out how to call the static
method)
Generally when some method is declared 'deprecated' in Java, it means
that it has been superseeded by a better implementation, and has been
marked for removal in some future version of Java. Normally deprecated
methods still work, but the java compiler will draw your attention to
the fact that you are using old API (I believe this is the default
setting, if not: make it so).
In this case, Apple seems to have taken the concept a bit further than
Sun usually does: they have actively disabled the deprecated constructor
by returning a null value, thus forcing you to use the new API (and
breaking old binaries?)
Note: when I said 'it is all in the documentation' I spoke too soon. The
documentation of NSGregorianDate constructors happily shows an example
using new NSTimeZone()... I see now how you can get confused! A bug
report on the documentation seems to be in order.
patrick