Page 1 of 1

Saving new Styled Text to a DB

Posted: Tue May 01, 2012 8:40 pm
by dave_probertGA6e24
Hi,

I'm trying to figure out how to get the new styled text field info into a format I can save into a Database (SQLite, but it could be any!)

Is there a command to get the styledText in a 'serialised' format or a command to do basic serialisation/unserializaion of arrays? The Dictionary is too confusing to actually find anything in regarding this (unless you know precisely what you are looking for!).

And I would also need to know how to put the data from the DB field back into the format for setting the text display field.

There doesn't seem to be any entries on the forum regarding style text (except for setting the styles!) and there are no lessons as yet.

Does anyone have any suggestions?

Thanks,
Dave

Re: Saving new Styled Text to a DB

Posted: Tue May 01, 2012 8:52 pm
by Klaus
Hi Dave,

I did not upgrade to 5.5 yet, but isn't "the htmltext of fld xyz" an option?
That was at least my impression after reading the release notes of 5.5.


Best

Klaus

Re: Saving new Styled Text to a DB

Posted: Thu May 03, 2012 7:25 am
by dave_probertGA6e24
Thanks Klaus,

That worked perfectly :)

I knew there was some other place I should also have been looking - the release notes!!! I've now printed them out and they are sitting on my desk next to me - so I don't forget in the future! :)

BTW, I was commenting to my Son when I was writing the original message that "I expect that Klaus will come to the rescue" - I love being Psychic :) :)

Cheers,
Dave

Re: Saving new Styled Text to a DB

Posted: Thu May 03, 2012 9:54 am
by Klaus
:D :D :D