[Openmcl-devel] Can anyone get mouse up events in the Windows/Cocotron version of ccl?

Gary Palter palter at clozure.com
Fri Sep 3 10:41:47 PDT 2010


Cocotron switched from svn to Mercurial several months ago.

  - Gary


On Sep 3, 2010, at 1:23 PM, Michael Minerva wrote:

> Hey Gary,
> 
> Thanks for your advice on this issue.  I tried replacing AppKit.1.0.dll and Foundation.1.0.dll from my objective C example with the same dlls from the version of cocotron I use with ccl and when I try and fire up the example it says my example has stopped working and freezes.  I wanted to just downgrade my version of cocotron for xcode to the current version ccl is using but the revisions do not matchup.  The newest revision of cocotron is 828 and the newest revision of the cocotron ccl bundle is 14231, do you know what revision of cocotron was used to make revision 14231?  
> 
> On Sep 2, 2010, at 6:58 PM, Gary Byers wrote:
> 
>> I was going to say that I couldn't reproduce it, but I realized that the Cocotron libraries that I was using were a little old.  I updated
>> my ccl/cocotron directory, rebuilt the IDE, tried your test, and got
>> the same results that you reported (nothing printed on mouseup.)  That
>> strongly suggests that there was a change in the Cocotron libraries between
>> whatever (possibly several months old) version I had installed on that
>> machine and the versions that we're distributing now.
>> 
>> I can't think of anything in CCL that'd affect this (and certainly can't
>> think of anything that'd do so intentionally.)
>> 
>> If you still have the application bundle built by XCode, you might try
>> replacing the AppKit and Foundation .dlls in that bundle with the ones
>> from ccl/cocotron.  If the ObjC application behaves the same way, then
>> we can definitely say that CCL isn't involved.
>> 
>> I don't know whether it'd be necessary to upgrade the Cocotron
>> libraries that we distribute or downgrade them in order to avoid the
>> problem; Gary Palter may have a better idea of that.
>> 
>> 
>> On Thu, 2 Sep 2010, Michael Minerva wrote:
>> 
>>> I have been unable to get mouse up events on the windows version of the ide, and I was wondering if anyone has found a workaround for this?  It seems that this is not a cocotron issue because I made a cocotron project that receives both mouse up and mouse down events with no problem using objective c.  The following code illustrates the problem pretty well.  In OSX the  code will display a window and when you click you get both mouse up and mouse down events (as well as drags if you drag), but on the windows/cocotron ide you only get the mouse down and drag events.  Has anyone else experienced this?  Anyone know what is going on here?
>>> 
>>> (defclass MOUSE-EVENT-WINDOW (ns:ns-window)
>>> ((lui-window :accessor lui-window :initarg :lui-window))
>>> (:metaclass ns:+ns-object))
>>> 
>>> (objc:defmethod (#/mouseUp: :void) ((Self mouse-event-window) Event)
>>> (call-next-method event)
>>> (print "mouseup!"))
>>> 
>>> (objc:defmethod (#/mouseDown: :void) ((Self mouse-event-window) Event)
>>> (call-next-method event)
>>> (print "mousedown!"))
>>> 
>>> (objc:defmethod (#/mouseDragged: :void) ((Self mouse-event-window) Event)
>>> (call-next-method event)
>>> (print "mouse dragged!"))
>>> 
>>> (defmacro IN-MAIN-THREAD (() &body body)
>>> (let ((thunk (gensym))
>>>      (done (gensym))
>>>      (result (gensym)))
>>>  `(let ((,done nil)
>>>         (,result nil))
>>>     (flet ((,thunk ()
>>>              (setq ,result (multiple-value-list (progn , at body))
>>>                    ,done t)))
>>>       (gui::execute-in-gui #',thunk)
>>>       (process-wait "Main thread" #'(lambda () ,done))
>>>       (values-list ,result)))))
>>> 
>>> (defun up-event-test ()
>>> (ns:with-ns-rect (Frame 50 50 500 500)
>>> (let ((window (make-instance 'mouse-event-window
>>>                               ;:lui-window self
>>>                :with-content-rect Frame
>>>                :style-mask #$NSTitledWindowMask
>>>                :backing #$NSBackingStoreBuffered
>>>                :defer #$YES
>>>                )))
>>>  (in-main-thread ()
>>>  (#/orderFront: window nil)))))
>>> 
>>> (up-event-test)
>>> _______________________________________________
>>> Openmcl-devel mailing list
>>> Openmcl-devel at clozure.com
>>> http://clozure.com/mailman/listinfo/openmcl-devel
>>> 
>>> 
>> 
> 
> _______________________________________________
> Openmcl-devel mailing list
> Openmcl-devel at clozure.com
> http://clozure.com/mailman/listinfo/openmcl-devel




More information about the Openmcl-devel mailing list