CnPack Forum


 
Subject: 脚本专家的一个问题
freespace8
新警察
Rank: 1



UID 22007
Digest Posts 0
Credits 26
Posts 11
点点分 26
Reading Access 10
Registered 2007-8-2
Status Offline
Post at 2008-7-16 14:34  Profile | Blog | P.M. 
脚本专家的一个问题



program test;

uses
  Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
  StdCtrls, ScriptEvent;

var
  FormEvent: TCnScriptFormEditorNotify;
begin
  if Event = nil then
  begin
    OutputDebugString('Event = nil');
    Exit;
  end;
  case Event.Mode of
    smManual: OutputDebugString('smManual');
    smIDELoaded: OutputDebugString('smIDELoaded');
    smFileNotify: OutputDebugString('smFileNotify');
    smBeforeCompile: OutputDebugString('smBeforeCompile');
    smAfterCompile: OutputDebugString('smAfterCompile');
    smSourceEditorNotify: OutputDebugString('smSourceEditorNotify');
    smFormEditorNotify: OutputDebugString('smFormEditorNotify');
  end;
end.

勾上 smBeforeCompile, smAfterCompile

debugview输出内容为:

[2736] smFileNotify
[2736] smBeforeCompile

为什么没有编译后事件触发,用的是0.8.4.415 每日构建版
Top
freespace8
新警察
Rank: 1



UID 22007
Digest Posts 0
Credits 26
Posts 11
点点分 26
Reading Access 10
Registered 2007-8-2
Status Offline
Post at 2008-7-16 14:36  Profile | Blog | P.M. 
而且 filenotify 没有打钩,但是有输出。
Top
zjy
管理员
Rank: 9Rank: 9Rank: 9



UID 2
Digest Posts 6
Credits 2385
Posts 1543
点点分 2385
Reading Access 102
Registered 2002-12-16
Location China
Status Offline
Post at 2008-7-16 15:49  Profile | Site | Blog | P.M. 
多谢报告!

这确实是脚本专家的一个Bug,原因是脚本中注册的TCnScriptMode枚举值顺序与代码中定义的不一致,导致常量对应错。下一个Build版将修正。




Zhou JingYu
CnPack Administrator
http://www.cnpack.org/
Top
 




All times are GMT++8, the time now is 2024-11-23 13:33

    本论坛支付平台由支付宝提供
携手打造安全诚信的交易社区 Powered by Discuz! 5.0.0  © 2001-2006 Comsenz Inc.
Processed in 0.008229 second(s), 7 queries , Gzip enabled

Clear Cookies - Contact Us - CnPack Website - Archiver - WAP