2

I am trying the LiveBindings in XE3.

I have design a form with some controls using TPrototypeBindSource. The controls are bounds to fields in TPrototypeBindSource using visual designer. I can see the random data on the controls in design time and I am happy with the layout.

Next, I want to hook the UI controls to live data store in TClientDataSet instance. Is there an easy way to do it?

I try the TPrototypeBindSource.OnCreateAdapter event, but I couldn't find a suitable TBindsourceAdapter for TDataset. There is a TBindSourceDB but it is unable to hook to TBindSourceAdapter.

The only solution I found is I have to re-assign the link from TPrototypeBindSource to TBindSourceDB, by doing so will make the random data lost in design time.

Is there any way to make design time using prototype data and runtime using Dataset's data?

Charles
  • 50,943
  • 13
  • 104
  • 142
Chau Chee Yang
  • 18,422
  • 16
  • 68
  • 132
  • You have to reassign the the link by code to get this running. The Prototype intention is for data structures that will only live at runtime (e.g. organized in TList). Data in Datasets can be accessed also at DesignTime, so there is no need to have a Prototype – Sir Rufo Jan 21 '13 at 12:53
  • I design my application in 2 stages. First, the UI layers with prototype data to study it's usability. Second, plug in live data when the UI has confirmed. From time to time, I may back to first stage if there are some modification in between. By hooking the dataset from actual database in development is not that convenient compare to prototype data. – Chau Chee Yang Jan 21 '13 at 13:03

0 Answers0