Formatted text not saved consistently
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
Formatted text not saved consistently
Is anyone else having problems with formatted text changing when a stack is saved? I have a stack with several fields that have a lot of mixed formatted text including plain, italics, bold, and different sizes. Sometimes when I make a few edits and save the stack, much of the formatting is changed when I reopen it: italics disappears, italics changes to bold, extra sections become bold, etc. I've created a simpler stack with fewer cards and just had lots of extra text become bold when I added a few strings of plain text in various places. When I look at the HTMLText of the fields it looks correct BEFORE I save it but on reopening, the formatting may have changed and the HTMLText reflects the changed content. Does the text get stored as styledText in a .livecode file? I've looked at the .livecode file in a text editor but can't make sense of how it is stored - sections of plain text that match what is in the stack and then sections with undecipherable strings of characters. The best solution I've come up with is to maintain the text in an HTML file and then import it intoLiveCode (set the HTMLText of field... to ...). The problem is that I haven't gotten the HTML file perfect and continue to find problems in the stack that need correcting. Shouldn't I be able to edit formatted text in a stack?
27" iMac, OS X 10.13
iPad 3, iPad Pro, iPhone 4s, iPhone 6, LG Optimus L9 phone, Samsung Galaxy Camera
LiveCode 8.1.9
iPad 3, iPad Pro, iPhone 4s, iPhone 6, LG Optimus L9 phone, Samsung Galaxy Camera
LiveCode 8.1.9
Re: Formatted text not saved consistently
Hi,
If your simple stack contains no scripts whatsoever, then this sounds like a bug. I'd say report it to RunRev.
Kind regards,
Mark
If your simple stack contains no scripts whatsoever, then this sounds like a bug. I'd say report it to RunRev.
Kind regards,
Mark
The biggest LiveCode group on Facebook: https://www.facebook.com/groups/livecode.developers
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode
Re: Formatted text not saved consistently
I've never had this happen. As Mark suggests, it may be script-related. Can you reproduce the problem in a new, blank stack with a single field? If it works correctly there, then do you have any scripts in your main stack that deal with text?
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com
HyperActive Software | http://www.hyperactivesw.com
Re: Formatted text not saved consistently
I did create a simplified stack that has failed after a couple of edit sessions. It is possible to make a few changes and have it save correctly. It has 2 fields and the only scripts are in buttons for next and previous cards.
- Attachments
-
- testFormat9.livecode.zip
- (8.47 KiB) Downloaded 323 times
27" iMac, OS X 10.13
iPad 3, iPad Pro, iPhone 4s, iPhone 6, LG Optimus L9 phone, Samsung Galaxy Camera
LiveCode 8.1.9
iPad 3, iPad Pro, iPhone 4s, iPhone 6, LG Optimus L9 phone, Samsung Galaxy Camera
LiveCode 8.1.9
Re: Formatted text not saved consistently
Thanks for the example, I just made several edits but it seems to work okay. You do have another script in the field that sets italic on a selection but that worked for me too. Is there something else I need to do besides changing the text and navigating around cards?
What version of LiveCode do you use? Maybe that matters.
If anything, I'd suspect the field script. You might want to change the command from "type" to something like this:
Maybe the type command is interfering, though I didn't have any trouble with it.
What version of LiveCode do you use? Maybe that matters.
If anything, I'd suspect the field script. You might want to change the command from "type" to something like this:
Code: Select all
set the textstyle of the selection to "italic"
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com
HyperActive Software | http://www.hyperactivesw.com
Re: Formatted text not saved consistently
Thanks for checking that out Jacque. Sometimes it works properly for me too. Saving a stack, closing and removing from memory, and reopening the stack often shows problems that are not apparent immediately. Other than that, just changing text SOMETIMES causes formatting changes. I'm using LiveCode 5.5.3 now but this also happened in previous versions as well as in the Windows version. I had forgotten about the field script for italics but formatting changes do happen without using it.
27" iMac, OS X 10.13
iPad 3, iPad Pro, iPhone 4s, iPhone 6, LG Optimus L9 phone, Samsung Galaxy Camera
LiveCode 8.1.9
iPad 3, iPad Pro, iPhone 4s, iPhone 6, LG Optimus L9 phone, Samsung Galaxy Camera
LiveCode 8.1.9
Re: Formatted text not saved consistently
Hi Jack,
I can confirm your observation of changing formatting.
I opened a fresh copy of your stack and just went to card 2, saved the stack although I did not change anything. Quit Livecode, start LiveCode and open the stack: the format changed.
This was reproducible every time when starting from a fresh copy of the stack.
It would be nice if someone could confirm this recipe.
This looks a lot like a bug. Maybe the fact that it is a background group has to do with it?, No idea really.
Livecode 5.5.3, MacOSX 10.6.8.
Kind regards
Bernd
I can confirm your observation of changing formatting.
I opened a fresh copy of your stack and just went to card 2, saved the stack although I did not change anything. Quit Livecode, start LiveCode and open the stack: the format changed.
This was reproducible every time when starting from a fresh copy of the stack.
It would be nice if someone could confirm this recipe.
This looks a lot like a bug. Maybe the fact that it is a background group has to do with it?, No idea really.
Livecode 5.5.3, MacOSX 10.6.8.
Kind regards
Bernd
Re: Formatted text not saved consistently
Good recipe, Bernd, it does that for me too.
I see the field has its textsize set to 18. After the save, that's the size the text becomes. It looks like there are some problems with the new field properties and inheritance.
Here is the htmltext of the original, followed by the htmltext of the saved version. Quite a lot has changed:
Oddly, card 2 saves correctly and that is the one I was on when I saved the stack. So your guess about background fields may be correct, it seems the text translation isn't working on non-current cards.
I see the field has its textsize set to 18. After the save, that's the size the text becomes. It looks like there are some problems with the new field properties and inheritance.
Here is the htmltext of the original, followed by the htmltext of the saved version. Quite a lot has changed:
Code: Select all
<p><i><b>Artemisia borealis</b></i> Pall. <b>var. <i>wormskioldii</i></b> Besser*</p>
<p><font size="14">Wormskiold's northern wormwood </font></p>
<p><font size="14">Synonym: <i><b>Artemisia campestris</b></i> L. <b>ssp. <i>borealis</i></b> (Pall.) H.M. Hall & Clem. <b>var. <i>wormskioldii</i></b><i> </i>(Bess.) Cronquist</font></p>
<p><font size="14">Asteraceae - aster family</font></p>
<p><b><font size="14">Status</font></b><font size="14">: state endangered, federal candidate, USFS and BLM sensitive</font></p>
<p><b><font size="14">Rank</font></b><font size="14">: G5T1 / S1</font></p>
<p><i><b>Artemisia borealis</b></i> Pall. <b>var. <i>wormskioldii</i></b> Besser*</p>
<p><i><b><font size="18">Wormskiold's northern wormwood </font></b></i></p>
<p><i><b><font size="18">Synonym: Artemisia campestris L. ssp. borealis (Pall.) H.M. Hall & Clem. var. wormskioldii (Bess.) Cronquist</font></b></i></p>
<p><i><b><font size="18">Asteraceae - aster family</font></b></i></p>
<p><i><b><font size="18">Status: state endangered, federal candidate, USFS and BLM sensitive</font></b></i></p>
<p><i><b><font size="18">Rank: G5T1 / S1</font></b></i></p>
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com
HyperActive Software | http://www.hyperactivesw.com
Re: Formatted text not saved consistently
Thanks for verifying this Bernd & Jacque. I've had problems getting something that is consistently reproducible. I was working with my main stack today and locking the text in a card field caused formatting changes in 2 background fields. Do I need to be a member of the Developer Program to submit a bug report on this?
27" iMac, OS X 10.13
iPad 3, iPad Pro, iPhone 4s, iPhone 6, LG Optimus L9 phone, Samsung Galaxy Camera
LiveCode 8.1.9
iPad 3, iPad Pro, iPhone 4s, iPhone 6, LG Optimus L9 phone, Samsung Galaxy Camera
LiveCode 8.1.9
Re: Formatted text not saved consistently
Hi Jack,
basically you can report a bug to support at runrev, using bug in the headline.
To report a bug to the "Quality Control Center" directly with example stack etc. you have to have a subscription to the developer program.
Maybe Jacque will want to report this. She is highly knowledgeable and respected. And she found the difference in the htmlText. And she knows what the team expects the report to look like. This all helps the team to fix the bug as soon as possible.
Actually I think this is a very serious bug that absolutely has to be fixed immediately. I would call it a blocker.
Kind Regards
Bernd
basically you can report a bug to support at runrev, using bug in the headline.
To report a bug to the "Quality Control Center" directly with example stack etc. you have to have a subscription to the developer program.
Maybe Jacque will want to report this. She is highly knowledgeable and respected. And she found the difference in the htmlText. And she knows what the team expects the report to look like. This all helps the team to fix the bug as soon as possible.
Actually I think this is a very serious bug that absolutely has to be fixed immediately. I would call it a blocker.
Kind Regards
Bernd
Re: Formatted text not saved consistently
Or just send it to: bugs@runrev.com 

Re: Formatted text not saved consistently
I can report it but not till after the Thanksgiving holiday here in the U.S. -- I'm cooking for a crowd today and tomorrow. It's probably best to send it to support, but if you don't, just post a note here and I'll see it and report it for you.
Right now I'm just doing a quick pass through the forums and then it is back to the kitchen.
Right now I'm just doing a quick pass through the forums and then it is back to the kitchen.

Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com
HyperActive Software | http://www.hyperactivesw.com
Re: Formatted text not saved consistently
OK, the turkey wins 
I filed this as
Bug 10558
in the quality control center. (QCC)
I think it is the fastest and easiest way to get the attention of the engineers. No additional steps necessary.
I will post here if I get any news.
Others with access to QCC might want to add comments to the bug.
Kind regards
Bernd

I filed this as
Bug 10558
in the quality control center. (QCC)
I think it is the fastest and easiest way to get the attention of the engineers. No additional steps necessary.
I will post here if I get any news.
Others with access to QCC might want to add comments to the bug.
Kind regards
Bernd
Re: Formatted text not saved consistently
Thanks Bernd. The turkey did win.


Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com
HyperActive Software | http://www.hyperactivesw.com
Re: Formatted text not saved consistently
Just a short follow-up
The Quality Control Center confirmed the bug 10558 and they are investigating it.
Amazing how fast they respond.
Kind regards
Bernd
The Quality Control Center confirmed the bug 10558 and they are investigating it.
Amazing how fast they respond.
Kind regards
Bernd