malcolmgroves / fluentlivebindings Goto Github PK
View Code? Open in Web Editor NEWSimple library to make creating LiveBindings in code much easier.
Simple library to make creating LiveBindings in code much easier.
Hi,
I made a (short) try with your unit.
Goal this interface :
I had no difficulties for TEdits 👍 surely easy to read than my homemade template to do the same thing :-)
The issue but bang on TLabel (even without expression) "No observer support for TLabel"
and can't see how TListview (Text, detail and dynamic objects ) can be linked.
How can I add expression i.e. my TLabel link expression "Value+' '+dataset.LAST_NAME.text" ?
Don't found anything about linking Fields and Expression thought.
On another hand (Grid), I don't see anything about column linking
My actual runtime binding of a grid (some other templates ,
`procedure TForm1.LiaisonsAuRuntime;
var ABindGrid : TBindGridLink;
begin
ABindGrid:=TBindGridLink.Create(self);
ABindGrid.ControlComponent := Grid1;
ABindGrid.SourceComponent := BindSourceDB1;
with ABindGrid.PosControlExpressions.AddExpression do
begin
ControlExpression := 'Selected';
SourceExpression := 'Math_Max(0,DBUtils_ActiveRecord(Self))';
end;
with ABindGrid.PosSourceExpressions.AddExpression do
begin
ControlExpression := 'Math_Max(1,Selected+1)';
SourceExpression := 'DBUtils_ValidRecNo(Self)';
end;
// columns
with ABindGrid.ColumnExpressions.AddExpression do
begin
ColumnName := 'Column1';
ColumnIndex := 0;
SourceMemberName := 'SS_NUMBER';
with FormatCellExpressions.AddExpression do
begin
ControlExpression := 'Data';
SourceExpression := 'DisplayText'; // oui j'ai gardé le DisplayText
end;
end;
with ABindGrid.ColumnExpressions.AddExpression do
begin
ColumnName := 'Column2';
ColumnIndex := 1;
SourceMemberName := 'FIRST_NAME';
With FormatCellExpressions.AddExpression do
begin
ControlExpression := 'Data';
SourceExpression := 'Value+'#39' '#39'+Dataset.LAST_NAME.text';
end;
end;
end;`
Surely a Fluent way should be more compact !
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.