You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We can see the dir(other) is okay and has a dict method and shows a double variable "other_type".
dir (t2.other_type) has no dict and is missing the double variable other_type.
Setting and getting other_type for struct "other" is okay.
Setting and Getting the variable other_type via TypeTest t2 is invalid.
Is this the expected behavior?
Thanks
The text was updated successfully, but these errors were encountered:
Okay it looks like creating an instance of TypeTest.Type2 does not create and instance of OtherType.Type3 for the other_type variable.
Setting the variable to an instance after creation works:
o=OtherType.Type3t3=TypeTest.Type2t3.other_type_var=o#now and instancet3.other_type_var=OtherType.Type3#or now and instance# now this value can be set/gett3.other_type_var.other_type=19.0print(t2.other_type_var.other_type)
Does it make sense that you have to set this manually on initialization?
========================================================================
Further,
Why does this happen:
#!/usr/bin/python3importfastddsfromTypeTestimportTypeTestfromOtherTypeimportOtherTypeo=OtherType.Type3t1=TypeTest.Type2t2=TypeTest.Type2t1.type2_d=7777.0print('a variable that is set', t1.type2_d)
print('a variable that is not set', t2.type2_d)
Output:
a variable that is set 7777.0
a variable that is not set 7777.0
Hello,
I have an issue with including other types in the python generated code.
For example creating the two files:
TypeTest.idl
OtherType.idl:
Using the test code:
Output:
We can see the dir(other) is okay and has a dict method and shows a double variable "other_type".
dir (t2.other_type) has no dict and is missing the double variable other_type.
Setting and getting other_type for struct "other" is okay.
Setting and Getting the variable other_type via TypeTest t2 is invalid.
Is this the expected behavior?
Thanks
The text was updated successfully, but these errors were encountered: