• 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
Windows - orderFront_(me) - How do I change focus to the window bought forward?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Windows - orderFront_(me) - How do I change focus to the window bought forward?


  • Subject: Windows - orderFront_(me) - How do I change focus to the window bought forward?
  • From: Paul G <email@hidden>
  • Date: Wed, 19 Jan 2011 15:48:13 +1000

Ok i'll list what I have and then the code and explain my problem so no one gets lost.

a Window called 'mainWindow'.
a Window called 'Window 1'.
a Window called 'Window 2'.
2 menu items called 1MenuItemSelected & 2MenuItemSelected.

The Goal is to start with the Main Window and using the menu items show either window 1 or window 2 while hiding the other windows.
So this was pretty simple:

    -- Select Menu item1
    on 2MenuItemSelected_(sender)
        tell mainWindow to orderOut_(me)
        tell Window2 to orderOut_(me)
        tell Window1 to orderFront_(me)
    end 2MenuItemSelected_
   
    -- Select Menu item2
    on 1MenuItemSelected_(sender)
        tell mainWindow to orderOut_(me)
        tell Window1 to orderOut_(me)
        tell Window2 to orderFront_(me)
    end 1MenuItemSelected_
   
Obviously making the right IB connections.

However my problem is that the Window1 and Window2 show but not in focus.
What is the solution to make the Window in focus when bought to the front.


--
--
Regards,

Paul G
 Professional Services Technician

 Apple Certified Desktop Technician
 Apple Certified Portable Technician
 Apple Certified Macintosh Technician
 Apple Certified Help Desk Specialist
 Apple Certified Technical Co-Ordinator
 Apple Product Professional (2008)

Paul Grice | Macintosh Specialist / Design & Development Officer

Operational Development | Information Management Services 
Corporate and Professional Services
Department of Education & Training
Floor 11 | Education House | 30 Mary Street | Brisbane Qld 4000

T 3405 3814 | M 0402 643 758 | E email@hidden
http://deta.qld.gov.au/

Our Vision | a clever, skilled and creative Queensland
Please consider the environment before printing this email
 _______________________________________________
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: Windows - orderFront_(me) - How do I change focus to the window bought forward?
      • From: Shane Stanley <email@hidden>
  • Prev by Date: Re: X-Code not formatting my code
  • Next by Date: Re: Windows - orderFront_(me) - How do I change focus to the window bought forward?
  • Previous by thread: Re: X-Code not formatting my code
  • Next by thread: Re: Windows - orderFront_(me) - How do I change focus to the window bought forward?
  • Index(es):
    • Date
    • Thread