• 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
Re: Problem with application hiding and revealing
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Problem with application hiding and revealing


  • Subject: Re: Problem with application hiding and revealing
  • From: Yann Bizeul <email@hidden>
  • Date: Fri, 7 Oct 2005 09:58:57 +0200

I won't be surprised your application is not responding while dealing with the AppleScript stuffs.
Perhaps using a thread to process document could be a good idea, bit I'm not sure if AS calls in cocoa are thread safe.


Yann Bizeul • yann at tynsoe.org
Cocoa Developer

Tynsoe Projects
BuddyPop • GeekTool • SSH Tunnel Manager • ...
http://projects.tynsoe.org/


Le 7 oct. 05 à 02:47, Christopher Drum a écrit :

Just finished up an app for work that grabs a bunch of InDesign files off our server then batch prints them to the printer(s) of the user's choice. It is a combination of MySQL queries sent through SMySQL.Framework, with document copying/management and interface elements managed via Cocoa, then of course AppleScript for talking to InDesign and updating the Cocoa elements via "call method".

When processing files, the app is very slow to respond to "Hide Other" application command sent by other applications. Revealing the app is also very sluggish. On my PowerBook G4 1.25 GHz, my app does eventually respond to the commands to hide and reveal itself. However, most troubling and puzzling is that when the app is run on another machine, a dual 1.25 GHz G4 mirror-door system, the app will not reveal itself again after being hidden. Or rather, here's a sequence of events that seems to really bother the application:

1. Launch the app
2. Choose some files to print in an NSTableView run by an NSArrayController
3. Click "Print"
4. Go into another application
5. "Hide Others"
6. Click on the icon for my application in the dock to reveal it
7. Wait and wait and wait, and cross your fingers the application will reveal itself again


It is step 7 that differs for my machine versus another machine. Mine will eventually pop the application to the foreground again, once it finishes its work with the current InDesign doc. On the other machine, revealing the app results in a white rectangle drawn where the app window should be. No menus change from the previous app (i.e., the menubar still reflects the previous application's menubar) and no amount of cajoling makes the app behave. The app never reveals itself, however I can still quit it properly from its dock icon menu and it relaunches without incident. It acts as though nothing went wrong at all... I don't have to force quit the app or anything like that.

To me, it feels like the AppleScript part of the app is causing it to hang and misbehave. That script doesn't do much besides update the tableview via a "call method" and churn through a bunch of documents passed off to InDesign. The app is really nothing fancy, when you get right down to it. My AppController only has ten methods in it, none of which are delegate methods or anything of the sort. Just very straightforward workhouse functionality (if that makes any sense).

What kinds of things should I be looking at to
a) improve the application's snappiness when asked to hide and reveal itself
b) troubleshoot what would prevent the application from revealing itself at all?


Regards,
Christopher Drum
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


_______________________________________________ Do not post admin requests to the list. They will be ignored. Cocoa-dev mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: This email sent to email@hidden
  • Follow-Ups:
    • Re: Problem with application hiding and revealing
      • From: Andreas Mayer <email@hidden>
References: 
 >Problem with application hiding and revealing (From: Christopher Drum <email@hidden>)

  • Prev by Date: Re: AddressBook/NSTableView Signal 11 crash
  • Next by Date: Re: Tracking mouse in Non-active Windows
  • Previous by thread: Problem with application hiding and revealing
  • Next by thread: Re: Problem with application hiding and revealing
  • Index(es):
    • Date
    • Thread