[Openmcl-devel] I need Cocoa graphics help

Paul Krueger plkrueger at comcast.net
Mon Jul 19 06:06:18 PDT 2010


Arthur,

I suspect you have a memory management problem, but I'm not sure I can immediately help you too much without more to go on. 

My first suggestion might be to use Cocoa Objective-C methods (#/...) and classes rather than the C interface (#_ ...) to core graphics. Both should work correctly, but I think there may be somewhat better safeguards when using the Cocoa Objective-C wrapper classes. They take care of making sure that all references remain valid. 

I've done quite a bit of work similar to the Hillegass book in my contrib directory .../ccl/contrib/krueger/InterfaceProjects/... and have a tutorial there that can get you started with Objective-C interfaces if that is new to you. I have not yet done a graphics window such as he has in Chapters 31/32, but don't think it should be terribly difficult. Perhaps I'll take a crack at it in the next few days to see what turns up.

Paul

On Jul 19, 2010, at 5:52 AM, Arthur Cater wrote:

> I have just submitted a ticket saying:
> The link to ffigen-bin-darwinppc-gcc-4.0.0-2005-5-17-11-45-56.tar.gz
> is an alias whose file has vanished.
> 
> 
> 
> If it existed, is this what would be appropriate for my 32-bit OS X 10.5.8 with gcc 4.2?
> 
> Do I need it to be able to do things with Core Graphics? I suspect not, but I am having
> difficulties with drawing material into Core Animation layers, doing things inspired by
> Aaron Hillegass's book 'Cocoa Programming for Mac OS X' chapters 31 and 32, and
> also by Neil Baylis's contributed Core Animation Demo:
> 
> ... (#_CGContextStrokePath context) crashes my CCL, although prior uses of
>   (#_CGContextMoveToPoint content x1 y1) and (#_CGContextAddLineToPoint content x2 y2)
>   have completed   (whether successfully or not I cannot tell because I cannot see what is drawn)
> 
> ... (#_CGAffineTransformMake  ...) arguments are a mystery to me. I've tried six numbers, too
> few args it says; I've tried prefixing them with M11 M12 M21 M22 TX TY and then it says 12
> are too many.
> 
> ... The 'context' are got from (#/graphicsPort (#/currentContext ns:ns-graphics-context))
> shows as a "ns:ns-object (uninitialised)" - is this as it should be for an 'opaque data type'?
> 
> 
> Any assistance will be much appreciated.
> 
> Arthur
> _______________________________________________
> Openmcl-devel mailing list
> Openmcl-devel at clozure.com
> http://clozure.com/mailman/listinfo/openmcl-devel




More information about the Openmcl-devel mailing list