Highlighted
Absent Member.
Absent Member.
757 views

setting properties

Jump to solution

Attached is a simple class and a simple console application. 

if you look at the TPMixed property it is a type String and the private variable that it points to is a String (doesnt' have Type in front of it).  What happens is when you try to set the property the value doesn't hold, in this case a null value is stored (default value for a string) instead of the value passed to the property. 

If you run the attached console application you should see what I mean. 

 

Tags (1)
0 Likes
1 Solution

Accepted Solutions
Highlighted
Micro Focus Expert
Micro Focus Expert

RE: setting properties

Jump to solution

I ran your test using VC 2.2 update 1 and it worked correctly.

I added some display statements after the property sets to show the current values and it displayed 1, 2, 3 as it should have:

          set testObject::TPTypeString to "1"

          set testObject::TPString to "2".

          set testObject::TPMixed to "3".

          display testObject::TPTypeString

          display testObject::TPString

          display testObject::TPMixed

displayed:

1

2

3

Thanks

View solution in original post

0 Likes
1 Reply
Highlighted
Micro Focus Expert
Micro Focus Expert

RE: setting properties

Jump to solution

I ran your test using VC 2.2 update 1 and it worked correctly.

I added some display statements after the property sets to show the current values and it displayed 1, 2, 3 as it should have:

          set testObject::TPTypeString to "1"

          set testObject::TPString to "2".

          set testObject::TPMixed to "3".

          display testObject::TPTypeString

          display testObject::TPString

          display testObject::TPMixed

displayed:

1

2

3

Thanks

View solution in original post

0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.