Saving new Styled Text to a DB

Creating desktop or client-server database solutions?

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
dave_probertGA6e24
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 328
Joined: Mon Dec 05, 2011 5:34 pm
Contact:

Saving new Styled Text to a DB

Post by dave_probertGA6e24 » Tue May 01, 2012 8:40 pm

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
Coding in the Sun - So much Fun.
Visit http://electronic-apps.info for released App information.

Klaus
Posts: 14206
Joined: Sat Apr 08, 2006 8:41 am
Contact:

Re: Saving new Styled Text to a DB

Post by Klaus » Tue May 01, 2012 8:52 pm

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

dave_probertGA6e24
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 328
Joined: Mon Dec 05, 2011 5:34 pm
Contact:

Re: Saving new Styled Text to a DB

Post by dave_probertGA6e24 » Thu May 03, 2012 7:25 am

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
Coding in the Sun - So much Fun.
Visit http://electronic-apps.info for released App information.

Klaus
Posts: 14206
Joined: Sat Apr 08, 2006 8:41 am
Contact:

Re: Saving new Styled Text to a DB

Post by Klaus » Thu May 03, 2012 9:54 am

:D :D :D

Post Reply