Solved TD-22689: Constructors do not always work

Report TD 5.x and 6.x bugs and possible workarounds.
bheilscher
Germany
Posts: 55
Joined: 22 May 2018, 08:59
Location: Braunichswalde

TD-22689: Constructors do not always work

Post by bheilscher » 02 Mar 2016, 16:59

Hi,

When a functional class is used for an instance variable of another class and this instance variable is assigned a object created with the new operator, the result is OBJ_Null, if a class constructor with parameters is used.

Code: Select all

Functional Class: CTestClass
   Description: Test Class
   Derived From
   Class Variables
   Instance Variables
      Number: nN1
      Number: nN2
      Number: nN3
   Constructor/Destructor
      Constructor: CTestClass
         Description:
         Parameters
            Number: nN1
            Number: nN2
            Number: nN3
         Local variables
         Actions
            Set this.nN1=nN1
            Set this.nN2=nN2
            Set this.nN3=nN3
   Functions

.......

Functional Class: CTestContainer
   Description: Test Container
   Derived From
   Class Variables
   Instance Variables
      CTestClass: cInstanceVar=OBJ_Null
   Constructor/Destructor
   Functions
      Function: TestClassInstance
         Description:
         Returns
            Boolean:
         Parameters
         Static Variables
         Local variables
         Actions
            Set cInstanceVar=new CTestClass(1,2,3)
            ! cInstanceVar is OBJ_Null
            Return cInstanceVar!=OBJ_Null

The same problem occurs, when a functional class is used as local variable of a function of another class.

Works fine with class constructor without parameters.


Best regards
Bernd
You do not have the required permissions to view the files attached to this post.

Uwe van der Horst
Site Admin
Site Admin
Germany
Posts: 577
Joined: 05 Mar 2017, 14:21
Location: Wetter (Ruhr), Germany

Re: TD-22689: Constructors do not always work

Post by Uwe van der Horst » 03 Mar 2016, 12:10

Hi Bernd,

we have reported this issue as well. Gupta has assigned TD-22689 and scheduled the fix for the 7.0 release.

Regards,
Best regards,
Uwe van der Horst
Advo-web GmbH

wardies
Great Britain
Posts: 86
Joined: 21 Mar 2017, 10:44
Location: UK

Re: TD-22689: Constructors do not always work

Post by wardies » 28 Sep 2016, 15:17

Just got hit by this nasty little bug when trying to refactor code into a set of functional classes.

Has TD-22689 now been fixed in internal versions of TD7.0?

Dave Rabelink
Founder/Site Admin
Founder/Site Admin
Netherlands
Posts: 3321
Joined: 24 Feb 2017, 09:12
Location: Gouda, The Netherlands

Re: TD-22689: Constructors do not always work

Post by Dave Rabelink » 28 Sep 2016, 16:05

I just run the sample in TD 7.0 beta (2) and it seems to be solved.
(all testcases are OK)
Regards,
Dave Rabelink

Image
Articles and information on Team Developer Tips & Tricks Wiki
Download samples, documents and resources from TD Sample Vault
Videos on TDWiki YouTube Channel

Return to “Bug Reports”

Who is online

Users browsing this forum: [Ccbot], aareon_orleans and 1 guest