PDA

View Full Version : retrieving the value of a formattedtextfield control



KyleC
June 29th, 2007, 13:24
How do I retrieve the value of a formattedtextfield control? It doesn't seem to have a getValue() function nor is it documented in the Library.

Toadwart
June 29th, 2007, 22:12
Maybe same problem as when using a stringfield versus a srtringcontrol

Have you tried using a formattedtextfield ?

KyleC
July 5th, 2007, 13:55
I guess my post wasn't clear. I am talking about the formattedtextfield. :)

It's not a high priority anymore as I decided to move in another direction, but it would be nice to have this control documented.

Foen
July 7th, 2007, 08:57
I have a similar problem: I'm trying to set the value of a formattedtext field from a description table.

Is this a template control perhaps?

Cheers

Stuart
(Foen)

Foen
July 7th, 2007, 09:02
Hmm, it isn't a template control that I can see. A work-around is to use getDatabaseNode() and then set or get the value from the node. Not too slick, I'll grant you.

Cheers

Stuart
(Foen)

Foen
July 8th, 2007, 07:53
Grr! Setting the value of the underlying formattedtext database node fails (silently). If it is set and then read back the result is (null).

Am I missing something here?

Stuart
(Foen)

KyleC
July 8th, 2007, 18:29
I may have run into a similar problem when I was building a custom control for my ruleset. Saving data for the control via a databasenode always seemed to fail. I got the impression that a databasenode is readonly when the node belongs to a control, but I never tested that theory.

That said, were you formatting your text properly for the formattedtextfield control? Each format has its own tag.

Foen
July 9th, 2007, 06:11
Thanks KyleC, you've given me another two avenues to explore: I was actually testing with plain text (no tags) and maybe it expects at least paragraph tags to be present.

Stuart
(Foen)