View Issue Details

IDProjectCategoryView StatusLast Update
0016367LazarusLCLpublic2010-10-21 19:03
ReporterZeljan RikaloAssigned ToFelipe Monteiro de Carvalho 
PrioritynormalSeverityminorReproducibilityalways
Status closedResolutionfixed 
Product VersionProduct Build 
Target VersionFixed in Version0.9.29 (SVN) 
Summary0016367: TListView.ItemIndex should not be published property
DescriptionAccording to embarcadero docs ItemIndex is public, so should be removed from published.
http://docs.embarcadero.com/products/rad_studio/radstudio2007/RS2007_helpupdates/HUpdate4/EN/html/delphivclwin32/!!MEMBEROVERVIEW_ComCtrls_TListView.html
TagsNo tags attached.
Fixed in Revision27800
LazTarget-
Widgetset
Attached Files

Activities

Felipe Monteiro de Carvalho

2010-08-05 15:50

developer   ~0040002

Why? Compatibility is providing at least what Delphi provides, not limiting ourselves to it.

If we provide more published properties we are still compatible.

theo

2010-08-05 18:13

reporter   ~0040006

A problem here is that it doesn't really work.
After changing view style and or columns (don't know the steps to reproduce), I get a runtime error:
Error reading ListView1.ItemIndex: Index 0 out of bounds

#0 fpc_raiseexception at :0
0000001 CLASSES_TREADER_$__READPROPERTY$TPERSISTENT at :0
0000002 CLASSES_TREADER_$__READDATA$TCOMPONENT at :0
0000003 CLASSES_TCOMPONENT_$__READSTATE$TREADER at :0
0000004 TCONTROL__READSTATE(0xb70c7260, <error reading variable>) at ./include/control.inc:3150
0000005 CLASSES_TREADER_$__READCOMPONENT$TCOMPONENT$$TCOMPONENT at :0
0000006 CLASSES_TREADER_$__READDATA$TCOMPONENT at :0
0000007 CLASSES_TCOMPONENT_$__READSTATE$TREADER at :0
0000008 TCONTROL__READSTATE(0xb70c7260, <error reading variable>) at ./include/control.inc:3150
0000009 CLASSES_TREADER_$__READROOTCOMPONENT$TCOMPONENT$$TCOMPONENT at :0
0000010 INITCOMPONENT(<incomplete type>, 0xbfffed90) at lresources.pp:3043
0000011 INITLAZRESOURCECOMPONENT(0xb71eabe0, <incomplete type>) at lresources.pp:3063
0000012 INITRESOURCECOMPONENT(0xb71eabe0, <incomplete type>) at lresources.pp:760
0000013 TCUSTOMFORM__CREATE(0xb71ef020, 0x0, <error reading variable>) at ./include/customform.inc:1902
0000014 TFORM__CREATE(0xb71ef020, 0x1, <error reading variable>) at ./include/customform.inc:2862
0000015 TAPPLICATION__CREATEFORM(<incomplete type>, void, <error reading variable>) at ./include/application.inc:2078
0000016 main at project1.lpr:17

theo

2010-08-05 18:27

reporter   ~0040007

Attached is a project with only a TListView where I have only changed ViewStyle, Items and Columns in the Obj.Insp. After some fiddling, I can't open it anymore.
Lazarus 0.9.29 r26813M FPC 2.4.0 i386-linux-gtk 2 (beta)

2010-08-05 18:28

 

lvbug.zip (128,634 bytes)

Felipe Monteiro de Carvalho

2010-08-10 11:25

developer   ~0040100

It loads if you ignore the error message. It won't display the message anymore if you edit the LRS file and remove the property ItemIndex

theo

2010-08-10 13:43

reporter   ~0040108

Last edited: 2010-08-10 13:44

Of course you can fix it somehow, but it shouldn't happen in the first place.
It probably has to do with the published ItemIndex, that's why I post this here.

Felipe Monteiro de Carvalho

2010-10-21 17:46

developer   ~0041973

I think that the point is that if it is published and the amount of items changes then an exception is raised. To prevent this I made it public as suggested. Some user projects might need adjustments.

Zeljan Rikalo

2010-10-21 19:03

developer   ~0041976

thanks.

Issue History

Date Modified Username Field Change
2010-04-29 16:59 Zeljan Rikalo New Issue
2010-04-29 16:59 Zeljan Rikalo LazTarget => -
2010-08-05 15:50 Felipe Monteiro de Carvalho Note Added: 0040002
2010-08-05 18:13 theo Note Added: 0040006
2010-08-05 18:27 theo Note Added: 0040007
2010-08-05 18:28 theo File Added: lvbug.zip
2010-08-10 11:25 Felipe Monteiro de Carvalho Note Added: 0040100
2010-08-10 13:43 theo Note Added: 0040108
2010-08-10 13:44 theo Note Edited: 0040108
2010-08-10 13:44 theo Note Edited: 0040108
2010-08-13 07:33 Felipe Monteiro de Carvalho Status new => assigned
2010-08-13 07:33 Felipe Monteiro de Carvalho Assigned To => Felipe Monteiro de Carvalho
2010-10-21 17:46 Felipe Monteiro de Carvalho Fixed in Revision => 27800
2010-10-21 17:46 Felipe Monteiro de Carvalho Status assigned => resolved
2010-10-21 17:46 Felipe Monteiro de Carvalho Fixed in Version => 0.9.29 (SVN)
2010-10-21 17:46 Felipe Monteiro de Carvalho Resolution open => fixed
2010-10-21 17:46 Felipe Monteiro de Carvalho Note Added: 0041973
2010-10-21 19:03 Zeljan Rikalo Status resolved => closed
2010-10-21 19:03 Zeljan Rikalo Note Added: 0041976