Jump to content

LiveBindings for TComponent

Recommended Posts

Hey everyone,


I'm trying to use LiveBindings designer for connecting my Node components (TComponent) to each other (unidirectional).


So I'm building a package with those components and followed the instructions on documentation, here: http://docwiki.embarcadero.com/RADStudio/Sydney/en/Tutorial:_Creating_LiveBindings-Enabled_Components


+ I'm overwriting CanObserve() and ObserverAdded() methods in basis node class

+ I'm calling Data.Bind.Components.RegisterObservableMember() for each property

+ I've set attributes with [ObservableMember('...')]

+ I've set all read-only (output) and write-only (input) to the same type "TComponentName" (because object types are not possible in LB designer)


But now I'm struggling with problems:

+ for example: a connections between TAttributeShaderNode.Output -> TMulShaderNode.Left ... OR a connections TTexture2DShaderNode.Output -> TPixelOutputShaderNode.Input ... are forbidden

+ registered properties are not visible by default: i have to explicitly select them


Does anyone have experiences in building components for live bindings usage?

Can that even be solved?


I attached the source code file.



Share this post

Link to post


I just made a simple attempt that I reported in this (sorry french) tutorial https://serge-girard.developpez.com/tutoriels/Delphi/Livebindings/Composant_A/  hope, this help.

But I got stuck writing another more complex one for a radiogroupbox, my guess : I need to define a somewhat converter. 

Alas, my various professional obligations make me constantly postpone the realization of the latter.


Share this post

Link to post

Thank you very much for the tutorial link. 

I seems I did all the basic stuff, you've mentioned there.


Except the idea with a converter. Could be worth a try! 👍

Even if it seems illogical to me, because all is of the same data type.

Share this post

Link to post
5 hours ago, fcknbstrd said:

Even if it seems illogical to me, because all is of the same data type. 

Yes agree, but when I wrote my radiogroupbox every time I wanted  to link the item value (text value)  it was written to radiogroupbox.text :classic_angry: 

The only track I saw was the 'somewhat' converter but never went so far.

Share this post

Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now