Jump to content
WalkingAway

Spring4D + DSharp = RAD Alexandria

Recommended Posts

Maybe Stefan can give some hint how to proceed.

 

In some old project (RAD Berlin) I have used Spring4D + DSharp - - both 1.2.1 (and then DDuce's ListDataSource for showing data in GUI). Working well.

 

In modern RAD Alexandria I'm using Spring4D (generally for lists and dep.inj.). But I'm not able to compile DSharp anymore. Only Spring4D 1.2.1 + DSharp 1.2.1 give that pair to compile. But anyway it is not possible to install DSharp designtime packages for binding (it is my goal - to use DSarp as binding library), Delphi throw always "Invalid pointer operation" as long as DSharp.Bindings used in use clause. Can't fix it.

 

Seems like DSarp discontinued or depricated. I can't find version for Alexandria.

Actually, ListDataSource from DDuce was removed as depricated, and I have not noticed that in Spring there is similar feature - Spring.Persistence.ObjectDataSet or something similar.
So I can probably do the same in pure Spring4d library - bind my own list of class (let say TList<TMySettings>) to bidirectionally binding to grid as ordinary dataset.

 

Thanks in advance.

Share this post


Link to post
4 hours ago, WalkingAway said:

Seems like DSarp discontinued or depricated. I can't find version for Alexandria.

I asked Stefan this question a year ago. This was his answer. We can only hope that he will find the time to do this.

 

With best regards

Thomas

Share this post


Link to post

Some debug info.

Here is error in this line, "TRttiNamedObject.Name" is nil (abstract error).

 

image.thumb.png.c7740c01a9ae36ee8a2af9a40ef727fc.png

Probably this is the key difference (new method in Alexandria) and cause of abstract error , but I'm not able to correct this:

image.thumb.png.99ce99f84c6aabce6e8699bcf1e24072.png

 

In Rio working as well both libraries.

Hope, maybe some day DSharp will be compatible with Springs 2.

Share this post


Link to post
if LMethod.IsClassMethod and LMethod.IsStatic then
    begin
      {$IF CompilerVersion >= 35}
      if not Assigned(FGetter) and (LMethod.MethodKind = mkClassFunction)
        and LMethod.HasName('Get' + FDependencyProperty.Name) then
      {$ELSE}
      if not Assigned(FGetter) and (LMethod.MethodKind = mkClassFunction)
        and SameText(LMethod.Name, 'Get' + Name) then
      {$IFEND}

This work for me.

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

×