The Alert component message text munging bug and workaround article by Aral Balkan, unless otherwise expressly stated, is licensed under a Creative Commons Attribution-Noncommercial 2.0 UK: England License.
I just posted a workaround on the London MMUG web site regarding a nasty little bug with the Alert component cropping the end of long message texts. Hope this prevents someone out there from doubting their sanity and/or losing copious amounts of hair!
The Alert component message text munging bug and workaround article by Aral Balkan, unless otherwise expressly stated, is licensed under a Creative Commons Attribution-Noncommercial 2.0 UK: England License.
The Alert component message text munging bug and workaround article by Aral Balkan, unless otherwise expressly stated, is licensed under a Creative Commons Attribution-Noncommercial 2.0 UK: England License.
Another hack is to just add an “\n” (or newline keyword) to the end of the string.
Nice fix, Jesse — I assume it works with any-length string? (Will test when I get a moment!)
Jesse,
I just tried this and, depending on the width (again), you may need more than one newline character but it works like a charm
I still want to take a few minutes to create a more permanent hack that will be transparent to the developer.
Funny how this just came up as I had just used my own solution. My problem was that I need to format the box to a specific width as my errors are listed in a bulleted fashion and I did not want them to cut off into a new line:
var errorStr:String = “You had the following errors in your request:\n\n”;
if (!theaterIDArr) errorStr += “* Select one or more theaters from the list above.\n”
if (!reportTypeArr) errorStr += “* Select one or more export options below.\n”;
An easy way to increase the width was to just add a bit of spaces to the Alert windows title!
Since you can see your errors below the title you can guess the right amount of spaces.
Sounds cheap, but it works great and is a really simple hack:
var title:String = “PDF Request Error “;
var errorStr:String = “You had the following errors in your request:\n\n”;
if (!theaterIDArr) errorStr += “* Select one or more theaters from the list above.\n”
if (!reportTypeArr) errorStr += “* Select one or more export options below.\n”;
HTH
well the extra spaces did not come in through teh HTML, however, you get the picture. Give it a shot!
Thanks a ton for the fix.
I have already lost my hair, I could have saved them, If I did a google search earlier.
Thanks a ton for the fix.
It saved a lot of our time. If I did a google search earlier.
You’re very welcome, glad you found it useful