Skip navigation
Currently Being Moderated

How to show alert messages in 64-bit plugin?

Aug 8, 2012 11:51 PM

Hi All!

 

I am developing a plugin for Photoshop CS5 on 64-bit Mac. I am using x86_64 configuration, so same plugin is compatible with 32-bit machines too. The alert messages I have used (using sADMBasic->MessageAlert) are not appearing on 64-bit. Instead I get the following error message alert "Could not complete the Plugin_XYZ command because of a program error."

 

I know that ADM is deprecated CS5 onwards.

 

How can I show alerts that are compatible with both 64-bit as well as 32-bit machines using PS SDK?

I think this is possible as Photoshop too shows its alerts.

 

Thanks!

 
Replies
  • Currently Being Moderated
    Aug 9, 2012 9:56 AM   in reply to poortip87

    Your acquire suite has failed. ADM is not supported on the mac in 64 bit mode. Here is the section from the FAQ for the SDK.

     

    7 Adobe Dialog Manager (ADM)

    7.1 Where are the ADM (Adobe Dialog Manager) header files?

    The ADM header files are no longer part of the Photoshop SDK. The Adobe Dialog Manager has been deprecated and no longer works on the Macintosh platform.

    7.2 What should I do as a replacement?

    There is currently no direct replacement for the ADM API. Plug-in developers must write their UI using the API's provided by the OS. There are 3rd party UI toolkits available. Many developers have had success with the Qt UI framework.

    7.3 Which versions of Photoshop will ADM still work with?

    Photoshop CS6 on Windows (32 and 64 bit)

    Photoshop CS5 on Windows (32 and 64 bit) - Macintosh 32 bit only

    Photochop CS4 and previous versions back to Photoshop Version 5.0

     

     

    http://forums.adobe.com/message/3664645#3664645

    http://forums.adobe.com/message/2818402#2818402

    http://forums.adobe.com/message/1164536#1164536

    http://forums.adobe.com/message/3368479#3368479

     
    |
    Mark as:
  • Currently Being Moderated
    Mar 26, 2013 9:00 AM   in reply to poortip87

    Like this:

     

    #if MSWindows

              int          _ErrorMessage(char *astring, char *bstring)

              {

                        (void)MessageBox((HWND)NULL, (LPSTR)bstring, (LPSTR)astring,

                                                                  MB_OK | MB_ICONHAND | MB_ICONEXCLAMATION);

      return 0;

              }//_ErrorMessage

    #else

      #include <CoreFoundation/CoreFoundation.h>

              int _ErrorMessage(const char *title, char *message)

              {

      CFOptionFlags nRet;

                        CFStringRef bstring = CFStringCreateWithCString( NULL, message,  strlen(message) );

                        CFStringRef astring = CFStringCreateWithCString( NULL, title,  strlen(title) );

     

                        (void)CFUserNotificationDisplayAlert(0, kCFUserNotificationPlainAlertLevel,

      NULL, NULL, NULL,

                                  astring,                                                                      //header

                                  bstring,                                                                      //message

      CFSTR("OK"), NULL, NULL, &nRet); //name on the button

      return 0;

              }//_ErrorMessage

    #endif

     
    |
    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points