Welcome, Guest
Username: Password: Remember me
  • Page:
  • 1

TOPIC: Custom Type Definition Question and Possible Issue

Custom Type Definition Question and Possible Issue 3 years 4 weeks ago #10975

  • AutoMate
  • AutoMate's Avatar
  • OFFLINE
  • Expert Boarder
  • Posts: 159
  • Thank you received: 5
  • Karma: 1
Question:
Does Proview 5.5 support use of a custom enumeration Type definition referenced by more than one custom class object?

Question 2:
If the answer to Question 1 is yes, is there an obvious configuration mistake?

Background:
A custom enumeration type definition is built and attached to a single custom class object and works perfectly. When a second custom class definition is created with an internal parameter referencing the same custom enumeration type, a runtime issue is encountered. In development mode, all seems to work fine. But, in run-time, an enumerated value cannot be selected. And, associated C program does not run to completion. Although, there are no compile or link errors.

Attached file: steam.wb_load shows the custom type definition and two different custom class objects that reference steam:Type-unitP or steam:Type-unitT.

Attached file: pwr_steamclasses.h is included for additional information.

In development mode, enumerations appear on both custom class objects and can be selected and changed from the object dialog display. But in run-time, Tsat_p8 works with associated C program, but test7 C program does not run to completion.

Attached: test_config.png shows both points in runtime. Test7-ron is of type steam:Type-unitT. No enumeration is selected and cannot be changed in runtime. Tsat_p8-unit_in is of type steam:Type-unitP and Tsat_p8-unit_out is of the same type as test7-ron, steam:Type-unitT. Both enumerations on Tsat_p8 work as expected and the C program runs to completion.


Any help is appreciated.

/Ron



test_config.png




File Attachment:

File Name: steam.wb_load.txt
File Size: 8 KB




File Attachment:

File Name: pwr_steamclasses.h
File Size: 2 KB
Last Edit: 3 years 3 weeks ago by AutoMate. Reason: Did not like wb_load extension. Added .txt
The administrator has disabled public write access.

Custom Type Definition Question and Possible Issue 3 years 3 weeks ago #10976

  • AutoMate
  • AutoMate's Avatar
  • OFFLINE
  • Expert Boarder
  • Posts: 159
  • Thank you received: 5
  • Karma: 1
Another clue is attached. When the output statement is commented out, then the enumeration works again. It appears the o->output pointer is off and writing to the wrong spot.


Another_clue.png
The administrator has disabled public write access.

Custom Type Definition Question and Possible Issue 3 years 3 weeks ago #10977

  • AutoMate
  • AutoMate's Avatar
  • OFFLINE
  • Expert Boarder
  • Posts: 159
  • Thank you received: 5
  • Karma: 1
Working now. On the test class object, the PgmName attribute was changed from "output" to "op". Now everything, including C programs are working. Maybe "output" is a reserved word? Or somehow confused by $output as a class def variable.


Fix.png
Last Edit: 3 years 3 weeks ago by AutoMate. Reason: Fixed Typo
The administrator has disabled public write access.

Custom Type Definition Question and Possible Issue 3 years 3 weeks ago #10978

  • claes
  • claes's Avatar
  • OFFLINE
  • Platinum Boarder
  • Posts: 3177
  • Thank you received: 502
  • Karma: 133
Hi Ron,

PgmName is only used when writing the c-code, and 'output' is to my knowledge not a reserved word in c. I more suspect that something wasn't built correctly and you were running mixed versions of the database and the c code.

/Claes
The administrator has disabled public write access.
The following user(s) said Thank You: AutoMate
  • Page:
  • 1
Time to create page: 8.518 seconds