This seems like a simple thing to do but I cannot find anything in the documentation about this, does anyone know how I can force a mini-program to close and return back to the super app?
Sadly there's no way to programmatically close a Mini Program. The user will have to manually close the Mini Program using the close button on the title bar to get back to the Super App.
Related
I am trying to make a Mac application that opens wifi icon in the status bar when i click a button in my application view. I'm wondering if this is something that cannot be worked around because of Apple security concerns. If anybody knows a way to get around this, help would be appreciated.
If you're in a non-Mac-App-Store application, you can probably use the Accessibility APIs to find it and open it. Otherwise, it probably isn't possible, and even then, it is likely nontrivial.
I'm a new Mac programmer writing my first mac app, actually porting an existing iOS app to MAC.
The app does a lot of remote communication, so when the user kicks off an operation, I want to display a busy window (or message box, or NSAlert maybe), until the operation is completed, then dismiss it programmatically, or the user can click cancel to stop it.
The busy window prevents the user from doing anything until that operation is completed.
The busy window should have a progress spinner, some text, and a cancel button.
Its such a simple thing yet I'm having problems with it because I dont really know MAC programming, getting myself frustrated.
Can anybody offer suggestions, or already written code for it. I hope some code for this already exists because I cant believe I'm the only person in the world who needs things kind of busy window.
Thanks for any help.
You mean something like this:
http://www.developers-life.com/example-nspanel-with-nsprogressindicator.html
???
Source code is available, too (link at the end of the article).
You can just modify the NSPanel in Xcode and add a "Cancel" button that you connect to your cancel action.
How to let the Program Exitting with a button? And looks like according to "Home" button animation?
In short, there is no way to do this nicely. Apple puts that control into the hands of the user, so unless you programatically crash your app, there's no way to have a "nice" transition.
Read this answer for an explanation: Proper way to exit iPhone application?
I need my application to launch in a specific display (assuming there's more than one display) and go to full screen. The app itself is a Flash app, but I can write a native executable for the mac to launch it, I just don't know how to dictate which display it opens in. This is a fairly simple thing to do in Windows, I was hoping there's a mac analog.
[EDIT] poking around COCOA app development seems to suggest that the NSScreen object is the way to go here.
Take a look at the documentation for CGDisplayBounds, CGDisplayCapture and CGGetOnlineDisplayList. With these functions you can get the list of displays, find the display bounds to create your window. And even capture the display so only your app can use it.
I'm writing a Cocoa application that installs itself as an menulet in the menu bar (i.e. like the volume or battery icons). When the program crashes, it isn't possible to use the Force-Quit dialog, because it doesn't show up in the list. Of course, I can still kill it using the command-line, but my users don't know how to do that. Is there any way to fix this, say by making the program show up in the Force-Quit dialog?
(Note: the app is Leopard only).
To be honest, the proper solution is to make sure your app never hangs or crashes for users. This should be your #1 priority, rather than figuring out how to let users deal with crashes and hangs. Obviously it isn't always possible to make sure your app never breaks in these ways, but it should definitely be the exception rather than the rule.
On another note, MenuExtras is a private API which I hope you aren't using to create your "menulet". Rather, the public class NSStatusItem (part of Cocoa) is the Apple-approved, recommended way to install icons into your menu bar.
Not really an answer, but hopefully helpful still ...
I think that most people who know how to force quit also know they can kill a process in the activity monitor. Just make sure it's not named '93AZkZ' or something.
You could provide a PreferencePane for your application that can send the proper signal to it, if you want to allow users an easy way to shut it down or restart it. This is the pattern that MySQL uses on OS X.