[Openmcl-devel] ns:ns-tracking-area not present in 32bit CCL

Ron Garret ron at awun.net
Mon Jun 8 17:44:32 PDT 2009


[This may be a repeat, but the original never showed up in my inbox.   
Also, there's an update at the end.]

On Jun 8, 2009, at 11:32 AM, Arthur W Cater wrote:

> Use #/addTrackingRect:owner:userData:assumeInside: with
> - the view
> - its #/bounds
> - a ns-object as target
> - ccl::+null-ptr+
> - #$NO
>
> Then
> (objc:define-objc-method ((:void :mouse-entered (:id event))  
> <theTargetClassYouUsed>) ...)
>
> likewise :mouse-exited and :mouse-move

Thanks!  Updated version enclosed. This has been tested in 32-bit CCL,  
and should now work on Tiger as well.

This version also fixes a bug whereby testviews did not get properly  
re-initialized to add a tracker when the class got redefined.  I was  
using an initialize-instance :after method when I should have been  
using shared initialize -- I think.  There is still a subtle bug which  
I can't figure out.  When you add a highlighted mixin to an existing  
testview instance, you have to click on it once before it starts to  
highlight itself.  I have no idea why this is happening.  I may not be  
using shared-initialize properly.  Maybe a CLOS wizard can help with  
some advice on the proper way to do this.

UPDATE: it turns out that the reason for this is that calling shared- 
initialize is done lazily.  So until there is an interaction with the  
updated object it doesn't get re-initialized, so add-tracker doesn't  
get called, so the event that would normally cause the interaction  
never gets received.  Makes an interesting little puzzle.

rg

-------------- next part --------------
A non-text attachment was scrubbed...
Name: draggable.lisp
Type: application/octet-stream
Size: 7981 bytes
Desc: not available
URL: <https://lists.clozure.com/pipermail/openmcl-devel/attachments/20090608/e296dd6c/attachment.obj>
-------------- next part --------------



More information about the Openmcl-devel mailing list