• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
transparent window won't activate
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

transparent window won't activate


  • Subject: transparent window won't activate
  • From: Brian Christmas <email@hidden>
  • Date: Fri, 05 Dec 2014 03:42:12 +1100

G’day once more scripters.

Another question, sorry.

In Yosemite, I’ve added a second ‘Setup’ window to my app which was carried over from Mountain Lion.

The new window works fine if I start up with it showing, but the original window does not work. It’s always greyed out, and is transparent to mouse clicks. Clicking on it either activates the Finder, or if double clicked over a folder, opens the folder. Nothing I have done so far alters this strange behaviour.

Before I go the the extreme measure of rebuilding the whole Interface, I’m wondering if there’s a remedy anyone knows of, or if this is a common problem?

Should I file a bug report, also?

As well, I’m trying to set the position of the setup window relative to the main window, without success.

However, this might be due to the fact the main window is not working. Anyone care to comment if my code is correct, please?

Regards

Santa

Code I’m using to toggle windows…


on toggleWindows:sender
tell me to activate
if my displayMainMailManagerWindow then
say "Displaying Setup window" as text
try
tell windowMainMM to display()
end try
try
tell application "System Events" to tell process "Mail Manager"
try
set the props to get the properties of the front window —< Doesn’t work
set oldOrigin to position of props
say 2
set newX to (oldOrigin's x) - 226 #as integer
say 3
set newY to oldOrigin's y #as integer
say 4
windowSetUpMM's setFrameOrigin:{newX as integer, newY as integer}
on error errmsg number errNum
if errNum ≠ -1719 then display dialog "toggleWindows " & errmsg & " number " & errNum
end try
say 5
end tell
end try
set my displayMainMailManagerWindow to false
say 6
my makeKeyWindow()
say 7
else
say "displaying main window" as text
try
tell windowSetUpMM to display()
end try
set my displayMainMailManagerWindow to true
say 9
my makeKeyWindow()
say 10
end if
end toggleWindows:


on makeKeyWindow()
try
if my displayMainMailManagerWindow then
windowMainMM's makeKeyAndOrderFront:self()
try
tell windowMainMM to display()
end try
else
windowSetUpMM's makeKeyAndOrderFront:self()
try
tell windowSetUpMM to display()
end try
end if
on error errmsg
display dialog "makeKeyWindow " & errmsg
end try
end makeKeyWindow

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
applescriptobjc-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: transparent window won't activate
      • From: Shane Stanley <email@hidden>
  • Prev by Date: Is there an easier way?
  • Next by Date: Re: Is there an easier way?
  • Previous by thread: Re: Is there an easier way?
  • Next by thread: Re: transparent window won't activate
  • Index(es):
    • Date
    • Thread