Highlighted

Changing basic dialog sdk in to panel

Explorer ,
Apr 28, 2020

Copy link to clipboard

Copied

Hi, 

I'm starting another thread for my question that already posted for InDesign Plugins SDK. Here i have changed basic dialog plugin in to palette/panel (i.e.,) Instead of kBscDlgDialogBoss and
kDialogBoss i have used kBscDlgPanelWidgetBoss and kPalettePanelWidgetBoss then added resource PanelList in to it. Now after build it shows an error R32697: # Error: Syntax error in expression. 

I have attached the code changed into it. Kindly  I dont know how to change it.please help me to fix this error.

#include "MenuDef.fh"
#include "ActionDef.fh"
#include "ActionDefs.h"
#include "AdobeMenuPositions.h"
#include "LocaleIndex.h"
#include "PMLocaleIds.h"
#include "StringTable.fh"
#include "objectmodeltypes.fh"
#include "ShuksanID.h"
#include "ActionID.h"
#include "CommandID.h"
#include "WorkspaceID.h"
#include "widgetid.h"
#include "BuildNumber.h"
#include "IControlViewDefs.h"
#include "SysControlIds.h"
#include "PanelList.fh"
#include "Widgets.fh" // for PalettePanelWidget
#include "InterfaceColorDefines.h"
#include "IconStyleDefs.h" // for icon widget resource PNGIconAttributes
#include "PlugInModel_UIAttributes.h"
// Project includes:
#include "BscDlgID.h"
#include "SDKSharedPNG.fr"
#include "EveInfo.fh"
#ifdef __ODFRC__
resource PluginVersion (kSDKDefPluginVersionResourceID)
{
kTargetVersion,
kBscDlgPluginID,
kSDKDefPlugInMajorVersionNumber, kSDKDefPlugInMinorVersionNumber,
kSDKDefHostMajorVersionNumber, kSDKDefHostMinorVersionNumber,
kBscDlgCurrentMajorFormatNumber, kBscDlgCurrentMinorFormatNumber,
{kInDesignProduct, kInCopyProduct },
{kWildFS },
kUIPlugIn,
kBscDlgVersion
};
resource ClassDescriptionTable(kSDKDefClassDescriptionTableResourceID)
{{{
Class
{
kBscDlgPanelWidgetBoss,
kPalettePanelWidgetBoss,
{
IID_IPANELMENUDATA, kCPanelMenuDataImpl,
IID_IOBSERVER, kBscDlgDialogObserverImpl,
}
},
Class
{
kBscDlgActionComponentBoss,
kBaseActionComponentBoss,
{
IID_IACTIONCOMPONENT, kBscDlgActionComponentImpl,
}
}
}}};
resource FactoryList (kSDKDefFactoryListResourceID)
{
kImplementationIDSpace,
{
#include "BscDlgFactoryList.h"
}
};
resource MenuDef (kSDKDefMenuResourceID)
{
{
// The About Plug-ins sub-menu item for this plug-in.
kBscDlgAboutActionID,
kBscDlgAboutMenuPath,
kSDKDefAlphabeticPosition,
kSDKDefIsNotDynamicMenuFlag,

// The Plug-ins menu sub-menu items for this plug-in.
kBscDlgDialogActionID,
kBscDlgPluginsMenuPath,
kBscDlgDialogMenuItemPosition,
kSDKDefIsNotDynamicMenuFlag,
}
};
resource ActionDef (kSDKDefActionResourceID)
{
{
kBscDlgActionComponentBoss,
kBscDlgAboutActionID,
kBscDlgAboutMenuKey,
kHelpMenuActionArea,
kNormalAction,
kDisableIfLowMem,
kInvalidInterfaceID,
kSDKDefInvisibleInKBSCEditorFlag,

kBscDlgActionComponentBoss,
kBscDlgDialogActionID,
kBscDlgDialogMenuItemKey,
kOtherActionArea,
kNormalAction,
kDisableIfLowMem,
kInvalidInterfaceID,
kSDKDefInvisibleInKBSCEditorFlag,
}
};
resource LocaleIndex (kSDKDefStringsResourceID)
{
kStringTableRsrcType,
{
kWildFS, k_enUS, kSDKDefStringsResourceID + index_enUS
kWildFS, k_jaJP, kSDKDefStringsResourceID + index_jaJP
kWildFS, k_Wild, kSDKDefStringsResourceID + index_enUS
}
};
resource LocaleIndex (kSDKDefStringsNoTransResourceID)
{
kStringTableRsrcType,
{
kWildFS, k_Wild, kSDKDefStringsNoTransResourceID + index_enUS
}
};
resource StringTable (kSDKDefStringsNoTransResourceID + index_enUS)
{
k_enUS,
kEuropeanMacToWinEncodingConverter,
{
// No-Translate strings go here:
}
};
resource LocaleIndex (kSDKDefDialogResourceID)
{
kViewRsrcType,
{
kWildFS, k_Wild, kSDKDefDialogResourceID + index_enUS
}
};
type BscDlgPanelWidget(kViewRsrcType) : PalettePanelWidget(ClassID = kBscDlgPanelWidgetBoss)
{
CPanelMenuData;
WidgetEveInfo;
};
resource PanelList (kSDKDefPanelResourceID)
{
{
// 1st panel in the list
kSDKDefPanelResourceID,
kBscDlgPluginID,
kIsResizable,
kBscDlgPanelWidgetActionID,
kBscDlgPanelTitleKey,
"",
0.0,
0,0,
c_Panel
}
};
resource BscDlgPanelWidget(kSDKDefPanelResourceID + index_enUS)
{
__FILE__, __LINE__,
kBscDlgPanelWidgetID,
kPMRsrcID_None,
kBindNone,
Frame(0, 0, 250, 250),
kTrue, kTrue,
kFalse,
kInterfacePaletteFill,
kFalse,
kBscDlgPanelTitleKey,
{
StaticTextWidget
(
0,
kSysStaticTextPMRsrcId,
kBindNone,
5, 10, 202, 27,
kTrue, kTrue,
kAlignLeft, kEllipsizeEnd, kTrue,
kBscDlgStaticTextKey,
0
),
}
};
#include "BscDlg_enUS.fr"
#include "BscDlg_jaJP.fr"
#endif // __ODFRC__

-Jothi

I don't know whether that is the actual problem, but:

With your type BscDlgPanelWidget you are adding the two lines to the PalettePanelWidget.
CPanelMenuData;
WidgetEveInfo;

 

There should be matching data at the end of the structure, behind the closing curly bracket without semicolon (surrounding the CPanelControlData with its single StaticTextWidget).

 

In order to improve readability, follow your structure thru the declarations in file widgets.fh, and add comments per field and nested sub-structure.

This will help with future copy-paste.

 

resource MyPaletteWidget(kMyPanelRsrcID + index_enUS)

{

// PalettePanelWidget : : ResourceSrcFileInfo

__FILE__, __LINE__, // fFilename, fLineno

// PalettePanelWidget : : PalettePanelView : ErasablePanelView : CControlView

kMyPaletteWidgetID, // WidgetID

...

// CPanelControlData

// CPanelMenuData : CTextControlData

kMyPanelMenuKey, // Popup menu name

// WidgetEveInfo

};

Topics

SDK

Views

854

Likes

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

Changing basic dialog sdk in to panel

Explorer ,
Apr 28, 2020

Copy link to clipboard

Copied

Hi, 

I'm starting another thread for my question that already posted for InDesign Plugins SDK. Here i have changed basic dialog plugin in to palette/panel (i.e.,) Instead of kBscDlgDialogBoss and
kDialogBoss i have used kBscDlgPanelWidgetBoss and kPalettePanelWidgetBoss then added resource PanelList in to it. Now after build it shows an error R32697: # Error: Syntax error in expression. 

I have attached the code changed into it. Kindly  I dont know how to change it.please help me to fix this error.

#include "MenuDef.fh"
#include "ActionDef.fh"
#include "ActionDefs.h"
#include "AdobeMenuPositions.h"
#include "LocaleIndex.h"
#include "PMLocaleIds.h"
#include "StringTable.fh"
#include "objectmodeltypes.fh"
#include "ShuksanID.h"
#include "ActionID.h"
#include "CommandID.h"
#include "WorkspaceID.h"
#include "widgetid.h"
#include "BuildNumber.h"
#include "IControlViewDefs.h"
#include "SysControlIds.h"
#include "PanelList.fh"
#include "Widgets.fh" // for PalettePanelWidget
#include "InterfaceColorDefines.h"
#include "IconStyleDefs.h" // for icon widget resource PNGIconAttributes
#include "PlugInModel_UIAttributes.h"
// Project includes:
#include "BscDlgID.h"
#include "SDKSharedPNG.fr"
#include "EveInfo.fh"
#ifdef __ODFRC__
resource PluginVersion (kSDKDefPluginVersionResourceID)
{
kTargetVersion,
kBscDlgPluginID,
kSDKDefPlugInMajorVersionNumber, kSDKDefPlugInMinorVersionNumber,
kSDKDefHostMajorVersionNumber, kSDKDefHostMinorVersionNumber,
kBscDlgCurrentMajorFormatNumber, kBscDlgCurrentMinorFormatNumber,
{kInDesignProduct, kInCopyProduct },
{kWildFS },
kUIPlugIn,
kBscDlgVersion
};
resource ClassDescriptionTable(kSDKDefClassDescriptionTableResourceID)
{{{
Class
{
kBscDlgPanelWidgetBoss,
kPalettePanelWidgetBoss,
{
IID_IPANELMENUDATA, kCPanelMenuDataImpl,
IID_IOBSERVER, kBscDlgDialogObserverImpl,
}
},
Class
{
kBscDlgActionComponentBoss,
kBaseActionComponentBoss,
{
IID_IACTIONCOMPONENT, kBscDlgActionComponentImpl,
}
}
}}};
resource FactoryList (kSDKDefFactoryListResourceID)
{
kImplementationIDSpace,
{
#include "BscDlgFactoryList.h"
}
};
resource MenuDef (kSDKDefMenuResourceID)
{
{
// The About Plug-ins sub-menu item for this plug-in.
kBscDlgAboutActionID,
kBscDlgAboutMenuPath,
kSDKDefAlphabeticPosition,
kSDKDefIsNotDynamicMenuFlag,

// The Plug-ins menu sub-menu items for this plug-in.
kBscDlgDialogActionID,
kBscDlgPluginsMenuPath,
kBscDlgDialogMenuItemPosition,
kSDKDefIsNotDynamicMenuFlag,
}
};
resource ActionDef (kSDKDefActionResourceID)
{
{
kBscDlgActionComponentBoss,
kBscDlgAboutActionID,
kBscDlgAboutMenuKey,
kHelpMenuActionArea,
kNormalAction,
kDisableIfLowMem,
kInvalidInterfaceID,
kSDKDefInvisibleInKBSCEditorFlag,

kBscDlgActionComponentBoss,
kBscDlgDialogActionID,
kBscDlgDialogMenuItemKey,
kOtherActionArea,
kNormalAction,
kDisableIfLowMem,
kInvalidInterfaceID,
kSDKDefInvisibleInKBSCEditorFlag,
}
};
resource LocaleIndex (kSDKDefStringsResourceID)
{
kStringTableRsrcType,
{
kWildFS, k_enUS, kSDKDefStringsResourceID + index_enUS
kWildFS, k_jaJP, kSDKDefStringsResourceID + index_jaJP
kWildFS, k_Wild, kSDKDefStringsResourceID + index_enUS
}
};
resource LocaleIndex (kSDKDefStringsNoTransResourceID)
{
kStringTableRsrcType,
{
kWildFS, k_Wild, kSDKDefStringsNoTransResourceID + index_enUS
}
};
resource StringTable (kSDKDefStringsNoTransResourceID + index_enUS)
{
k_enUS,
kEuropeanMacToWinEncodingConverter,
{
// No-Translate strings go here:
}
};
resource LocaleIndex (kSDKDefDialogResourceID)
{
kViewRsrcType,
{
kWildFS, k_Wild, kSDKDefDialogResourceID + index_enUS
}
};
type BscDlgPanelWidget(kViewRsrcType) : PalettePanelWidget(ClassID = kBscDlgPanelWidgetBoss)
{
CPanelMenuData;
WidgetEveInfo;
};
resource PanelList (kSDKDefPanelResourceID)
{
{
// 1st panel in the list
kSDKDefPanelResourceID,
kBscDlgPluginID,
kIsResizable,
kBscDlgPanelWidgetActionID,
kBscDlgPanelTitleKey,
"",
0.0,
0,0,
c_Panel
}
};
resource BscDlgPanelWidget(kSDKDefPanelResourceID + index_enUS)
{
__FILE__, __LINE__,
kBscDlgPanelWidgetID,
kPMRsrcID_None,
kBindNone,
Frame(0, 0, 250, 250),
kTrue, kTrue,
kFalse,
kInterfacePaletteFill,
kFalse,
kBscDlgPanelTitleKey,
{
StaticTextWidget
(
0,
kSysStaticTextPMRsrcId,
kBindNone,
5, 10, 202, 27,
kTrue, kTrue,
kAlignLeft, kEllipsizeEnd, kTrue,
kBscDlgStaticTextKey,
0
),
}
};
#include "BscDlg_enUS.fr"
#include "BscDlg_jaJP.fr"
#endif // __ODFRC__

-Jothi

I don't know whether that is the actual problem, but:

With your type BscDlgPanelWidget you are adding the two lines to the PalettePanelWidget.
CPanelMenuData;
WidgetEveInfo;

 

There should be matching data at the end of the structure, behind the closing curly bracket without semicolon (surrounding the CPanelControlData with its single StaticTextWidget).

 

In order to improve readability, follow your structure thru the declarations in file widgets.fh, and add comments per field and nested sub-structure.

This will help with future copy-paste.

 

resource MyPaletteWidget(kMyPanelRsrcID + index_enUS)

{

// PalettePanelWidget : : ResourceSrcFileInfo

__FILE__, __LINE__, // fFilename, fLineno

// PalettePanelWidget : : PalettePanelView : ErasablePanelView : CControlView

kMyPaletteWidgetID, // WidgetID

...

// CPanelControlData

// CPanelMenuData : CTextControlData

kMyPanelMenuKey, // Popup menu name

// WidgetEveInfo

};

Topics

SDK

Views

855

Likes

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
Adobe Community Professional ,
May 28, 2020

Copy link to clipboard

Copied

This community is mainly a User Forum, so your question may be a bit out of league here...

Try contacting other developers on a more appropriate platform for InDesign Scripting or SDK.

Likes

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
Reply
Loading...
Adobe Community Professional ,
May 28, 2020

Copy link to clipboard

Copied

Hi Peter,

you may not noticed this: Since the forum contents was moved to the new forum software last year all specialised InDesign forums like InDesign Scripting, Server Developers, InDesign SDK, InDesign EPUB etc.pp. were merged ( and often mangled as well ) into one big single InDesign forum. And a lot of the old stuff is missing since then.

 

Regards,
Uwe Laubender

( ACP )

Likes

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
Reply
Loading...
Adobe Community Professional ,
May 28, 2020

Copy link to clipboard

Copied

Oops, I see !!

So the pointers at the bottom of this page all refer to HERE !

OMG...

 

Schermafbeelding 2020-05-28 om 17.54.33.png

Likes

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
Reply
Loading...
Adobe Community Professional ,
May 28, 2020

Copy link to clipboard

Copied

Peter said:

OMG...

Indeed.

Likes

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
Reply
Loading...
Advisor ,
May 28, 2020

Copy link to clipboard

Copied

I don't know whether that is the actual problem, but:

With your type BscDlgPanelWidget you are adding the two lines to the PalettePanelWidget.
CPanelMenuData;
WidgetEveInfo;

 

There should be matching data at the end of the structure, behind the closing curly bracket without semicolon (surrounding the CPanelControlData with its single StaticTextWidget).

 

In order to improve readability, follow your structure thru the declarations in file widgets.fh, and add comments per field and nested sub-structure.

This will help with future copy-paste.

 

resource MyPaletteWidget(kMyPanelRsrcID + index_enUS)

{

// PalettePanelWidget : : ResourceSrcFileInfo

__FILE__, __LINE__, // fFilename, fLineno

// PalettePanelWidget : : PalettePanelView : ErasablePanelView : CControlView

kMyPaletteWidgetID, // WidgetID

...

// CPanelControlData

// CPanelMenuData : CTextControlData

kMyPanelMenuKey, // Popup menu name

// WidgetEveInfo

};

Likes

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
Reply
Loading...
Jothi LATEST
Explorer ,
Jun 08, 2020

Copy link to clipboard

Copied

Hi Dirk_Becker,

Yeah! now i'm able to convet dialog to panel/palette. Thankyou for your reply.

-Jothi

Likes

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
Reply
Loading...