• 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
Having a problem turning on window.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Having a problem turning on window.


  • Subject: Having a problem turning on window.
  • From: Brian Christmas <email@hidden>
  • Date: Sun, 25 Jan 2015 23:04:35 +1100

G’day scripters

I’ve spent all day on this, without luck.

My app has three windows in the MainMenu.xib, and I’m trying to activate the smallest third window on startup, which contains a single field , which offers advice when setting the Security & Privacy Accessibility.

Everything I’ve tried won’t open the window, which briefly flickers on startup. I’ve stripped my apps Properties to the bare essentials, commented out unnecessary code, and tried to open the window at the start, after on applicationWillFinishLaunching:aNotification, instead of in a handler, but it just refuses to open.

It’s visible is bound to a property, my displayAssistiveDevicesAdviceWindow, and the window itself is bound to a property, windowAssistiveAccess, but even trying ’set visible of windowAssistiveAccess to true’ doesn’t work. 

The actual setting of the Accessibility is done in another script, OAS. I’ve tried opening the window in the AppDelegate and OAS.

Am I overlooking something obvious? Is my procedure correct, please?

Regards

Santa

property windowMainMM : missing value
property windowSetUpMM : missing value
property windowAssistiveAccess : missing value
property displayMainMailManagerWindow : true
property displaySetupMailManagerWindow : false
property displayAssistiveDevicesAdviceWindow : false
on turnOnAssistiveDevices:(theFlag)
try
set p to 1
set temp1 to my displayMainMailManagerWindow
set p to 2
set temp2 to my displaySetupMailManagerWindow
set p to 3
set my displayMainMailManagerWindow to false # turns OFF window 1
set p to 4
set my displaySetupMailManagerWindow to false # turns OFF window 2
set p to 5
set my displayAssistiveDevicesAdviceWindow to true # flag to set visible of advice window to ON
set p to 6
set p to 9
windowAssistiveAccess's makeKeyAndOrderFront:me
set p to 10
windowAssistiveAccess's display()
tell current application to delay 10
OAS's turnOnAssistiveDevices:{windowMainMM, windowSetUpMM, theFlag, displayMainMailManagerwindow, displaySetupMailManagerWindow, windowAssistiveAccess, fieldAssistiveAccessAdvice, displayAssistiveDevicesAdviceWindow, voiceSetter}
set p to 11
set {displayAssistiveDevicesAdviceWindow, displayMainMailManagerwindow, displaySetupMailManagerWindow} to OAS's returnAssistiveFlags
set p to 12
set my displayAssistiveDevicesAdviceWindow to false
set p to 13
windowAssistiveAccess's orderOut:me
set p to 14
set my displayMainMailManagerWindow to temp1
set p to 15
set my displaySetupMailManagerWindow to temp2
on error errmsg
display dialog "turnOnAssistiveDevices AppDelegate error " & errmsg & return & "p = " & p
end try
end turnOnAssistiveDevices:


 _______________________________________________
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: Having a problem turning on window.
      • From: Shane Stanley <email@hidden>
  • Prev by Date: Re: App Delegate binding not working.
  • Next by Date: Re: Having a problem turning on window.
  • Previous by thread: Re: App Delegate binding not working.
  • Next by thread: Re: Having a problem turning on window.
  • Index(es):
    • Date
    • Thread