Data Access Worldwide Knowledge Base
Article ID 2156 Article Title INFO: Is an "empty" rich edit control really empty? Article URL http://www.dataaccess.com/kbasepublic/KBPrint.asp?ArticleID=2156 KBase Category VDF11 Date Created 08/09/2005 Last Edit Date 08/09/2005
Article Text
Rich edit or rich text format (RTF) controls (classes cRichEdit and cDbRichEdit in Visual DataFlex), work somewhat differently than text edit controls.
1. No matter that you "see that the control has no content", a rich edit control really has some content (formatting information). When you start typing text, the information that is in the control and the information that is displayed are very different.
2. By choosing to use cDbRichEdit control for representation of some database field, you are stating that you CARE about format.
3. It is not good idea to use a cDbRichEdit control when you want to have an index on that column, because when values are compared (e.g. search for the occurence of some string) all the formatting information that is present must be considered (you should use a cDbTextEdit then).
4. If someone tried to find records whose value is equal to "JOHN" after saving this text in a rich edit control, a match would not be found.
5. There is no easy of knowing if an RTF contains real text or not. When text data is saved, the save transfers data using 'set Value' (actually paValue). There is no way to be 100% sure if Value contains text or not. You can only really test for text when the rich-edit control is actually paged. When the control is not paged, all that is known is that there is a stream of data.
It should be noted that this is only an issue of the edit control's changed_state is true. If no changes are made, nothing is updated.
Email this Article
Email this Article to a Colleague
Send Feedback on this Article to Data Access Worldwide
Copyright ©2010 Data Access Corporation. All rights reserved.
The information provided in the Data Access Technical Knowledge Base is provided "as is" without warranty of any kind. Data Access Corporation disclaims all warranties, either express or implied, including the warranties of merchantability and fitness for a particular purpose. In no event shall Data Access Corporation or its suppliers be liable for any damages whatsoever including direct, indirect, incidental, consequential, loss of business profits or special damages, even if Data Access Corporation or its suppliers have been advised of the possibility of such damages. Some states do not allow the exclusion or limitation of liability for consequential or incidental damages so the foregoing limitation may not apply.