Re: cocoa and float-format
Gary Byers <[email protected]> Wed, 5 Feb 2003 17:38:54 -0700 (MST)
| Newsgroups | gmane.lisp.openmcl.bugs |
|---|---|
| Message-ID | <[email protected]> |
On Wed, 5 Feb 2003, Robert Sedgewick wrote: > Hi, > > It seems to me that on my machine (OSX), the cocoa > libraries do not load correctly if the > default-float-format has been set to double format. > > ie: > (setf *read-default-float-format* 'double-float) > (require 'cocoa) > > does not correctly launch the cocoa listener, but gets > stuck in some half-launched state. I guess this is > due to some float literals in the cocoa code? I'm a > lisp newby, so I'm not sure how this could be fixed. There are a few floating constants in the Cocoa example sources that are written without explicit exponent markers (e.g., as something like "0.0", instead of as "0.0f0" or "0.0d0"). The ones that may be causing the most difficulty are in the function GET-SIZE-FOR-TEXTVIEW, defined in "ccl:examples;cocoa-editor.lisp", where the constants 1.0 and 0.0 should have been written as "1.0f0" and "0.0f0", respectively. The variable *DEFAULT-FONT-SIZE* is initialized to 12.0; 12.0f0 would be more correct, but the value is explicitly coerced to SINGLE-FLOAT before being used. The code that's using these particular values is trying to determine the window size based on a font's bounding box; the foreign code that's actually going to uses the calculated window dimensions expects them to be expressed as SINGLE-FLOATs. > > Thanks, > Robbie > > btw I'm using version 0.13.4 > > __________________________________________________ > Do you Yahoo!? > Yahoo! Mail Plus - Powerful. Affordable. Sign up now. > http://mailplus.yahoo.com > > _______________________________________________ > bug-openmcl mailing list > [email protected] > http://clozure.com/cgi-bin/mailman/listinfo/bug-openmcl > >