[Openmcl-devel] ns-date issues

R. Matthew Emerson rme at clozure.com
Sat Jan 5 10:35:03 PST 2013


On Jan 5, 2013, at 1:25 PM, Paul Krueger <plkrueger at comcast.net> wrote:

> OK, so here's a transcript from the IDE listener before I've loaded anything whatsoever:
> 
> Welcome to Clozure Common Lisp Version 1.9-dev-r15559M-trunk  (DarwinX8664)!
> ? (#/date ns:ns-date)
> #<NS-DATE [uninitialized] (#x17D7D0)>
> ? (#/distantFuture ns:ns-date)
> #<A Foreign Pointer #x422D63C37F00000D>      <==== Not displayed as an ns-date object
> ? (#/distantPast ns:ns-date)
> #<A Foreign Pointer #xC22D63C8C500000D>
> ? (#/dateWithString: ns:ns-date (ccl::%make-nsstring "2001-03-24 10:45:32 +0600"))
> #<A Foreign Pointer #x415B177B0000000D>
> ? (#/date ns:ns-date)
> #<NS-DATE [uninitialized] (#x14BD60)>
> ? (make-instance ns:ns-date)
> #<NS-DATE [uninitialized] (#x2596E610)>
> ? 
> 
> I've tried other ns-date initializers with similar results. Most return pointers not recognized as ns-objects by CCL. A few, like
> the #/date class method return something that is recognized as an ns-date object. It is still the case that if one of the pointer objects is passed to a user interface object that expects an ns-date, it accepts it and displays it correctly. But if that field is editable, the thing passed back as the new value is one of these macptrs that ccl doesn't recognize as an ns-date object; so that's a problem.
> 
> I'm running on Mac OSX 10.8.2

Starting with Lion, Apple introduced tagged pointers for certain objects, such as NSNumber and NSDate.  What will they think of next?

The Objective-C bridge knows what to do with a tagged pointer representing an NSNumber, but it might need to learn about some of the other tagged pointer types.




More information about the Openmcl-devel mailing list