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!
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
...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
Copy link to clipboard
Copied
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