How to use a added field in scripts

Comments on existing version & Suggestions for future versions. If you want a new feature suggest it here. Discussions about beta versions also come in this section.
Post Reply
tbp
Posts: 4
Joined: 2010-09-13 23:17:26

How to use a added field in scripts

Post 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
antp
Site Admin
Posts: 9665
Joined: 2002-05-30 10:13:07
Location: Brussels
Contact:

Post 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.
tbp
Posts: 4
Joined: 2010-09-13 23:17:26

Post 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.
antp
Site Admin
Posts: 9665
Joined: 2002-05-30 10:13:07
Location: Brussels
Contact:

Post by antp »

You have to update the list of fields labels too.
On MainWindow there is a component :

Image
tbp
Posts: 4
Joined: 2010-09-13 23:17:26

Post by tbp »

thx. Now everything works fine.
Post Reply