Window loses focus when printing as sheet

Deploying to Mac OS? Ask Mac OS specific questions here.

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
tellboy
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 50
Joined: Wed Mar 06, 2013 1:31 pm

Window loses focus when printing as sheet

Post by tellboy » Fri Mar 07, 2014 1:12 pm

When using the following:

Code: Select all

on printChart
  answer page setup as sheet
  if the result = "cancel" then
     exit printChart
  end if
  answer printer as sheet
  if the result = "cancel" then
     exit printChart
  end if
  print card from topLeft of me to bottomRight of me into tPrintRect
end printChart
After the script has finished the window to which the sheets are attached does not have the focus.

This does not seem correct.

Does anyone know?

Mac 10.9.2

Thanks

Terry

Klaus
Posts: 13828
Joined: Sat Apr 08, 2006 8:41 am
Location: Germany
Contact:

Re: Window loses focus when printing as sheet

Post by Klaus » Fri Mar 07, 2014 5:55 pm

Hi Terry,

please always provide the version of LC you are currently using, thanks.


Best

Klaus

tellboy
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 50
Joined: Wed Mar 06, 2013 1:31 pm

Re: Window loses focus when printing as sheet

Post by tellboy » Fri Mar 07, 2014 7:33 pm

Klaus wrote:please always provide the version of LC you are currently using, thanks.
LC 6.5.2 Community

PBH
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 129
Joined: Sun Feb 20, 2011 4:26 pm
Location: Vancouver Island, BC, Canada. ex.UK
Contact:

Re: Window loses focus when printing as sheet

Post by PBH » Sat Mar 08, 2014 3:48 am

Terry,

The script works for me on Mac OSX 10.8.5 with LC 6.5.2

Have you tried stepping through your script with the debugger using breakpoints to see where it loses focus?

Paul

tellboy
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 50
Joined: Wed Mar 06, 2013 1:31 pm

Re: Window loses focus when printing as sheet

Post by tellboy » Sat Mar 08, 2014 9:22 am

It might be LC interacting with 10.9.2.

I have built a standalone app as I thought it might be the IDE but it still does it in the standalone.

If I place open wd "myWindow" in the script that does resolve the issue because open wd clearly brings the parent window to the front in the pecking order.

Is there another way to achieve the same as open wd which does seem rather brutal?


All the best

Terry

Post Reply

Return to “Mac OS”