S
Sonnich Jensen
Hi
I found a problem in out SW, which basically is:
for 0 to something (right now 15) do:
whatever.Groups[i / 16].Items.Add();
whatever.Groups[i / 16].Items[i % 16].Text = "whatever";
whatever.Groups[i / 16].Items[i % 16].Caption = "whatever";
Now, how odd it may sound, it might try to fill more than I have
The items are a collection base, where it works as:
public _our_component_class Items
{
get { return items; }
}
and
public _our_component_class this[int index]
{
get { return (_our_component_class)List[index]; } // crashes here if we have less items than asked for
set { List[index] = value; }
}
Now, I can add automatically, but is there a better way to simply ignore remaining "inputs"
I know there are prober solutions, but rewriting all the software from anyone in this company it really not an option... so a hack here seems to be the best
I my current config there are 12 items in a group, so when it asks for 12-15 it will fail.
WBR
Sonnich
I found a problem in out SW, which basically is:
for 0 to something (right now 15) do:
whatever.Groups[i / 16].Items.Add();
whatever.Groups[i / 16].Items[i % 16].Text = "whatever";
whatever.Groups[i / 16].Items[i % 16].Caption = "whatever";
Now, how odd it may sound, it might try to fill more than I have
The items are a collection base, where it works as:
public _our_component_class Items
{
get { return items; }
}
and
public _our_component_class this[int index]
{
get { return (_our_component_class)List[index]; } // crashes here if we have less items than asked for
set { List[index] = value; }
}
Now, I can add automatically, but is there a better way to simply ignore remaining "inputs"
I know there are prober solutions, but rewriting all the software from anyone in this company it really not an option... so a hack here seems to be the best
I my current config there are 12 items in a group, so when it asks for 12-15 it will fail.
WBR
Sonnich