hello everyone im trying to create this tweak that copies a file from one spot to another everytime a specific app opens. Would this be correct to use. im still really new to this, but trying, what command should be placed to have this run everytime the app opens.
- (BOOL)fileManager:(NSFileManager *)fileManager
shouldCopyItemAtPath:(NSString *)srcPath *path/to/where/file/is
toPath:(NSString *)dstPath *where/i/want/it/copied/to
If you want this to run every time the app opens then you can call it from application:didFinishLaunchingWithOptions: in your app delegate.
Related
During the code development it would be better if I could reload my code and keep the script window open. At the same time it would have to allow me to change or creat objects on my dashboard. Is this possible ?
The short answer is No
But you can achieve this if you split your script from your app. Have one app that contains the script (and nothing else) and one app that loads Binary from the first app. This app will contain all objects.
The binary load grabs the whole data from one app and "paste" it in the current app.
So you can reload the app with the script (and continue working on the app with the objects) and when the script app is ready (and saved) just reload the app with the objects. The app with the objects will reload quite quickly because the binary load will grab the reloaded data
I wrote a Pharo program that generates my daily task non-stop.
The program itself works fine, however I always need to instantiate my object in the playground to run it. Is there some other way of doing it automatically without having to create an object and send a message to it?
Yes, you can. Save the image after you have instantiated your application and closed everything else. Then just start pharo from the image and you will have your application started.
If you want to do it more production wise you could use pharo-launcher.
For more detailed information you could squeak wiki which you can adjust to Pharo.
I would do one of three thing here:
Add an item to the World menu, so you can bring up the menu and select your task. See a Stackoverflow Answer on that same topic.
You could write some triggering code in a .st file on your file system, then use StartupPreferencesLoader to load it on startup.
Create a window morph with a button that, once pressed, runs your code. Open the window, quit and save image changes. Never close the window.
I'm new to Cocoa and Mac programming so sorry if this is a bad question,but I got frustrated and I don't know what to do. Heres my ViewController files (Appdelegate.h and .m is left untouched to default)
Up to this point everything works as expected, App compiles and runs without a problem. but when I start adding some logic to a method updateDetailViews I get this:
How to fix it?
You can run your application removing the blue arrow. (Use drag and drop to remove).
It is use to check your function is called or not while your application is running. So when it call your application stop running and show this line. You can run again using the play type button from console.
I have an App that I inherited in VB6 and have ported mostly to VB.net
When I compile / run the app - it highlights all the files in the current selected folder.
What makes it worse, is it's very difficult to search online as what search terms does one use?
The app was ported to VS 2005 - quite successfully - but this has me stumped...
I have tried commenting out all the code that's run on startup and it still does it, so it must be some sort of background thing...
Any ideas?
I can't find an old version of my app to see if it's changes I have made and I don't know where to begin. See the image:
The top part is before I run the app, the bottom is once the app is running and has focus. I hope it makes sense
Also, if I'm browsing and then run the app, and go back to the browser, when my app gets the focus again, the webpage goes back to the top...
The folder is just an example - Basically when I compile (or later run) my App, if I go to Windows Explorer - when the app gets focus - whatever folder I am in has all its files highlighted. If instead of going to Windows Explorer, I go to a web browser, when the app gets focus the browser goes to the top (similar to Home).
There is Windows Integratio, but I have commented out what I can and still am no closer.
Does this info help?
I found the problem - after going back to the vb6 project and removing everything except for the 5 modules needed to startup and I eventually tracked the problem.
There was some code being called when two edit boxes received focus which called send keys home and end - hence it would go home - select all files to the end. I had deactivated one of the edit boxes to not receive focus and it helped temporarily(obviously until the other box got focus), but since deactivating the send keys when they get focus has helped. Albeit an arbitrary problem, maybe it will help someone in the future..
So im trying to figure out how to run custom code when my application quits. Kind of like how I run awakeFromNib when the program starts to initiate certain items, im looking for the program quit equivilant so I can save the user interface state. Thanks.
Zach
UPDATE: Im not programmin in iOS, im trying to write a mac application.
You're looking for applicationWillTerminate, I think.