View Full Version : No answer about compiler bug.

07-23-2002, 11:52 AM
Why InstallShield keep silent (two years since IS6x & IS7x) about embarrassing compiler bug ?? (See Document "The full scoop on InstallScript Structures" from Rajesh Ramachandran at installsite for detail)

My project is very complex and need use Typedef structures as follows:

string szUserName[21];
string szPassword[21];
string szLanguageTag[2];
string szDatabasePath[256];
bool bMergeStatus;


string szAppName[10];
string szRootPathOfDatabase[256]

_DATABASE_CAT pDBLanguage(10); //<----- nested 2

typedef TOOL_CAT

string ToolName[30];
string ExePath[256];
number nToolCode;

_APPLICATION_CAT pApplication(50); //<------ nested 1


TOOL_CAT pTool(5); // <--- base array

Then I need access to each member of nested strutures,

for i = 0 to 4

pTool(i).ToolName = ... ;

for j = 0 to 49

pTool(i).pApplication(j).AppName = ... ;

for k = 0 to 9
pTool(i).pApplication(j).pDBLanguage(k).szUserName= ...
pTool(i).pApplication(j).pDBLanguage(k).szPassword = ...



The compiler say nothing but at run time I get:
"ERROR 0x80040706 : Objet Reference Not Set"

Rajesh Ramachandran (old Installshield developer) say :

[This would compile fine BUT when you try to access the member of any of the array element an exception will be thrown in script. This is because the compiler treats the declaration "TYPEDEFNAME pAlias(100)" as "object pAlias(100)"

The scripting engine would thus create an array of 100 object references to NOTHING! It is obviously a bug in the compiler to pass through such declarations. Expect this to be fixed in a future maintenance release.]

The workaround included in her document don't work in this case and using multiple LIST for replacing arrays is to complex to maintain the script, the ideal solution for me is referencing all individual elements using member operator and nested arrays of structures.

I don't expect all to be perfect, ISD7 seems to be a good product but why this very useful isscript way is not fully functional like other languages ???

Some similar threads (a few months ago such as "Structure containing array" posted by DUCAN 02-20-2002 and more older in IS6.X forum) are still without answer !!!

Please, this will be solved in the next maintenance release ???

Thank you for your answer.