DominikKoller / pxt-Parties

Doing things with multiple microbits made easy!
MIT License
0 stars 0 forks source link

String handling #8

Open DominikKoller opened 5 years ago

DominikKoller commented 5 years ago

I had troubles with making the status a string - passing it out to TS, you have to be careful since the type String is unmanaged (increase ref count, using incrRC, decrease ref count using decrRC).

I did not succeed doing that correctly though, and ended up making the status a number instead.

We should make it a string (I think). Either we get the refcounting right, or we use the type ManagedString which I hope you can also pass out to TS: https://lancaster-university.github.io/microbit-docs/data-types/string/

DominikKoller commented 5 years ago

Ah also about String, I'm running into this error a lot so I reported it as a bug: https://github.com/Microsoft/pxt-microbit/issues/2038

DominikKoller commented 5 years ago

Update (from issue linked above): getUTF8Size() does not work on makecode.microbit.org but it does work on makecode.microbit.org/beta

DominikKoller commented 5 years ago

This issue is still open, but the relevant code exists and only needs to be uncommented. Do not close this issue before extensive testing of string messages.