Hello, friends.
I've been programming in Lazarus for several months and recently discovered the tiOPF framework
[http://tiopf.sourceforge.net]. As it turned out, this is a difficult job. On the Internet, there is very little documentation and step-by-step examples.
It's very difficult for me to study this framework, so I decided to create this topic so that people can also learn this.
I have a few questions that I will ask here:
FirstI downloaded tiOPF v2.5.x by saving the repository snapshot from Sourceforge. Then, after studying, I created a TStreet class containing only one property -
Name. Next, I created a container for
TStreet, calling it
TStreetsList, inheriting it from
TTiObjectList. I set up the creation, deletion, updating and reading from the database with the help of visitors, as it was written in the examples.
But there is a problem. If you add objects to TStreetsList, they are of course automatically saved in the database (this is correct). But by changing objects, they are not saved!
I had to do
fStreet.ObjectState := posEmpty before saving, and it's messy. How can I make it work properly? Also I checked the
OneToMany example and as it turned out, it also does not save changes (except for adding) to the database automatically.
SecondI'm very interested in working with mediators for TComboBox. How to bind an enumerated type to it?
ThirdAlso about the mediator for
TVirtualStringTree. There is one working sample in the <tiopf>/Quarantine/ folder, but there is absolutely no documentation for it.