Status of source code changes suggested in November 2014
Posted: Fri Sep 04, 2015 7:28 pm
In November 2014, I proposed the source code changes listed below. Following Claudio's directions, I submitted them via a forum posting, viewtopic.php?f=43&t=4071&start=10
These changes included a revised rich edit demo, in which I used all of the other changes I proposed, except for the SelPasteSpecial method. I used the rich edit demo to thoroughly test all these other changes, and I was satisfied that they all worked properly when I submitted them. You can download the compiled exe of this demo from http://kevincarmody.com/hmg/SAMPLES/Con ... x/demo.exe
Now I have found that almost none of these changes are present in the current version of HMG, 3.4.1. The rich edit demo has been returned to the 3.3.1 version, and all of the other changes I proposed, except for the justification bug fix, have also been ignored.
After some months away from HMG, I downloaded version 3.4.1 in July and again in September. I found numerous differences in the source code between these two downloads, especially with regard to my proposals, so many that they are effectively two different versions. In the following discussion, I will call the July version 3.4.1a and the September version 3.4.1b.
The proposals I made last November were changes to version 3.3.1. I will call my proposals version 3.3.1k.
I found that 3.4.1a had all the changes from 3.3.1k for .prg and .c files in the SOURCE directory, but none of the changes from 3.3.1k for the .ch files in the INCLUDE directory. This meant that none of the new properties and methods in 3.3.1k were accessible, and this in turn meant that the 3.3.1k rich edit demo would not compile in 3.4.1a.
The 3.4.1a rich edit demo thus had to have some changes from 3.3.1k version. One change that someone made (I don't know who) was to completely rewrite the ReadFile and WriteFile functions. Unfortunately, these rewrites were very buggy, so the 3.4.1a rich edit demo did not correctly both read and write any format of Unicode text file -- for every Unicode text file format, the demo either misread the file or miswrote the file.
In version 3.4.1b, all of the changes in 3.3.1k that were in 3.4.1a were removed, except for the justification bug fix. The 3.4.1b rich edit demo has been reverted to the 3.3.1 version. Thus the several weeks of work I did developing, testing, and documenting version 3.3.1k, including the heavy modifications of the rich edit demo, have been discarded.
It appears to me that there was some attempt to incorportate these changes into 3.4.1, but unfortunately whoever did this used only the changes I propsed to the .prg and .c files, while ignoring the changes I proposed to the .ch files. I am confident that using all of the changes I proposed will work properly, since I thoroughly tested them in the rich edit demo.
I am willing to redevelop my proposal as a set of changes to 3.4.1, but I would first like some assurance that this proposal will not be ignored.
Below is a detailed list of source code changes in my previous proposal and their disposal in 3.4.1.
Version numbers used below
3.3.1k - enhancements I suggested for 3.3.1 in November 2014
3.4.1a - official HMG version 3.4.1 that I downloaded in July 2015
3.4.1b - official HMG version 3.4.1 that I downloaded in September 2015
New function GetRtfTxtFileType( cFile, lUtf8Test ) --> nFileType
Returns file type which can be used in RtfTxtLoadFile and RtfTxtSaveFile methods of RichEditBox control
SOURCE\h_richeditbox.prg
3.3.1k lines 508-576
3.4.1a lines 508-576
3.4.1b missing
New function Utf16ByteSwap( cInFile, cOutFile )
Supports UTF-16 BE (big endian) file type for RtfTxtLoadFile and RtfTxtSaveFile methods of RichEditBox control
SOURCE\h_richeditbox.prg
3.3.1k lines 579-621
3.4.1a lines 579-621
3.4.1b missing
New manifest constants RTFTXTFILE_ANSI etc.
RTF and TXT file types returned by GetRtfTxtFileType()
Can be used by RtfTxtLoadFile and RtfTxtSaveFile methods of RichEditBox control
INCLUDE\i_richeditbox.ch
3.3.1k lines 159-169
3.4.1a missing
3.4.1b missing
Fixed rich edit justification bug
viewtopic.php?f=20&t=3995
SOURCE\c_richeditbox.c - InitRichEditBox()
3.3.1k line 185
3.4.1a line 185
3.4.1b line 140
Fixed RichEditBox_StreamIn( hWndControl, cFileName, lSelection, nDataFormat ) --> lSuccess
Skips over BOM in text files if present
SOURCE\c_richeditbox.c
3.3.1k lines 226-291
3.4.1a lines 226-291
3.4.1b missing
Fixed RichEditBox_StreamOut( hWndControl, cFileName, lSelection, nDataFormat ) --> lSuccess
Writes BOM to text files
SOURCE\c_richeditbox.c
3.3.1k lines 305-360
3.4.1a lines 305-360
3.4.1b missing
Enhanced rich edit method RtfLoadFile( cFile, lSelection, nType ) --> lSuccess
Uses file type returned by GetRtfTxtFileType()
Skips over byte order mark in Unicode text file
Supports UTF-16 BE (big endian Unicode text file)
SOURCE\h_controlmisc.prg
3.3.1k lines 9468-9469
3.4.1a lines 9468-9469
3.4.1b missing
Calls new function RichEditBox_RtfTxtLoadFile()
SOURCE\h_richeditbox.prg
3.3.1k lines 441-475
3.4.1a lines 441-475
3.4.1b missing
Enhanced rich edit method RtfSaveFile( cFile, lSelection, nType ) --> lSuccess
Uses file type returned by GetRtfTxtFileType()
Writes byte order mark to Unicode text file
Supports UTF-16 BE (big endian Unicode text file)
SOURCE\h_controlmisc.prg
3.3.1k lines 9473-9474
3.4.1a lines 9473-9474
3.4.1b missing
Calls new function RichEditBox_RtfTxtSaveFile()
SOURCE\h_richeditbox.prg
3.3.1k lines 478-505
3.4.1a lines 478-505
3.4.1b missing
New rich edit method RtfTxtLoadFile( cFile, lSelection, nType ) --> lSuccess
Synonym for RtfLoadFile method
SOURCE\h_controlmisc.prg
3.3.1k line 9468
3.4.1a line 9468
3.4.1b missing
INCLUDE\i_window.ch
3.3.1k lines 162-163, 165
3.4.1a missing
3.4.1b missing
New rich edit method RtfTxtSaveFile( cFile, lSelection, nType ) --> lSuccess
Synonym for RtfSaveFile
SOURCE\h_controlmisc.prg
3.3.1k line 9473
3.4.1a line 9473
3.4.1b missing
INCLUDE\i_window.ch
3.3.1k lines 162-163, 165
3.4.1a missing
3.4.1b missing
New rich edit property HasUnicodeChars (read only)
Detects whether rich edit control contains non-ASCII Unicode characters
SOURCE\h_controlmisc.prg
3.3.1k lines 9293-9296
3.4.1a lines 9293-9296
3.4.1b missing
INCLUDE\i_window.ch
3.3.1k line 154
3.4.1a missing
3.4.1b missing
Calls new function RichEditBox_HasUnicodeChars()
SOURCE\h_richeditbox.prg
3.3.1k lines 414-438
3.4.1a lines 414-438
3.4.1b missing
New rich edit method SelPasteSpecial
Paste special -- needs documentation of clipboard format argument
SOURCE\h_controlmisc.prg
3.3.1k lines 9486-9488
3.4.1a lines 9486-9488
3.4.1b missing
INCLUDE\i_window.ch
3.3.1k line 169
3.4.1a missing
3.4.1b missing
Enhanced function GetFile( [aFilter], [cTitle], [cIniFolder], [lMultiSelect], [lNoChangeDir], [nFilterIndex] ) --> cFileName | aFileNames | NIL
viewtopic.php?f=8&t=4009
Added nFilterIndex to control default file filter
SOURCE\c_dialogs.c
3.3.1k lines 174, 189-190, 222
3.4.1a lines 174, 189-190, 222
3.4.1b missing
SOURCE\h_dialogs.prg
3.3.1k lines 94, 124-126, 130, 133
3.4.1a lines 94, 124-126, 130, 133
3.4.1b lines 93, missing, 123, 125
Enhanced function Putfile( [aFilter], [cTitle], [cIniFolder], [lNoChangeDir], [cDefaultFileName], [cExtFile], [nFilterIndex] ) --> cFileName | NIL
viewtopic.php?f=8&t=4009
Added nFilterInddex to control default file filter
If passed by reference, nFilterIndex returns index of file filter selected by user
SOURCE\c_dialogs.c
3.3.1k lines 269, 277-280, 312, 328-331
3.4.1a lines 269, 277-280, 312, 328-331
3.4.1b missing
SOURCE\h_dialogs.prg
3.3.1k lines 155, 176-178, 186
3.4.1a lines 155, 176-178, 186
3.4.1b lines 146, missing, 171
Enhanced function DoMethod ( Arg1 , Arg2 , Arg3 , Arg4 , Arg5 , Arg6 , Arg7 , Arg8 , Arg9 )
Enabled it to return value from RichEditBox method
SOURCE\h_controlmisc.prg
3.3.1k lines 7944, 7956-7958, 9445
3.4.1a lines 7944, 7956-7958, 9445
3.4.1b missing
Overhauled Rich Edit Demo
viewtopic.php?f=9&t=4030
New features
Main menu
List of recently used files
Resizable windows
Ctrl-B, Ctrl-I, Ctrl-U supported
File name in title, file name and page in status bar
Modified flag, caps lock, num lock, insert status on status bar
Window size, font name and size, file locations, file filters, recently used file names stored in registry
Paragraph numbering
Read and write text files
Many other enhancements
Uses enhancements described above
GetFile function
PutFile function
GetRtfTxtFileType function
RtfTxtLoadFile method
RtfTxtSaveFile method
HasUnicodeChars property
justification bug fix
These in turn use all of the other enhancements described above (except for SelPasteSpecial)
Source
3.3.1
SAMPLES\Controls\RichEditBox\demo.prg
SAMPLES\Controls\RichEditBox\demo.rc
SAMPLES\Controls\RichEditBox\FilesRes\*.*
3.3.1k
SAMPLES\Controls\RichEditBox\demo.prg
SAMPLES\Controls\RichEditBox\demo.rc
SAMPLES\Controls\RichEditBox\Res\*.*
heavily modified from 3.3.1
3.4.1a
SAMPLES\Controls\RichEditBox\demo.prg
SAMPLES\Controls\RichEditBox\demo.rc
SAMPLES\Controls\RichEditBox\Res\*.*
much the same as 3.3.1k, but bugs introduced in modified portions
3.4.1b
SAMPLES\Controls\RichEditBox\demo.prg
SAMPLES\Controls\RichEditBox\demo.rc
SAMPLES\Controls\RichEditBox\FilesRes\*.*
identical to 3.3.1
These changes included a revised rich edit demo, in which I used all of the other changes I proposed, except for the SelPasteSpecial method. I used the rich edit demo to thoroughly test all these other changes, and I was satisfied that they all worked properly when I submitted them. You can download the compiled exe of this demo from http://kevincarmody.com/hmg/SAMPLES/Con ... x/demo.exe
Now I have found that almost none of these changes are present in the current version of HMG, 3.4.1. The rich edit demo has been returned to the 3.3.1 version, and all of the other changes I proposed, except for the justification bug fix, have also been ignored.
After some months away from HMG, I downloaded version 3.4.1 in July and again in September. I found numerous differences in the source code between these two downloads, especially with regard to my proposals, so many that they are effectively two different versions. In the following discussion, I will call the July version 3.4.1a and the September version 3.4.1b.
The proposals I made last November were changes to version 3.3.1. I will call my proposals version 3.3.1k.
I found that 3.4.1a had all the changes from 3.3.1k for .prg and .c files in the SOURCE directory, but none of the changes from 3.3.1k for the .ch files in the INCLUDE directory. This meant that none of the new properties and methods in 3.3.1k were accessible, and this in turn meant that the 3.3.1k rich edit demo would not compile in 3.4.1a.
The 3.4.1a rich edit demo thus had to have some changes from 3.3.1k version. One change that someone made (I don't know who) was to completely rewrite the ReadFile and WriteFile functions. Unfortunately, these rewrites were very buggy, so the 3.4.1a rich edit demo did not correctly both read and write any format of Unicode text file -- for every Unicode text file format, the demo either misread the file or miswrote the file.
In version 3.4.1b, all of the changes in 3.3.1k that were in 3.4.1a were removed, except for the justification bug fix. The 3.4.1b rich edit demo has been reverted to the 3.3.1 version. Thus the several weeks of work I did developing, testing, and documenting version 3.3.1k, including the heavy modifications of the rich edit demo, have been discarded.
It appears to me that there was some attempt to incorportate these changes into 3.4.1, but unfortunately whoever did this used only the changes I propsed to the .prg and .c files, while ignoring the changes I proposed to the .ch files. I am confident that using all of the changes I proposed will work properly, since I thoroughly tested them in the rich edit demo.
I am willing to redevelop my proposal as a set of changes to 3.4.1, but I would first like some assurance that this proposal will not be ignored.
Below is a detailed list of source code changes in my previous proposal and their disposal in 3.4.1.
Version numbers used below
3.3.1k - enhancements I suggested for 3.3.1 in November 2014
3.4.1a - official HMG version 3.4.1 that I downloaded in July 2015
3.4.1b - official HMG version 3.4.1 that I downloaded in September 2015
New function GetRtfTxtFileType( cFile, lUtf8Test ) --> nFileType
Returns file type which can be used in RtfTxtLoadFile and RtfTxtSaveFile methods of RichEditBox control
SOURCE\h_richeditbox.prg
3.3.1k lines 508-576
3.4.1a lines 508-576
3.4.1b missing
New function Utf16ByteSwap( cInFile, cOutFile )
Supports UTF-16 BE (big endian) file type for RtfTxtLoadFile and RtfTxtSaveFile methods of RichEditBox control
SOURCE\h_richeditbox.prg
3.3.1k lines 579-621
3.4.1a lines 579-621
3.4.1b missing
New manifest constants RTFTXTFILE_ANSI etc.
RTF and TXT file types returned by GetRtfTxtFileType()
Can be used by RtfTxtLoadFile and RtfTxtSaveFile methods of RichEditBox control
INCLUDE\i_richeditbox.ch
3.3.1k lines 159-169
3.4.1a missing
3.4.1b missing
Fixed rich edit justification bug
viewtopic.php?f=20&t=3995
SOURCE\c_richeditbox.c - InitRichEditBox()
3.3.1k line 185
3.4.1a line 185
3.4.1b line 140
Fixed RichEditBox_StreamIn( hWndControl, cFileName, lSelection, nDataFormat ) --> lSuccess
Skips over BOM in text files if present
SOURCE\c_richeditbox.c
3.3.1k lines 226-291
3.4.1a lines 226-291
3.4.1b missing
Fixed RichEditBox_StreamOut( hWndControl, cFileName, lSelection, nDataFormat ) --> lSuccess
Writes BOM to text files
SOURCE\c_richeditbox.c
3.3.1k lines 305-360
3.4.1a lines 305-360
3.4.1b missing
Enhanced rich edit method RtfLoadFile( cFile, lSelection, nType ) --> lSuccess
Uses file type returned by GetRtfTxtFileType()
Skips over byte order mark in Unicode text file
Supports UTF-16 BE (big endian Unicode text file)
SOURCE\h_controlmisc.prg
3.3.1k lines 9468-9469
3.4.1a lines 9468-9469
3.4.1b missing
Calls new function RichEditBox_RtfTxtLoadFile()
SOURCE\h_richeditbox.prg
3.3.1k lines 441-475
3.4.1a lines 441-475
3.4.1b missing
Enhanced rich edit method RtfSaveFile( cFile, lSelection, nType ) --> lSuccess
Uses file type returned by GetRtfTxtFileType()
Writes byte order mark to Unicode text file
Supports UTF-16 BE (big endian Unicode text file)
SOURCE\h_controlmisc.prg
3.3.1k lines 9473-9474
3.4.1a lines 9473-9474
3.4.1b missing
Calls new function RichEditBox_RtfTxtSaveFile()
SOURCE\h_richeditbox.prg
3.3.1k lines 478-505
3.4.1a lines 478-505
3.4.1b missing
New rich edit method RtfTxtLoadFile( cFile, lSelection, nType ) --> lSuccess
Synonym for RtfLoadFile method
SOURCE\h_controlmisc.prg
3.3.1k line 9468
3.4.1a line 9468
3.4.1b missing
INCLUDE\i_window.ch
3.3.1k lines 162-163, 165
3.4.1a missing
3.4.1b missing
New rich edit method RtfTxtSaveFile( cFile, lSelection, nType ) --> lSuccess
Synonym for RtfSaveFile
SOURCE\h_controlmisc.prg
3.3.1k line 9473
3.4.1a line 9473
3.4.1b missing
INCLUDE\i_window.ch
3.3.1k lines 162-163, 165
3.4.1a missing
3.4.1b missing
New rich edit property HasUnicodeChars (read only)
Detects whether rich edit control contains non-ASCII Unicode characters
SOURCE\h_controlmisc.prg
3.3.1k lines 9293-9296
3.4.1a lines 9293-9296
3.4.1b missing
INCLUDE\i_window.ch
3.3.1k line 154
3.4.1a missing
3.4.1b missing
Calls new function RichEditBox_HasUnicodeChars()
SOURCE\h_richeditbox.prg
3.3.1k lines 414-438
3.4.1a lines 414-438
3.4.1b missing
New rich edit method SelPasteSpecial
Paste special -- needs documentation of clipboard format argument
SOURCE\h_controlmisc.prg
3.3.1k lines 9486-9488
3.4.1a lines 9486-9488
3.4.1b missing
INCLUDE\i_window.ch
3.3.1k line 169
3.4.1a missing
3.4.1b missing
Enhanced function GetFile( [aFilter], [cTitle], [cIniFolder], [lMultiSelect], [lNoChangeDir], [nFilterIndex] ) --> cFileName | aFileNames | NIL
viewtopic.php?f=8&t=4009
Added nFilterIndex to control default file filter
SOURCE\c_dialogs.c
3.3.1k lines 174, 189-190, 222
3.4.1a lines 174, 189-190, 222
3.4.1b missing
SOURCE\h_dialogs.prg
3.3.1k lines 94, 124-126, 130, 133
3.4.1a lines 94, 124-126, 130, 133
3.4.1b lines 93, missing, 123, 125
Enhanced function Putfile( [aFilter], [cTitle], [cIniFolder], [lNoChangeDir], [cDefaultFileName], [cExtFile], [nFilterIndex] ) --> cFileName | NIL
viewtopic.php?f=8&t=4009
Added nFilterInddex to control default file filter
If passed by reference, nFilterIndex returns index of file filter selected by user
SOURCE\c_dialogs.c
3.3.1k lines 269, 277-280, 312, 328-331
3.4.1a lines 269, 277-280, 312, 328-331
3.4.1b missing
SOURCE\h_dialogs.prg
3.3.1k lines 155, 176-178, 186
3.4.1a lines 155, 176-178, 186
3.4.1b lines 146, missing, 171
Enhanced function DoMethod ( Arg1 , Arg2 , Arg3 , Arg4 , Arg5 , Arg6 , Arg7 , Arg8 , Arg9 )
Enabled it to return value from RichEditBox method
SOURCE\h_controlmisc.prg
3.3.1k lines 7944, 7956-7958, 9445
3.4.1a lines 7944, 7956-7958, 9445
3.4.1b missing
Overhauled Rich Edit Demo
viewtopic.php?f=9&t=4030
New features
Main menu
List of recently used files
Resizable windows
Ctrl-B, Ctrl-I, Ctrl-U supported
File name in title, file name and page in status bar
Modified flag, caps lock, num lock, insert status on status bar
Window size, font name and size, file locations, file filters, recently used file names stored in registry
Paragraph numbering
Read and write text files
Many other enhancements
Uses enhancements described above
GetFile function
PutFile function
GetRtfTxtFileType function
RtfTxtLoadFile method
RtfTxtSaveFile method
HasUnicodeChars property
justification bug fix
These in turn use all of the other enhancements described above (except for SelPasteSpecial)
Source
3.3.1
SAMPLES\Controls\RichEditBox\demo.prg
SAMPLES\Controls\RichEditBox\demo.rc
SAMPLES\Controls\RichEditBox\FilesRes\*.*
3.3.1k
SAMPLES\Controls\RichEditBox\demo.prg
SAMPLES\Controls\RichEditBox\demo.rc
SAMPLES\Controls\RichEditBox\Res\*.*
heavily modified from 3.3.1
3.4.1a
SAMPLES\Controls\RichEditBox\demo.prg
SAMPLES\Controls\RichEditBox\demo.rc
SAMPLES\Controls\RichEditBox\Res\*.*
much the same as 3.3.1k, but bugs introduced in modified portions
3.4.1b
SAMPLES\Controls\RichEditBox\demo.prg
SAMPLES\Controls\RichEditBox\demo.rc
SAMPLES\Controls\RichEditBox\FilesRes\*.*
identical to 3.3.1