cancel
Showing results for 
Search instead for 
Did you mean: 

Richtext Datawindow strange behaviour WinXP and Win7 64bit

Former Member
0 Kudos

Hi,

that is the context: to take the saved rtf file (blob) from database and put it in a richtext datawindow, so if user make changes,check if changes are and save back to database. PB 12.5.2. build5602  oracle 11g

i have following code:

dw_rtf.dataobject = "dw_rtf"

dw_rtf.settransobject(sqlca)

dw_rtfr.insertrow(1)

dw_rtf.visible = true

dw_rtf.object.datawindow.RichText.readonly='NO'

dw_rtf.selecttextall(Detail!)

dw_rtf.pastertf(string(iblob_cr,EncodingANSI!))

is_original_texte = dw_rtf.copyrtf(false) 

comparing is_original_texte to string(iblob_cr,EncodingANSI!) are different, why? Here the user doesn't change nothing, Do copyrtf change the rtf text or something?

is_modified_texte = dw_rtf.copyrtf(false)

Case 1: No changes made on WinXP

The user doesn't make changes, then when check if the system propose him to save with pos(is_original_texte,is_modified_texte) = 0, on WinXP  the system doesn't propose to save but

the same case on Win7 64 bit the system propose it, why????  On both system it must be no changes no save.

Dome ideas? Workaround?

Thanks.

Regards,

Marko

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

If i do:

is_original_texte = dw_rtf.copyrtf(false)

is_modified_texte  = dw_rtf.copyrtf(false)

ON WIN 7 64 bit

one behind the other, the function change the rtf text. I check difference on original text and modified with KDiff3 an this tag changed \trpaddb306186192 with \trpaddb305792976. Why? This behaviour is on WIN 7 but not on WIN XP? Bug ???

Some ideas? Workaround?

Former Member
0 Kudos

\trpaddbN is the Default bottom cell margin or padding for the row. (Document Area)

Maybe the change is because of a different setting in the OS and the rtf control changes the settings in the document to the OS settings? (Just an idea. )

Former Member
0 Kudos

Ok, maybe. But why when everytime you do dw_rtf.copyrtf(false) it changes this tag even the rtf has not changed by user or system? What can i do else?

How can I know if the text changed (type in or formatting) in an richttext datawindow. Also you can have changing text outside a column. So globaly i need to know when text changes. My function compare before and after text with copyrtf() works fine on Win XP. Migrating to Win7 i have this behaviour.

Now, how can I know when a text has changed ???

arnd_schmidt
Active Contributor
0 Kudos

How about this '"dummy" solution:

is_original_texte = dw_rtf.copyrtf(false)

is_original_texte = dw_rtf.copyrtf(false) // Copy twice

is_modified_texte  = dw_rtf.copyrtf(false)

I don't know if it makes sense in your case, but it seems as if copyrtf has some side effects.

hth

Arnd

Former Member
0 Kudos

Nope, Doesn't help.

Can someone try on his machine if he has the same beahviour?

Thanks.

All workaround is welcome!!!