[kepler-dev] Re: [Ptolemy] New copy bug

Edward A Lee eal at eecs.berkeley.edu
Tue Jun 8 09:46:34 PDT 2004

This null pointer exception was my fault... should be fixed now if
you do an update again...


At 08:50 AM 6/8/2004 -0700, Dan Higgins wrote:
>    The Mac corrections seem to work OK!  [I do get an error the first 
> time I try to open the 'TimedSources' or 'SequenceSources' directories in 
> the Actors tree, but this occurs on both the Mac and the PC (e.g. I get a 
> null pointer exception in trying to load the Sinewave actor)]
>Stephen Andrew Neuendorffer wrote:
>>OK, I think I see what the difficulty is here.
>>The problem is that drag and drop apparently resets the keyboard focus.
>>Before my Mac changes, mouse events were always passed to
>>the base class, which would result in the keyboard focus getting set 
>>However, on the Mac, setting the keyboard focus also clears the context menu,
>>so I modified the diva base classes to only pass the event to the base class
>>if it was not marked as consumed (for example, selecting a figure 
>>consumes the event).
>>However, now this prevents selections from getting around to setting the 
>>mouse focus.
>>I've now backed out some of my MAc fixes and tried a different way of 
>>implementing that
>>will hopefully work, by putting the code that gets the keyboard focus 
>>earlier in the event processing
>>before the context menus... This should still work for Mac.
>>Dan or Chad: Can you verify that the Mac side still works?
>>particularly context menus and keyboard
>>shortcuts immediately after dropping an actor.
>>I hate debugging without test suites.
>>At 09:09 AM 6/7/2004, you wrote:
>>>We have a serious new bug with the UI.
>>>When I place a Sinewave actor into an empty model,
>>>select it, hit control-C (or Edit-->Copy), and then paste,
>>>nothing is pasted.  If I paste into a text window, what
>>>is pasted is the result of toString() on the Sinewave actor.
>>>The debugger tells me that, in fact,
>>>BasicGraphFrame.CopyAction.actionPerformed() is not
>>>called, so the bug is before this in the event handling chain.
>>>Perhaps the changes to diva to support the MAC caused this?
>>>Strangely, after I paste into a text editor, then
>>>I can copy and paste normally, and everything works.
>>>Until I drag in a new Sinewave actor...
>>>Edward A. Lee, Professor
>>>518 Cory Hall, UC Berkeley, Berkeley, CA 94720
>>>phone: 510-642-0455, fax: 510-642-2739
>>>eal at eecs.Berkeley.EDU, http://ptolemy.eecs.berkeley.edu/~eal
>>>Ptolemy maillist  -  Ptolemy at chess.eecs.berkeley.edu
>>kepler-dev mailing list
>>kepler-dev at ecoinformatics.org
>Dan Higgins                                  higgins at nceas.ucsb.edu
>http://www.nceas.ucsb.edu/    Ph: 805-892-2531
>National Center for Ecological Analysis and Synthesis (NCEAS) 735 State 
>Street - Room 205
>Santa Barbara, CA 93195

Edward A. Lee, Professor
518 Cory Hall, UC Berkeley, Berkeley, CA 94720
phone: 510-642-0455, fax: 510-642-2739
eal at eecs.Berkeley.EDU, http://ptolemy.eecs.berkeley.edu/~eal

More information about the Kepler-dev mailing list