Skip to main content
heyo
Associate III
December 20, 2022
Solved

Passing UnicodeChar to function

  • December 20, 2022
  • 7 replies
  • 2961 views

Hello everyone,

Im faced with problem. I want to save headline name typed by keyboard

This is how I copy buffer to wildcard

0693W00000WLQa5QAH.pngWhen I sent keyboard[2] to view like this:

0693W00000WLQaAQAX.pngAnd throught presenter I save string to model:

0693W00000WLQaFQAX.pngPresenter:

0693W00000WLQaUQAX.pngModel:

0693W00000WLQaoQAH.pngAnd in model I create Unicode::UnicodeChar* array like this. Am I doing this right?:

0693W00000WLQatQAH.pngWhen I store this data to model I take this info in other screen

Here I take headline name and send it to getControllerText function

0693W00000WLQbNQAX.pnghere is this function:

0693W00000WLQW4QAP.pngIt is OK how I store Unicode::UnicodeChar* strings? Because when I want to save 2 strings then second string replace first one and it becomes the same. Maybe someone see the problem?

When I store one string:

0693W00000WLQcGQAX.pngThe second one replace first string and second and I didint see why..

0693W00000WLQcQQAX.png

This topic has been closed for replies.
Best answer by MM..1

No you dont send buff. Debug your code and will see, that in your .Headline is pointer address = kebuff[2]

You need on any transfer stage create strcpy.

Unicode | TouchGFX Documentation

and remove * from Unicode::UnicodeChar in struct

7 replies

MM..1
Super User
December 20, 2022

I mean no. You send over presenter pointer into keyboard buff and this stay one.

heyo
heyoAuthor
Associate III
December 20, 2022

AMM, but I send keyboard buff over presenter to model and store them into array.

MM..1
MM..1Best answer
Super User
December 20, 2022

No you dont send buff. Debug your code and will see, that in your .Headline is pointer address = kebuff[2]

You need on any transfer stage create strcpy.

Unicode | TouchGFX Documentation

and remove * from Unicode::UnicodeChar in struct