169 views
in Platform Packages by

Hello,

I would like to create a class which contains three methods, and in each of those methods (let call them MethodA, MethodB and MethodC), I have a specific native code.
My questione now is to know how to declare a variable within the native environment of MethodA, so that it is available also in the native environment of MethodB and MethodC.

Of course, the given variable is not a standard type that can be cast, but in my case a FILE type from string.h.

Thank you,

1 Answer

0 votes
by

Hello Krzysztof,

use Inline code member to 'inject' a definition of your desired static C variable inside the generated code. Then the native code existing inside the three methods can access the variable. Important: ensure that the Inline code is generated before the class containing the methods. Note Order column in Inspector window.

I hope it helps you further.

best regards

Paul Banach

by
Thank you very much.
It works.

Ask Embedded Wizard

Welcome to the question and answer site for Embedded Wizard users and UI developers.

Ask your question and receive answers from the Embedded Wizard support team or from other members of the community!

Embedded Wizard Website | Privacy Policy | Imprint

...