04-30-2020 06:41
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post

04-30-2020 06:41
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
Hi,
I have a real mystery I try to fill an html element with a color which doesn't work. I'm converted my current message code to a file transfer.
///In companion I do:
04-30-2020 07:07
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post

04-30-2020 07:07
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
What does the data your are encoding? just a string value ex.
"gold"
?

04-30-2020 07:38
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post

04-30-2020 07:38
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
yes just a value with a valid css color

04-30-2020 13:57
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post


04-30-2020 13:57
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
My theory is that colour names are converted to numbers at build time. At run time, try sticking a number in there; eg, 16777215.
I suspect that no strings will work, including '16777215', '#808080', etc.
Gondwana Software

05-01-2020 02:10
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post

05-01-2020 02:10
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
- Who Voted for this post?
@Gondwana I solved the mystery somehow the string contained a start and end quote, charAt (0, properties) resulted in ".
And that became because of somehow in the process of getting the color from the colorpicker the " char was escaped, so \"gold\". I still searching how that happend because earlier when using the message connection (instead of filetransfer) it all worked fine.
Thnx for thinking along,
Robert
05-05-2020 16:39
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post

05-05-2020 16:39
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
I'd inspect what `data` contains before encoding it in the companion. Because maybe it contains the `"` character at that point, and the root cause is in earlier code like the settings.

