Page 1 of 1

How to use a added field in scripts

Posted: 2010-09-13 23:47:04
by tbp
Hi,

I have added a new text field (EFileName) in the FrmMovie Frame like the other fields.
Now I want to use this field in a script. It seems that I have to go over fieldFileName to get access. I tried to copy and modify the fieldOriginalTitle and strOrigignalTitle parts in the source Code.

But now I get to constant-errors:
One in movieclass.pas - function TMovie.GetFieldValue
ant the other one in movieclass.pas - procedure TMovie.SetFieldValue

I defined fieldFileName = 32; in fields.pas

Would be nice if someone could help me
Greetings
Thorben

Posted: 2010-09-14 09:49:16
by antp
What are the errors?
Did you also modify fieldCount, which is used to know how many fields there are?
Why 32? Last field is 30 (fieldDisks) so if you just add one it should be nr 31.

Posted: 2010-09-14 18:15:00
by tbp
Ok, i thought fieldCount was a field too ;-)

With fieldFileName = 31 and fieldCount = 32 I can now start the application but now I got a "list-index over Maximum (31)" during splash-screen.
So "ApplyLanguage;" (triggerd by "TMainWindow.FormShow") cause the error in the "Caption := Strings;" line.


I also get an access violation if I try to add a movie to the Listview.

Posted: 2010-09-14 19:40:37
by antp
You have to update the list of fields labels too.
On MainWindow there is a component :

Image

Posted: 2010-09-14 20:22:28
by tbp
thx. Now everything works fine.