return in field activates default button

Ken Ray kray at sonsothunder.com
Sun Jul 29 11:49:24 CDT 2007


On Sat, 28 Jul 2007 12:48:52 +0200, Klaus Major wrote:
>> Anyway, at least it's been found. Klaus do you want to do the honors
>> and log the bug? Or would you like me to do that?
> 
> Yes, please, I'm just too humble ;-)

Actually it turns out that there are other times when the defaultButton 
doesn't return the proper data, and was already bugged as Bug #5185 by 
Mark Schonewille, and acknowledged by Oliver Kenyon. So it's on the 
list...

:-)

In the meantime, here's the code I've used and it seems to be OK so far 
- perhaps it needs to be adjusted for inclusion in the MC IDE:

function doClick
  switch
  case word 1 of the name of the target is "button" and the style of 
the target is not "menu" and not the autoArm of the target
    click at the loc of the target
    break
  case the defaultButton of this card is not empty
    if (the vScrollbar of the target is true) or (the formattedHeight 
of the target < the height of the target) then
      return false
    else
      click at the loc of the defaultButton of this card
    end if
    break
  default
    return false
  end switch
  return true
end doClick


Ken Ray
Sons of Thunder Software, Inc.
Email: kray at sonsothunder.com
Web Site: http://www.sonsothunder.com/


More information about the metacard mailing list