• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

How to show alert messages in 64-bit plugin?

Engaged ,
Aug 08, 2012 Aug 08, 2012

Copy link to clipboard

Copied

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!

TOPICS
SDK

Views

1.8K

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

New Here , Mar 26, 2013 Mar 26, 2013

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 bstr

...

Votes

Translate

Translate
Adobe
Adobe Employee ,
Aug 09, 2012 Aug 09, 2012

Copy link to clipboard

Copied

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

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Mar 26, 2013 Mar 26, 2013

Copy link to clipboard

Copied

LATEST

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

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines