RDD architecture

We encourage new members to introduce themselves here. Get to know one another and share your interests.
Post Reply
antonello.negrone
Posts: 22
Joined: Tue May 03, 2016 8:57 am
Location: Italy

RDD architecture

Post by antonello.negrone »

Hi!

I'm beginning to dig into the X# architecture writing a new class SPECDX into the XSharp.RDD namespace, but I can't get the debugger to reach the breakpoint inside it.
It seems it can't load the assembly, because writing anything else "SPECDX" gives the same error:

Code: Select all

DbUseArea(TRUE, "SPECDX", "ANAFRN",, TRUE)
this error raises:
System.NullReferenceException
Riferimento a un oggetto non impostato su un'istanza di oggetto.

Callstack :
BasicForm.System.Void BasicForm..ctor()() : E:DEVELOPXIDE-ProjectsProject1ApplicationsTestSpePrgForm1.prg : 30
static Int32 FormApp1.Exe.Functions.Start(System.String[] asCmdLine)() : E:DEVELOPXIDE-ProjectsProject1ApplicationsTestSpePrgStart.prg : 18
The RDD is declared as follows and the methods are still empty, there is only the skeleton, compiled into a SPECDX.DLL assembly:

Code: Select all

USING XSharp.RDD      
USING XSharp.RDD.Enums
USING XSharp.RDD.Support
USING System.Collections.Generic
USING SpeClient

BEGIN NAMESPACE XSharp.RDD
CLASS SPECDX INHERIT workarea IMPLEMENTS IRdd

METHOD DbEval(info AS XSharp.RDD.Support.DbEvalInfo) AS LOGIC
RETURN FALSE

METHOD GoTop( ) AS LOGIC
RETURN FALSE

METHOD GoBottom( ) AS LOGIC
RETURN FALSE

METHOD GoTo(nRec AS INT) AS LOGIC
RETURN FALSE

METHOD GoToId(oRec AS OBJECT) AS LOGIC
RETURN FALSE
....others.....
PROPERTY RecId AS OBJECT GET NULL

PROPERTY RecNo AS INT GET 0

PROPERTY Shared AS LOGIC GET FALSE


END CLASS
END NAMESPACE
The RDD and the test app are inside the same project, and the DLL and EXE in the same folder, but maybe I'm missing something.

What I can try to do?
TIA
User avatar
wriedmann
Posts: 3644
Joined: Mon Nov 02, 2015 5:07 pm
Location: Italy

RDD architecture

Post by wriedmann »

Ciao Antonello,
maybe this helps:

Code: Select all

RegisteredRDD.Add(RegisteredRDD{"SPECDX", typeof(SPECDX)})
This should register your class as new RDD.
Wolfgang
P.S. to be honest, I know very little things about the RDD architecture. This code is copied from source Robert has passed to me
Wolfgang Riedmann
Meran, South Tyrol, Italy
wolfgang@riedmann.it
https://www.riedmann.it - https://docs.xsharp.it
User avatar
robert
Posts: 4225
Joined: Fri Aug 21, 2015 10:57 am
Location: Netherlands

RDD architecture

Post by robert »

Antonello,

Wolfgang is right about registering the RDD.
And since you seem to be the first one to actually implement an X# RDD outside of the devteam, it may be a good idea to switch this to direct (email ?) communication between you and me. There may be more "loose ends" in there or things that need to be documented better.

Robert
XSharp Development Team
The Netherlands
robert@xsharp.eu
antonello.negrone
Posts: 22
Joined: Tue May 03, 2016 8:57 am
Location: Italy

RDD architecture

Post by antonello.negrone »

Ciao Wolfgang,

this helped to go further.

Thank you!
antonello.negrone
Posts: 22
Joined: Tue May 03, 2016 8:57 am
Location: Italy

RDD architecture

Post by antonello.negrone »

Robert,
thank you. I will take your advice :-)
Post Reply