rsegal
25th March 2003 22:35 UTC
Custom edit box text length
I'm pretty sure text boxes are limited to 1024 characters in INI files for creating custom dialogs in the Modern UI. Is that correct? If so is there a way to add a large block of text, say 4000+ characters to a text box on a custom dialog page?
kichik
26th March 2003 13:34 UTC
In 2.0b3 text boxes are limited to 4096 characters. NSIS variables are limited to 1024.
To change the IO limit edit:
static char szResult[4096];
in Contrib\InstallOptions\InstallerOptions.cpp and recompile.
To change the NSIS variable limit edit:
#define NSIS_MAX_STRLEN 1024
in Source\exehead\config.h and recompile.
rsegal
26th March 2003 22:14 UTC
Thanks kichik, I'll give that a try.
bSecRes
16th July 2003 16:28 UTC
"// NSIS_MAX_STRLEN defines the maximum string length for internal variables
// and stack entries. 1024 should be plenty, but if you are doing crazy registry
// shit, you might want to bump it up. Generally it adds about 16-32x the memory,
// so setting this to 4096 from 1024 will add around 64k of memory usage (not
// really a big deal, but not usually needed)."
What about going higher, say to 8192? I need to process an entire list of windows domain users... they get long fast. Can text boxes go that high as well? Is there any chance some of the functions don't use NSIS_MAX_STRLEN, I'd hate to find my file read/write functions break or that MUI_INSTALLOPTIONS_READ can't deal with it. What are the potential/probable pitfalls of changing these values?
kichik
16th July 2003 17:10 UTC
The only pitfall of changing this value is more memory usage.
Everything uses it, you can't escape it. But FileWrite can be called multiple times and so can FileRead, so they don't pose any problem.