Home > Ngoprek > Inconsistent Index Start

Inconsistent Index Start

The Index property is usually used in a collection object and its descendants, it used to access the collection member (TCollectionItem). Each TCollectionItem is indexed in the Items array of the TCollection to which it belongs. The Index property of the TCollectionItem contains the item’s index value in that array. Read the value of Index to determine the collection item’s position. Set the value of Index to move the collection item to a new position.

Most of Index number started from 0, but there are still objects / properties start the index from 1. I accidently found that FilterIndex property of TOpenDialog and TSaveDialog object are started at 1 not 0. This inconsistent numbering make me confused for a while because the routine did not run as I expected. 😀

Categories: Ngoprek
  1. No comments yet.
  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: