Skip to content

Conversation

@dscho
Copy link
Contributor

@dscho dscho commented Nov 12, 2025

911edd7 (Resize before page initialization., 2025-10-23) changed the signature, but did not adjust the documentation.

911edd7 (Resize before page initialization., 2025-10-23) changed the
signature, but did not adjust the documentation.

Signed-off-by: Johannes Schindelin <[email protected]>
@martijnlaan martijnlaan merged commit e7820fd into jrsoftware:main Nov 12, 2025
1 check passed
@martijnlaan
Copy link
Member

Thanks Johannes!

dscho added a commit to git-for-windows/build-extra that referenced this pull request Nov 12, 2025
The signature of the `CreateCustomForm()` function changed. See also
jrsoftware/issrc#573.

Signed-off-by: Johannes Schindelin <[email protected]>
@dscho dscho deleted the fix-createcustomform-documentation branch November 12, 2025 15:10
@dscho
Copy link
Contributor Author

dscho commented Nov 13, 2025

You're welcome!

I had an idea: Do you think it would be possible to add defaults for those new parameters for backwards-compatibility (so that existing .iss files that use CreateCustomForm() without arguments continue to work)?

@martijnlaan
Copy link
Member

I’m not sure which script would benefit from that change, even if having such defaults were possible. Every script would need to set at least one of these values, right? Prior to version 6.6, this was accomplished by setting properties after calling CreateCustomForm. However, those properties are now read-only, since CreateCustomForm itself now requires these values up front.

So even if there was a CreateCustomForm without arguments, the script would still break because it would try to set read-only properties.

Are you suggesting that you think there were scripts which called CreateCustomForm without setting any of the four properties? Or perhaps that this was the case for your own script?

@dscho
Copy link
Contributor Author

dscho commented Nov 13, 2025

So even if there was a CreateCustomForm without arguments, the script would still break because it would try to set read-only properties.

Hmm. I had not thought about that. It's just a little sad that existing .iss scripts have to be updated just to get the benefits of the new version...

@martijnlaan
Copy link
Member

Yes, I agree and always aim to maintain backward compatibility whenever possible, but I did not see a good way to achieve that in this case. When you start using features like CreateCustomForm, you get closer to the internal workings.

The change should be straightforward though. Should the help file explain more?

@dscho
Copy link
Contributor Author

dscho commented Nov 14, 2025

Should the help file explain more?

Maybe an example could help, something like:

  • The signature of the CreateCustomForm function has changed in InnoSetup v6.6.0, it now requires the width and height to be specified upfront (they are now read-only properties once the form is constructed). That is, if your code looked like this before:

    Form:=CreateCustomForm;
    Form.Caption:='My custom form';
    Form.ClientWidth:=ScaleX(500);
    Form.ClientHeight:=ScaleY(256);

    starting with InnoSetup v6.6.0, it needs to look like this instead:

    Form:=CreateCustomForm(ScaleX(500), ScaleY(256), False, False);
    Form.Caption:='My custom form';

martijnlaan added a commit that referenced this pull request Nov 14, 2025
@martijnlaan
Copy link
Member

Thanks 👍

@dscho
Copy link
Contributor Author

dscho commented Nov 14, 2025

@martijnlaan
Copy link
Member

I’ve updated it now. You might need to force refresh by holding Shift.

@dscho
Copy link
Contributor Author

dscho commented Nov 14, 2025

I’ve updated it now. You might need to force refresh by holding Shift.

Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants