xsharp.eu • RDD architecture
Page 1 of 1

RDD architecture

Posted: Thu Jun 10, 2021 6:23 am
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

RDD architecture

Posted: Thu Jun 10, 2021 6:49 am
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

RDD architecture

Posted: Thu Jun 10, 2021 7:52 am
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

RDD architecture

Posted: Thu Jun 10, 2021 7:42 pm
by antonello.negrone
Ciao Wolfgang,

this helped to go further.

Thank you!

RDD architecture

Posted: Thu Jun 10, 2021 7:46 pm
by antonello.negrone
Robert,
thank you. I will take your advice :-)