我已经从http://embtvstools.svn.sourceforge.net/下载了
embtvstools
(Embarcadero TVirtualShellTools)。
但是,当我创建一个新的包,拖入.pas文件(以及从VirtualTreeView中缺失的compilers.inc
)并编译时,我会收到错误E2026。 为什么会出现这种情况,如何避免或解决?
resourcestring
sAssociationChanged = 'Association Changed';
sItemCreate = 'Item Create';
sItemDelete = 'Item Delete';
....
const
// Literal translations of TShellNotifyEvent type. Useful when using the
// OnShellNotify event to print out what event occurred. VirtualShellUtilities.pas
// has a helper function ShellNotifyEventToStr that uses these.
VET_NOTIFY_EVENTS: array[0..19] of WideString = (
sAssociationChanged,
sAttributes,
sItemCreate,
.....
[Pascal错误] IDEVirtualResources.pas(155): 需要常量表达式
[Pascal错误] IDEVirtualResources.pas(156): 需要常量表达式
[Pascal错误] IDEVirtualResources.pas(157): 需要常量表达式
更新
将widestring
更改为string
可以防止编译器报错,(我怀疑这会在其他地方创建一些问题,因为widestring <> string),但我想保持常量的类型为widestring
。