about Galaxy

Trevor DeVore lists at mangomultimedia.com
Tue Sep 26 12:50:35 EDT 2006


On Sep 26, 2006, at 9:12 AM, Dan Shafer wrote:

> I think -- but I'm not 100% certain -- that the command key problem  
> is not
> unique to Rev. That or my system is really hosed. I see cmd-C and  
> cmd-V
> problems in Mail, Safari and Firefox from time to time. Restarting  
> my system
> always fixes the problem.

Dan,

The problem I experience with shortcut keys that stop working is  
unique to Rev.  At first I thought maybe it was related to Edit menu  
getting out of synch with the current state (e.g. whether or not  
there was a selectedField).  But recently I've come across something  
that makes me think otherwise.

In two different apps I'm working on I experienced loss of  
functionality in my shortcut keys.  It turns out that rawKeyDown just  
stopped being sent to my stack.  The only way to get rawKeyDown  
messages back was to click on a object that could become the  
focusedObject.  Once I did that, rawKeyDown was received again and  
shortcut keys worked.

Both of my apps share something in common - when the user double- 
clicks on a field with locked text in a scrolling group I create a an  
editable field in the group that allows text entry.  I then insert a  
frontscript which will save the contents and delete the editable  
field.  As soon as this editable field was deleted the rawKeyDown  
messages stopped being sent.  By focusing on an object in the handler  
that deleted the editable field I was able to fix the problem.

I'm still investigating what is going on and trying to reproduce this  
in a simple example stack but haven't been able to yet.  What I've  
found out so far is that right after I delete the editable field,  
focusedObject returns the card id.  Using a monitoring handler, I  
noticed that focusedObject starts returning empty shortly  
thereafter.  This is when rawKeyDown stops working.  The docs say  
focusedObject should return the current card if no object is selected.

So perhaps this odd behavior is related to the one that is causing  
problems for the Rev IDE.  If so, it would explain why they are  
having such a hard time reproducing as it could be related to what  
stacks people are working on.  I don't know.  Hopefully this will  
help shed some light on the subject though.


-- 
Trevor DeVore
Blue Mango Learning Systems - www.bluemangolearning.com
trevor at bluemangolearning.com





More information about the use-livecode mailing list