devbent
New member
I completely understand what you are saying. I think that giving developers a memory limit to stay under and reserving X heap for custom dialogs would be a viable solution. I had a heck of a time trying to figure out custom layouts and why they would work sometimes and not other times (when they dont work, they just decide to not appear at all). I couldnt find any help online on how to implement them correctly but ultimately figured it out. Is the memory limits also the reason why my text strings get cut-off after a certain length? Do you know if there are any other 3rd party band apps in the store that use custom layouts other than mine (Chancy Band)?
Sorry about that, I'm responsible for the current mess.
We're trying to fix it, but it is hard. My current aim is to reclaim some heap space so that third party dev's have more room to work with and that the limits are hit less often.
Strings are hard. Back in the old days (v1 third party tiles) they were cut off in a very predictable manner. Each page is allocated one "long" string of 160 characters (including the null terminator) and 2 short strings of 20 characters. (We very much reused the data structure we had for emails: sender, subject, body)
We are a bit more flexible now, but from a third party developer's perspective the rules are rather nebulous. Part of that is because we're constantly trying to increase the flexibility of how this works, mostly it is because we haven't done a good job communicating.
Some explanations;
Because of how little memory we have, we cannot afford to fragment a heap, which drives a lot of our design decisions. Allowing dynamic changes to pages means that we cannot do the easy thing of having all strings checked when the tile layout is first created on the phone.
We started off as UTF-16 internally, we're slowly moving to being UTF-8 pure. We plan on giving developers back some of the memory we reclaim from the switch over, at that point we'll probably just say "You have this many bytes to work with per page, allocate strings as you so desire", and we'll hopefully start returning descriptive error codes when something goes wrong. I don't really have an ETA for this. (On top of my not allowed to give out ETAs anyway!)