I have a few install scripts, with almost the same functionality. I separated same functions to include file with common code, but from time to time I need to override some of those.

Unfortunately, override at the end as in Delphi doesn't help:

function NextButtonClick(CurPageID: Integer): Boolean; override;
有帮助吗?

解决方案

That is not possible. One thing is that e.g. the NextButtonClick which you mentioned is meant to be the event method whose you do not override; the other is that Inno Setup Pascal Script doesn't support method overriding as such.

The only reliable workaround I can think of is to RY (from DRY), by separating event methods from your common code.

其他提示

Have a look at the ISD specification, which is a suggested method of laying out custom wizard page code in a highly modular and reusable fashion.

It's not generally applicable to all event functions, but it might help you with NextButtonClick and other related page events, at least.

(I actually have some code that helps out with merging other event functions somewhat, but it's not really ready for public use yet.)

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top