In order for this site to work correctly we need to store a small file (called a cookie) on your computer. Most every site in the world does this, however since the 25th of May 2011, by law we have to get your permission first. Please abandon the forum if you disagree.
Para que este foro funcione correctamente es necesario guardar un pequeño fichero (llamado cookie) en su ordenador. La mayoría de los sitios de Internet lo hacen, no obstante desde el 25 de Marzo de 2011 y por ley, necesitamos de su permiso con antelación. Abandone este foro si no está conforme.
Para que este foro funcione correctamente es necesario guardar un pequeño fichero (llamado cookie) en su ordenador. La mayoría de los sitios de Internet lo hacen, no obstante desde el 25 de Marzo de 2011 y por ley, necesitamos de su permiso con antelación. Abandone este foro si no está conforme.
Something strange happens with the TOptionList:aItems
- Dionisis Divaris
- Mensajes: 485
- Registrado: Jue Jul 12, 2007 8:48 pm
- Ubicación: Athens Greece
Something strange happens with the TOptionList:aItems
Hello Jose , Ignacio
Something strange happens with the TOptionList:aItems Property.
In the include sample try the following when compiled.
1st- Press the first button to insert 4 new Items in the OptionList.
2nd- Press the other button to delete the 4 inserted Items
As you can see the MsgInfo Box inform us with the correct array (aItems)
length. But when going to delete those 4 inserted items only the 1st and 3rd
items
deleted only.
What happens am i missing something??
Regards
Dionisis
Attached files Bulk.rar (1.9 KB)Â
Something strange happens with the TOptionList:aItems Property.
In the include sample try the following when compiled.
1st- Press the first button to insert 4 new Items in the OptionList.
2nd- Press the other button to delete the 4 inserted Items
As you can see the MsgInfo Box inform us with the correct array (aItems)
length. But when going to delete those 4 inserted items only the 1st and 3rd
items
deleted only.
What happens am i missing something??
Regards
Dionisis
Attached files Bulk.rar (1.9 KB)Â
Something strange happens with the TOptionList:aItems
Dionisis,
Here you are what you wanted to do. Look at method itemsdeletion.
Regards,
José Luis Capel
Dionisis Divaris escribió:
> Hello Jose , Ignacio
>
> Something strange happens with the TOptionList:aItems Property.
>
> In the include sample try the following when compiled.
>
> 1st- Press the first button to insert 4 new Items in the OptionList.
> 2nd- Press the other button to delete the 4 inserted Items
>
> As you can see the MsgInfo Box inform us with the correct array (aItems)
> length. But when going to delete those 4 inserted items only the 1st and 3rd
> items
> deleted only.
>
> What happens am i missing something??
>
>
> Regards
> Dionisis
>
>
>
--
Here you are what you wanted to do. Look at method itemsdeletion.
Regards,
José Luis Capel
Dionisis Divaris escribió:
> Hello Jose , Ignacio
>
> Something strange happens with the TOptionList:aItems Property.
>
> In the include sample try the following when compiled.
>
> 1st- Press the first button to insert 4 new Items in the OptionList.
> 2nd- Press the other button to delete the 4 inserted Items
>
> As you can see the MsgInfo Box inform us with the correct array (aItems)
> length. But when going to delete those 4 inserted items only the 1st and 3rd
> items
> deleted only.
>
> What happens am i missing something??
>
>
> Regards
> Dionisis
>
>
>
--
Something strange happens with the TOptionList:aItems
Dionisis,
Here you are what you wanted to do. Look at method itemsdeletion.
Regards,
José Luis Capel
Dionisis Divaris escribió:
> Hello Jose , Ignacio
>
> Something strange happens with the TOptionList:aItems Property.
>
> In the include sample try the following when compiled.
>
> 1st- Press the first button to insert 4 new Items in the OptionList.
> 2nd- Press the other button to delete the 4 inserted Items
>
> As you can see the MsgInfo Box inform us with the correct array (aItems)
> length. But when going to delete those 4 inserted items only the 1st and 3rd
> items
> deleted only.
>
> What happens am i missing something??
>
>
> Regards
> Dionisis
>
>
>
--
Here you are what you wanted to do. Look at method itemsdeletion.
Regards,
José Luis Capel
Dionisis Divaris escribió:
> Hello Jose , Ignacio
>
> Something strange happens with the TOptionList:aItems Property.
>
> In the include sample try the following when compiled.
>
> 1st- Press the first button to insert 4 new Items in the OptionList.
> 2nd- Press the other button to delete the 4 inserted Items
>
> As you can see the MsgInfo Box inform us with the correct array (aItems)
> length. But when going to delete those 4 inserted items only the 1st and 3rd
> items
> deleted only.
>
> What happens am i missing something??
>
>
> Regards
> Dionisis
>
>
>
--
Something strange happens with the TOptionList:aItems
Dionisis,
> Something strange happens with the TOptionList:aItems Property.
>
> In the include sample try the following when compiled.
>
> 1st- Press the first button to insert 4 new Items in the OptionList.
> 2nd- Press the other button to delete the 4 inserted Items
>
> As you can see the MsgInfo Box inform us with the correct array (aItems)
> length. But when going to delete those 4 inserted items only the 1st and
> 3rd
> items
> deleted only.
>
> What happens am i missing something??
The problem is that in the second pass, there is only 3 items left, and the
second item is the original third one. Let's see each iteration (all items
are named by its original pos):
# items item to delete items left
--- ------ -------------- ---------
1 1,2,3,4 1 2,3,4
2 2,3,4 3 2,4
3 3,4 - 2,4
4 4 - 2,4
The correct way to delete the desired items is doing it in reverse order,
that is: FOR n := Len( :aItems ) TO 1 STEP -1
Or like Jose Luis has just pointed: WHILE Len( :aItems ) > 0 ; and deleting
the first item in each iteration.
--
Regards,
Jose F. Gimenez
> Something strange happens with the TOptionList:aItems Property.
>
> In the include sample try the following when compiled.
>
> 1st- Press the first button to insert 4 new Items in the OptionList.
> 2nd- Press the other button to delete the 4 inserted Items
>
> As you can see the MsgInfo Box inform us with the correct array (aItems)
> length. But when going to delete those 4 inserted items only the 1st and
> 3rd
> items
> deleted only.
>
> What happens am i missing something??
The problem is that in the second pass, there is only 3 items left, and the
second item is the original third one. Let's see each iteration (all items
are named by its original pos):
# items item to delete items left
--- ------ -------------- ---------
1 1,2,3,4 1 2,3,4
2 2,3,4 3 2,4
3 3,4 - 2,4
4 4 - 2,4
The correct way to delete the desired items is doing it in reverse order,
that is: FOR n := Len( :aItems ) TO 1 STEP -1
Or like Jose Luis has just pointed: WHILE Len( :aItems ) > 0 ; and deleting
the first item in each iteration.
--
Regards,
Jose F. Gimenez
Something strange happens with the TOptionList:aItems
Dionisis,
> Something strange happens with the TOptionList:aItems Property.
>
> In the include sample try the following when compiled.
>
> 1st- Press the first button to insert 4 new Items in the OptionList.
> 2nd- Press the other button to delete the 4 inserted Items
>
> As you can see the MsgInfo Box inform us with the correct array (aItems)
> length. But when going to delete those 4 inserted items only the 1st and
> 3rd
> items
> deleted only.
>
> What happens am i missing something??
The problem is that in the second pass, there is only 3 items left, and the
second item is the original third one. Let's see each iteration (all items
are named by its original pos):
# items item to delete items left
--- ------ -------------- ---------
1 1,2,3,4 1 2,3,4
2 2,3,4 3 2,4
3 3,4 - 2,4
4 4 - 2,4
The correct way to delete the desired items is doing it in reverse order,
that is: FOR n := Len( :aItems ) TO 1 STEP -1
Or like Jose Luis has just pointed: WHILE Len( :aItems ) > 0 ; and deleting
the first item in each iteration.
--
Regards,
Jose F. Gimenez
> Something strange happens with the TOptionList:aItems Property.
>
> In the include sample try the following when compiled.
>
> 1st- Press the first button to insert 4 new Items in the OptionList.
> 2nd- Press the other button to delete the 4 inserted Items
>
> As you can see the MsgInfo Box inform us with the correct array (aItems)
> length. But when going to delete those 4 inserted items only the 1st and
> 3rd
> items
> deleted only.
>
> What happens am i missing something??
The problem is that in the second pass, there is only 3 items left, and the
second item is the original third one. Let's see each iteration (all items
are named by its original pos):
# items item to delete items left
--- ------ -------------- ---------
1 1,2,3,4 1 2,3,4
2 2,3,4 3 2,4
3 3,4 - 2,4
4 4 - 2,4
The correct way to delete the desired items is doing it in reverse order,
that is: FOR n := Len( :aItems ) TO 1 STEP -1
Or like Jose Luis has just pointed: WHILE Len( :aItems ) > 0 ; and deleting
the first item in each iteration.
--
Regards,
Jose F. Gimenez
Something strange happens with the TOptionList:aItems
Dionisis,
excuse me. The correct iteration map is:
# items item to delete items left
--- ------ -------------- ---------
1 1,2,3,4 1 2,3,4
2 2,3,4 3 2,4
At this point, Len( :aItems ) = 2, and the FOR statement ends.
--
Regards,
Jose F. Gimenez
excuse me. The correct iteration map is:
# items item to delete items left
--- ------ -------------- ---------
1 1,2,3,4 1 2,3,4
2 2,3,4 3 2,4
At this point, Len( :aItems ) = 2, and the FOR statement ends.
--
Regards,
Jose F. Gimenez
Something strange happens with the TOptionList:aItems
Dionisis,
excuse me. The correct iteration map is:
# items item to delete items left
--- ------ -------------- ---------
1 1,2,3,4 1 2,3,4
2 2,3,4 3 2,4
At this point, Len( :aItems ) = 2, and the FOR statement ends.
--
Regards,
Jose F. Gimenez
excuse me. The correct iteration map is:
# items item to delete items left
--- ------ -------------- ---------
1 1,2,3,4 1 2,3,4
2 2,3,4 3 2,4
At this point, Len( :aItems ) = 2, and the FOR statement ends.
--
Regards,
Jose F. Gimenez
- Dionisis Divaris
- Mensajes: 485
- Registrado: Jue Jul 12, 2007 8:48 pm
- Ubicación: Athens Greece
Something strange happens with the TOptionList:aItems
Understood 100%
Many thanks to all of you
Regards
Dionisis
Ï "Jose F. Gimenez" <jfgimenez@wanadoo.es> Ýãñáøå óôï ìÞíõìá
news:44340c73$[email=1@ozsrvnegro.ozlan.local...]1@ozsrvnegro.ozlan.local...[/email]
> Dionisis,
>
> excuse me. The correct iteration map is:
>
> # items item to delete items left
> --- ------ -------------- ---------
> 1 1,2,3,4 1 2,3,4
> 2 2,3,4 3 2,4
>
> At this point, Len( :aItems ) = 2, and the FOR statement ends.
>
> --
> Regards,
>
> Jose F. Gimenez
>
Many thanks to all of you
Regards
Dionisis
Ï "Jose F. Gimenez" <jfgimenez@wanadoo.es> Ýãñáøå óôï ìÞíõìá
news:44340c73$[email=1@ozsrvnegro.ozlan.local...]1@ozsrvnegro.ozlan.local...[/email]
> Dionisis,
>
> excuse me. The correct iteration map is:
>
> # items item to delete items left
> --- ------ -------------- ---------
> 1 1,2,3,4 1 2,3,4
> 2 2,3,4 3 2,4
>
> At this point, Len( :aItems ) = 2, and the FOR statement ends.
>
> --
> Regards,
>
> Jose F. Gimenez
>
- Dionisis Divaris
- Mensajes: 485
- Registrado: Jue Jul 12, 2007 8:48 pm
- Ubicación: Athens Greece
Something strange happens with the TOptionList:aItems
Understood 100%
Many thanks to all of you
Regards
Dionisis
Ï "Jose F. Gimenez" <jfgimenez@wanadoo.es> Ýãñáøå óôï ìÞíõìá
news:44340c73$[email=1@ozsrvnegro.ozlan.local...]1@ozsrvnegro.ozlan.local...[/email]
> Dionisis,
>
> excuse me. The correct iteration map is:
>
> # items item to delete items left
> --- ------ -------------- ---------
> 1 1,2,3,4 1 2,3,4
> 2 2,3,4 3 2,4
>
> At this point, Len( :aItems ) = 2, and the FOR statement ends.
>
> --
> Regards,
>
> Jose F. Gimenez
>
Many thanks to all of you
Regards
Dionisis
Ï "Jose F. Gimenez" <jfgimenez@wanadoo.es> Ýãñáøå óôï ìÞíõìá
news:44340c73$[email=1@ozsrvnegro.ozlan.local...]1@ozsrvnegro.ozlan.local...[/email]
> Dionisis,
>
> excuse me. The correct iteration map is:
>
> # items item to delete items left
> --- ------ -------------- ---------
> 1 1,2,3,4 1 2,3,4
> 2 2,3,4 3 2,4
>
> At this point, Len( :aItems ) = 2, and the FOR statement ends.
>
> --
> Regards,
>
> Jose F. Gimenez
>