Setting the Mouse Button (and Printing Weirdness)
Gardner, Joseph A
joe.gardner at nwa.com
Thu Oct 30 02:52:52 EST 2003
Folks, I'm having a weird problem with setting the mouse button in a print handler. I'd like to have a regular mouse click (Button 1) print the contents of a field and a control- or right-click (Button 3) display the appropriate print dialogs before printing. However, after control-clicking the button once, subsequent regular clicks _keep_ producing the print dialogs even though the answer shows that theButton is 1 (plain click). Control-clicking works as expected, why does the "if theButton is 3" loop keep kicking in when theButton is clearly 1? Here's the handler I'm trying to get under control:
on mouseUp theButton
answer theButton
if field "FileContents" is empty then exit to top
if theButton is 3 then -- Control-click, right-click
revShowPrintDialog true,true
end if
revPrintField ("field" && quote & "FileContents" & quote)
put 1 into theButton
end mouseUp
Working in OSX 10.2 on a G4 expecting to port to Windows eventually.
Thanks for any advice!
joe.
p.s. Any idea why revPrintField would print the contents of the field on a light gray background when printing to a laser printer? It's very strange.
More information about the use-livecode
mailing list