Texteditor Class Behaving Differently (Amiga/Windows)

Discuss GUI programming with the RapaGUI plugin here
Post Reply
Posts: 249
Joined: Sun Feb 21, 2010 1:28 am

Texteditor Class Behaving Differently (Amiga/Windows)

Post by PEB » Sun Jul 17, 2016 2:46 am

RapaGUI's Texteditor class seems to behave a bit differently depending on whether the app is run on an Amiga or on a Windows machine.

I have the texteditor set to notify using the "undoavailable" and "haschanged" attributes. When typing in the editor widget, I get "UndoAvailable" reported with each change; but this does not happen with Windows. On Windows, the "HasChanged" attribute is set with typing, but not the "UndoAvaible."

User avatar
Posts: 44
Joined: Mon Jun 13, 2016 11:36 am
Location: Sinzig/Germany

Re: Texteditor Class Behaving Differently (Amiga/Windows)

Post by msu » Sun Jul 17, 2016 1:47 pm

That's really true!

Example: ......Hollywood\RapaGUI\Examples\RapaGUI\TextEditor.hws by Andreas.

On Windows, the function always deletes the entire text. :(
Under AmigaOS Undo working properly. It is deleted character by character. :D

User avatar
Posts: 3128
Joined: Fri Feb 12, 2010 2:33 pm
Location: Germany

Re: Texteditor Class Behaving Differently (Amiga/Windows)

Post by airsoftsoftwair » Mon Jul 18, 2016 11:19 am

I'm afraid that's something we have to live with. The problem is that RapaGUI uses native controls for all its widgets. Those controls, however, do not always behave in exactly the same manner. I've already gone to greater pains to make them behave as identical as possible but there are still some differences which applications just cannot work around, e.g. different undo behaviour.

This problem, however, should really only be related to TextEditor class because it is the most complex widget out there. All other widgets shouldn't show such issues.

What I'm planning to solve these problems is to add a platform-independent editor class based on Scintilla. This is guaranteed to behave exactly identical on all systems then but the problem is that there is currently no Amiga port of Scintilla and it's written in C++ so it's going to be some pain to port this as an Amiga shared library. Even worse, MorphOS already has a Scintilla port but of course it's highly unlikely that they allow this to be ported to all the other platforms as well. So essentially, things would have to be done twice which is of course a real motivation killer...

To cut a long story short, there will be slight differences in behaviour with widgets of TextEditor class because the native OS controls simply behave that way. The only solution to this is to switch to a platform-independent editing class like Scintilla but for this we'd need an Amiga port of Scintilla.mcc first.

Post Reply