GetProcessForPID is deprecated; what to use instead?

I have been using GetProcessForPID to get the ProcessSerialNumber for the running application, as in
ProcessSerialNumber psn;
int pid = [[NSProcessInfo processInfo] processIdentifier];
OSStatus error = GetProcessForPID(pid, &psn);
I then use this ProcessSerialNumber to create an event tap with CGEventTapCreateForPSN.
As of OS X 10.9, GetProcessForPID is deprecated.
What is the recommended replacement function in Cocoa or in Core Foundation?
Best,
-Michiel.

Observe the NSWorkspaceDidLaunchApplicationNotification notification.
In the callback, get the process serial number as follows:
NSDictionary* dictionary = [notification userInfo];
NSNumber* psnLow = [dictionary valueForKey: @"NSApplicationProcessSerialNumberLow"];
NSNumber* psnHigh = [dictionary valueForKey: @"NSApplicationProcessSerialNumberHigh"];
ProcessSerialNumber psn;
psn.highLongOfPSN = [psnHigh intValue];
psn.lowLongOfPSN = [psnLow intValue];

Similar Messages

  • What to use Instead of Demo Monkey?

    Hallo fellow developers
    I have been watching alot of videos on the internet, to try and learn how the Xcode and iOS developing works.
    I then ran in to a problem... i was watching a video, with a guy making an app, in the app he was using a program called DemoMonkey.
    I went online to ry and finde it, it was hard, but eventually i found it. the next problem is then that, apple says:
    Important This document is part of the Legacy section of the ADC Developer Library. This information should not be used for new development.
    Current information on this Developer Library topic can be found here:
    Cocoa > User Experience
    http://developer.apple.com/legacy/mac/library/#samplecode/DemoMonkey/Introductio n/Intro.html
    soo, the big question is, what to use instead?
    Hope someone are able to help me.
    Thanks!
    Martin

    I was looking in 'Beginning iOS Storyboarding: Easily Design and Develop Your App, from Concept and Vision to Code by Rory Lewis, Yulia McCarthy and Stephen M. Moraco Apress © 2012'. This was where I encountered the reference to Demo Monkey. I had not heard of this before. I am assuming, based on the threads I am seeing here, that I should be able to figure out story boards without Demo Monkey. I am fine with not relying on a prebuilt library or a shortcut tool to learn something, I just want to make sure I know what is necessary and what isn't. Also planning to read Dan Steinberg's storyboarding book!

  • Obsolete function module in ECC6 - what to use instead of that

    I have to upgrade from SAP 4.7 to ECC6 .
    Some obsolete function module are as follows:
    ADDRESS_MAINTAIN
    ADDRESS_UPDATE_OLD
    DD_PR_REDEFINE
    GRAPH_DIALOG
    HELPSCREEN_NA_CREATE
    Can anybody assist me which function module to use in place of this function module or which class methods to be used instead of these function modules ?
    Thanks...

    Hi Deepak,
    For ADDRESS_MAINTAIN you can go this way for now.
    DATA : func_name TYPE rs38l_fnam.
    func_name = 'ADDRESS_MAINTAIN'. "To escape the EPC Check
        DO.
          CALL FUNCTION func_name
            EXPORTING
              adrswa_in         = sadr
              processing_status = mode
              kennzeichen       = kz
              save_intern       = 'X'
              title             = am_title
            IMPORTING
              adrswa_out        = sadr
              returncode        = return
              update_flag       = am_save
            EXCEPTIONS
              not_found         = 4.
    we haven't found any replacement for this. so doing it this way.
    ADDRESS_UPDATE_OLD - No Replacement for this.
    DD_PR_REDEFINE - No Replacement for this.
    GRAPH_DIALOG - No Replacement for this.
    All the Above 3 FMs are still being used in ECC standard programs.
    Thanks,
    Sai
    Edited by: Sai Krishna Kowluri on Dec 5, 2008 7:34 AM
    Edited by: Sai Krishna Kowluri on Dec 5, 2008 7:37 AM

  • KeyStore provider is deprecated, what to use in its place?

    Hi Folks,
    Here (http://edocs.bea.com/wls/docs70/secintro/model.html#1024111), I am
    told that the keystore provider is deprecated.
    Unfortunately, it doesn't tell me why it is deprecated, nor what I should
    use in its place.
    I still need it to store the private keys used in the SSL configuration, so
    why is it deprecated?
    Regards,
    Jon

    "Jon Mountjoy" <[email protected]> wrote in message
    news:[email protected]..
    Hi Folks,
    Here (http://edocs.bea.com/wls/docs70/secintro/model.html#1024111), I am
    told that the keystore provider is deprecated.
    Unfortunately, it doesn't tell me why it is deprecated, nor what I should
    use in its place.
    I still need it to store the private keys used in the SSL configuration,so
    why is it deprecated?
    In 8.1, we added keystores to the server mbean. Having a provider to
    configure
    the keystore information was limiting as it required all servers in the
    domain to
    have the same keystore filename (since keystore providers are configured
    on the realm and there is one realm in the domain).
    You can continue to use the keystore providers in 7.0. We just didn't want
    anyone writing their own providers.
    Regards,
    Jon

  • Keep getting encoding errors !!  What to use instead of iDVD ?

    Have read many posts about encoding errors with iDVD.   I get them now, no matter what movie file (.mov, mp4, etc.) is used.  Tried to save as an image, TS folder, etc. and always get an encoding error.  Could never get to burning.  Wasted many hours.
    Which alternate program is as effective and easy as iDVD ?

    iDVD encoding settings:
    http://support.apple.com/kb/HT1502?viewlocale=en_US
    Short version:
    Best Performance is for videos of up to 60 minutes
    Best Quality is for videos of up to 120 minutes
    Professional Quality is also for up to 120 minutes but even higher quality (and takes much longer)
    That was for single-layer DVDs. Double these numbers for dual-layer DVDs.
    Professional Quality: The Professional Quality option uses advanced two-pass technology to encode your video (The first pass determines which parts of the movie can be given greater compresson without quality loss and which parts can’t.  The second pass then encodes those different parts accordingly) , resulting in the best quality of video possible on your burned DVD. You can select this option regardless of your project’s duration (up to 2 hours of video for a single-layer disc and 4 hours for a double-layer disc). Because Professional Quality encoding is time-consuming (requiring about twice as much time to encode a project as the High Quality option, for example) choose it only if you are not concerned about the time taken.
    In both cases the maximum length includes titles, transitions and effects etc. Allow about 15 minutes for these.
    You can use the amount of video in your project as a rough determination of which method to choose. If your project has an hour or less of video (for a single-layer disc), choose Best Performance. If it has between 1 and 2 hours of video (for a single-layer disc), choose High Quality. If you want the best possible encoding quality for projects that are up to 2 hours (for a single-layer disc), choose Professional Quality. This option takes about twice as long as the High Quality option, so select it only if time is not an issue for you.
    Use the Capacity meter in the Project Info window (choose Project > Project Info) to determine how many minutes of video your project contains.
    NOTE: With the Best Performance setting, you can turn background encoding off by choosing Advanced > “Encode in Background.” The checkmark is removed to show it’s no longer selected. Turning off background encoding can help performance if your system seems sluggish.
    And whilst checking these settings in iDVD Preferences, make sure that the settings for NTSC/PAL and DV/DV Widescreen are also what you want.
    http://support.apple.com/kb/HT1502?viewlocale=en_US

  • What to use instead of HTMLB for external facing portals

    Hi all
    We all know that HTMLB is on it's way out and I was just wondering what to replace it with, especially when dealing with external facing portals and the simple portal framework.
    Since HTMLB and WD won't cut it the only thing there is left is the AbstractPortalConmponent.
    Has anyone had success with implementing another framework, like for instance MyFaces (http://myfaces.apache.org/) or Tapestry (http://tapestry.apache.org/), in the APC. Or perhaps someone developed a entirely new framework for the APC to use?
    If you have knowledge or ideas, please comment them.
    Best regards
    Thomas Bentzen

    Hi Harini
    I was never talking about tags, and I personally like avoid JSP's altogether (strictly personal opinion).
    I was thinking more of what to do in the long run. I mean writing JSP's for the view and using APC as the controller is not a very performant way of doing development, perhaps we should aim a little higher and perhaps implement something there already is a standard and already fulfills the requirements of x509. If we're even a little more clever than that we might choose a framework that already have support for AJAX (HttpXML requests).
    I don't really know what to do at this time and therefore was asking for ideas, on the architectural level, but also implementable.
    Any ideas?

  • What to use instead of obsolete ISO_TO_SAP_CURRENCY_CODE

    Hi,
    When I try to use function module ISO_TO_SAP_CURRENCY_CODE in my code, I am told that it is obsolete.  There is no information about what this function module has been replaced with.  Any ideas?

    Hi Tristan ,
      Try this function module this will work for u i beleive
                CURRENCY_CODE_ISO_TO_SAP
    Message was edited by:
            raghuveer kumar

  • What to use instead for isscriptenabled for windows phone 8.1 in webview control

    For Windows phone 7/8, we could use the Webbrowser control in XAML and use IsScriptEnabled to true or false to run JavaScript code. I can't find this attribute in XAML for the webview control. Is there an equivalent in WebView for me to use in my Windows
    Phone 8.1 app?
    Thanks
    mujno

    Hi Mujno,
    Yes, as you said that the IsScriptEnabled is not supported in the WebView. Then as far as I known there is no such an attribute in XAML for the webview control that is equivalent to the IsScriptEnabled attribute in the WebBrowser. For the workaround
    please try to refer to @Rob Caplan [MSFT]'s reply in this similar thread:
    https://social.msdn.microsoft.com/Forums/windowsapps/en-US/1f8c9832-ce12-47c8-bb7a-96694cf80622/is-there-an-equivalent-of-webbrowserisscriptenabled-for-the-windows-8-webview-control?forum=winappswithcsharp
    Best Regards,
    Amy Peng
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • What to use instead of iDVD?

    I have home VHS transferred to DVDs through a store.  I was told I could make copies for family.  Can I do this just by inserting it in my iMac w/ Yosemite?  (steps please, I don't want to mess up the only disk w/ home movies.  The file has the Video_TS.VOB.  I started to convert to MPEG-4 in order to import to iMovie... not working, stuck optimizing for hours, but iDVD just drops in and does fine, but this is still multiple steps.  Handbreak to convert, iDVD to burn but not much editing options)
    Previously I've made dvd's w/ iMovie 9 & 11 + iDVD for the cool themes.  I still have these (went back to iMovie 9 for easier export into iDVD).  But I was wondering what is the NEW-Fun-Friendliest way to create: import, edit, (conversion, themes, titles, trim, music, burn) since iDVD doesn't even come w/ new Macs? 
    I also have Adobe Premier Elements 10... just get overwhelmed and bogged down in Photoshop Elements so I've always stayed away from trying to learn Premier.  Realistic/ Affordable suggestions would be great IF apple doesn't have these things built in Yosemite somewhere?!  Thanks!

    iDVD Is a tool for creating DVDs.  There is no substitute or alternative to iDVD.
    However, it sounds like your DVD is already made and you just want to make copies.  If that is true, the Mac OS system utilities can do this for you.
    1. Insert the DVD/CD;
    2. Open Disk Utility, and select the DVD/CD from the left side list Select the disc (not just the disc session) you want to copy from the listing on the left.    (Select the DVD/CD icon on top.)
    3. From the File menu, choose New and then choose Image from "your disk name").
    4. Enter a file name and choose "DVD/CD Master" from the Image Format pop-up menu.
    5.   Click the Create/Save button. After the image has been created (you will get a .cdr file) you should see it in the disk listing in the Disk Utility window.
    6.   Eject the DVD disc.
    (If you wish to make a DVD from this file, continue with the steps below.)
    7.   Select the disk image you created from the listing.
    8.   Click the Burn icon in the toolbar.
    9.   When prompted, insert a blank DVD disc.
    10.  Click the Burn button.

  • What to use instead of Starter Edition 3.2 ??

    Hi! I installed Adobe Photoshop Starter Edition 3.2 when installing my camera/video camera to my new laptop, but didn't register it until given the final prompt to do so, and now can't get the unlock code with this program no-longer being in use. (I had Starter Ed. 3.2 registered and in use on my old laptop with no problems.) I see that on the menu page of this forum you suggest using Adobe Premiere Elements Trial, but seeing as this is only available for 30 days, I'm assuming this has to be paid for from then on. Is this the only alternative available? If so, how much does it cost? If I remove Starter Edition, and download Premiere Elements, will this program automatically work with my camera/video camera that Starter Edition worked with?
    Any advice would be much appreciated, thanks. :-D

    Hey Anita,
    Adobe Photoshop Album Starter Edition is not a software that stores images but it rather stores their location in a catalog. So you can uninstall the application if you don't want to use it further and your images will remain in the locations they were already in.
    Cheers,
    Chhaya

  • What can I use instead of color variations in Elements 12?

    I had a copy of Elements 6 for many years. The feature I used most often was color variations. Unfortunately, I was unable to install my copy on my new computer, and I figured it was time to upgrade to the latest version anyway. Image my surprise when I discovered there was no feature called Color Variations in this version. I'm floored. Most of what I do in Elements doesn't have to do with photography; I am scanning book covers and must have the colors display accurately. I have not yet figured out what to use instead. All help appreciated.

    If you are on WINDOWS, you can put Color Variations into PSEv.12. See here:
    Pse12 color variation function removed - Elements Village
    Hopefully, you still have access to PSEv.6.

  • What can i use instead of timeservices API ?

    Hi,
    Timeservices API are deprecated.
    What can i use instead of this API to execute an action every minit for example.
    (Weblogic Server 6.1)
    Thank you in advance.

    Patrick Juhel wrote:
    Hi,
    Timeservices API are deprecated.
    What can i use instead of this API to execute an action every minit for example.
    (Weblogic Server 6.1)
    Thank you in advance.Look here:
    http://www.quartzscheduler.org/index.jsp
    rgds,
    Kris

  • Does Mackeeper cause problems?  What should I use instead?

    I have been using Mackeeper since getting my new Macbook Pro laptop in December 2013/Jan. 2014 (OS X 10.9.4).  I just now read it is not advised to use Mackeeper to 'clean' your computer, and I have since deleted it.  Have I caused my computer problems by using it since I purchased it in December 2013/January 2014?  What, if anything, should I use instead to help keep the system running smoothly, fast, and without issues?  (i.e. malware, viruses, trojans, etc.)
    This is my third Mac laptop and I've always used some type of Mackeeper cleaner; I'm somewhat lost as to what I should now do -- or if I caused my system problems. 
    Thanks in advance.

    What, if anything, should I use instead to help keep the system running smoothly, fast, and without issues?  (i.e. malware, viruses, trojans, etc.)
    No so-called "cleaning" programs are necessary or beneficial.
    All are capable of causing system corruption that, at an extreme, may require completely erasing your Mac and reconfiguring it from the ground up.
    Keep your Mac's operating system up to date with software updates from Apple.
    -- or if I caused my system problems.
    That is possible. If your Mac is not performing as you think it should, describe what you're observing that is causing you concern. Please be as specific as possible - for example, is it taking a long time to launch programs? Is Safari loading web pages slowly, or not at all?
    Whatever you do, if you believe something is wrong with your Mac, never install any product that claims to "clean up", "speed up",  "optimize", "boost" or "accelerate" it; to "wash" it, "tune" it, or to make it "shiny". Those claims are absurd.
    There are many such products and they're all scams designed for one and only one purpose - to take your money. They are very successful at that task. Once that is accomplished, their mission is complete. If your Mac subsequently behaves poorly, if your data becomes irretrievably lost, or if you just waste your time - is completely irrelevant to their true purpose.
    Describe what's wrong and the experienced users on this site will help you fix it.

  • What do you use instead of picture package in photoshop cs6

    What can you use instead of picture package in photoshop cs6. You cannot import it anymore to make pictures. I do not want to print one at a time.

    I think the Bridge Output Module comes as standard with CS6, but I might be wrong.  Even if you have CC, you can download the Output Module.
    Install Adobe Output Module

  • What can I use instead of adobe flash 9?

    What can I use instead of Adobe Flash 9 on iPad mini?

    There are a number of apps in teh app store that provide "translation" type services for flash content (iSwifter, Puffin are a couple, there may be more). Basically these apps take the flash video content and route it to a third server that converts it to a different format and then routes to your device. Reveiws are mixed and they may not work with all flash content.
    Alternately, you might check to see if the specific sites youare visiting have their own apps.

Maybe you are looking for

  • Iam not getting the data on screen after using the user exit zxpadu01

    Dear Freinds             As per my requirement when the user enters value Ansal  it should get defaulted to Amount field (bet01 ) based on the wage type i have written calculation ( q0008-bet01 = ansal/100) before it getting defaulted to bet01, i fou

  • ITunes displays error message -69 when syncing iPhone

    hi, iTunes displays error message -69 when i sync my iPhone 3GS, this is just for syncing music to my iPhone. apps syncing is ok. can anyone help please? thanks

  • Windows 2008 R2 KMS server not activating Windows 8.1

    We have a 2008 R2 server running VAMT 3.1 and with KB2757817 installed. I added our Windows Server 2012 and Windows 2012 R2 KMS product keys to the KMS host as well as our Windows 8.1 KMS key, and restarted the system. So that when I look at the list

  • Out of the box iphone dfu restore

    Hello guys, Soon ill receive my fist iphone ever, its gonna be 4s, so i wanted to ask for a little bit of help from pro users I saw this video http://www.youtube.com/watch?v=tdwz1w47HqE And as i dont have an iphone 4 to compare it to 4s for any speed

  • HD space saving with iTunes

    I am trying to get more space on my internal HD at the moment, and I'm having trouble finding things to move onto my external HD. It seems to me that iTunes saves several copies of each song, in different folders. Is this how it works? Are there any