GoScintilla for PB 5.x

Developed or developing a new product in PureBasic? Tell the world about it.
User avatar
Tristano
Enthusiast
Enthusiast
Posts: 190
Joined: Thu Nov 26, 2015 6:52 pm
Location: Italy
Contact:

GoScintilla for PB 5.x

Post by Tristano »

GoScintilla for PB >= 5.10

Just wanted to inform everyone that I’ve published an updated version of Stephen’s GoScintilla, compatible with PureBASIC 5.x:
  • The changes required to make it compatible with PB 5.x brake its backward compatibility with PureBASIC versions < 5.10.
  • For this reason I've changed its version number to 3.0.0 (following Semantic Version 2.0 standard, which is customary on GitHub).
  • No new features added, just fixed GoScintilla.pbi to work with PB 5.x.
I want to thank Stephen (srod) for permission to go ahead with this project.
All contributions are welcome.

B.R.

Tristano

Post Sscriptum

After consulting with GoScintilla's author, I wanted to emphasize that version 3 in my fork of GoScintilla only refers to the fact that it breaks backward compatiblity.
IT DOESN'T MEAN that it adds new features — it doesn't (not yet at least).

I've changed its MAJOR version number because on GitHub is customary to follow Semantic Versioning 2.0 standard:
8) Major version X (X.y.z | X > 0) MUST be incremented if any backwards incompatible changes are introduced to the public API. It MAY include minor and patch level changes. Patch and minor version MUST be reset to 0 when major version is incremented.
I apologize if this lead to any confusion, I didn't mean to give the impression that I had introduced new features; I only wanted to distribute an updated version that works with current PB 5.x.

I've now also renamed the project folder from "GoScintilla3" to "GoScintilla", to de-emphasize the version number; and now refer to it just as GoScintilla for PB5.x in the documentation. References to its being v3.0 are kept along with explanation why I changed it.
Last edited by Tristano on Tue Jan 03, 2017 3:03 pm, edited 3 times in total.
The PureBASIC Archives: FOSS Resources:
srod
PureBasic Expert
PureBasic Expert
Posts: 10589
Joined: Wed Oct 29, 2003 4:35 pm
Location: Beyond the pale...

Re: GoScintilla 3 — for PB 5.x

Post by srod »

Tristano, the current version of GoScintilla (2.7) seems to work fine with PB 5.51 x86. Is there something I am missing?

Otherwise I am happy for you to do what you wish with the code.
I may look like a mule, but I'm not a complete ass.
User avatar
ts-soft
Always Here
Always Here
Posts: 5756
Joined: Thu Jun 24, 2004 2:44 pm
Location: Berlin - Germany

Re: GoScintilla 3 — for PB 5.x

Post by ts-soft »

@srod
I have only tested to first error: #PB_Sort_String

Greetings
Thomas
PureBasic 5.73 | SpiderBasic 2.30 | Windows 10 Pro (x64) | Linux Mint 20.1 (x64)
Old bugs good, new bugs bad! Updates are evil: might fix old bugs and introduce no new ones.
Image
srod
PureBasic Expert
PureBasic Expert
Posts: 10589
Joined: Wed Oct 29, 2003 4:35 pm
Location: Beyond the pale...

Re: GoScintilla 3 — for PB 5.x

Post by srod »

Ah, memory is getting faulty in my old age. I adjusted the code some time ago so that it was compatible with PB 5.5x and plain forgot about it!

Doh! :)
I may look like a mule, but I'm not a complete ass.
User avatar
Tristano
Enthusiast
Enthusiast
Posts: 190
Joined: Thu Nov 26, 2015 6:52 pm
Location: Italy
Contact:

Re: GoScintilla for PB 5.x

Post by Tristano »

Yes, there were 3 lines of code which I had to change for it to work with PB5.x.

Line 108, "Native types can't be used with pointers" (now: *bytePointer):

Code: Select all

        *bytePointer.i              ;Used for left delimiters (separators).
Line 1787, "Constant not found: #PB_Sort_String" (now: #PB_String):

Code: Select all

        SortStructuredList(*this\Keywords(), #PB_Sort_Ascending|t1, OffsetOf(GoScintillaKeyword\keyWord$), #PB_Sort_String)
Line 1853 (same as above):

Code: Select all

       SortStructuredList(*this\Keywords(), #PB_Sort_Ascending|t1, OffsetOf(GoScintillaKeyword\keyWord$), #PB_Sort_String)
Both these errors refer to changes brought in with PureBasic release 5.10:

http://www.purebasic.com/documentation/ ... story.html
14th February 2013 : Version 5.10
- Changed: replaced #PB_Sort_<Type> with #PB_<Type> to avoid possible errors
- Changed: disallow native type for pointers
So, these 3 small changes I've made are making GoScintilla work with PB >= 5.10, and break its compatiblity with PB <5.10.

Hence, I opted to update its version number to 3.0.
The PureBASIC Archives: FOSS Resources:
Post Reply