ScintillaGadget macOS Version >= v10.14

Post bugreports for the Mac OSX version here
User avatar
mk-soft
Addict
Addict
Posts: 3110
Joined: Fri May 12, 2006 6:51 pm
Location: Germany

ScintillaGadget macOS Version >= v10.14

Post by mk-soft »

Moved...
Shardik wrote:
Fred wrote:The left shift is a weird behavior when compiler on OS X > 10.10 (I don't know why)
The weird shift behaviour only occurs when compiling the PB 5.72 IDE from GitHub on MacOS 10.14 'Mojave' or 10.15 'Catalina':

Image

When compiling the PB 5.72 IDE on MacOS 10.9 'Mavericks' to MacOS 10.13 'High Sierra' this bug does not occur!
I have found this information

Link: https://sourceforge.net/p/scintilla/bug ... rolling%22
My Projects ThreadToGUI / OOP-BaseClass / OOP-BaseClassDispatch / EventDesigner V3
PB v3.30 / v5.70 - OS Mac Mini OSX 10.xx - VM Window Pro / Linux Ubuntu
Downloads on my Webspace
Fred
Administrator
Administrator
Posts: 14357
Joined: Fri May 17, 2002 4:39 pm
Location: France
Contact:

Re: ScintillaGadget macOS Version >= v10.14

Post by Fred »

Nice finding, I will take a look to integrate it (but as I compile on OS X 10.10, I don't know if it will work at all).
User avatar
kenmo
Addict
Addict
Posts: 1897
Joined: Tue Dec 23, 2003 3:54 am

Re: ScintillaGadget macOS Version >= v10.14

Post by kenmo »

I've finally updated my MacOS and PureBasic and now I'm having this issue too :(

Any update on a fix?
OR
Can any Cocoa expert figure out a workaround, based on this Scintilla fix patch?
https://sourceforge.net/p/scintilla/cod ... 3140cb786/
User avatar
kenmo
Addict
Addict
Posts: 1897
Joined: Tue Dec 23, 2003 3:54 am

Re: ScintillaGadget macOS Version >= v10.14

Post by kenmo »

I would pay a little $ for a workaround, Cocoa experts... :mrgreen:
User avatar
mk-soft
Addict
Addict
Posts: 3110
Joined: Fri May 12, 2006 6:51 pm
Location: Germany

Re: ScintillaGadget macOS Version >= v10.14

Post by mk-soft »

The problem is that Fred has to adjust them when creating the ScintillaGadget.
Unfortunately it does not work with CocoaMessage afterwards. I already tried that.
My Projects ThreadToGUI / OOP-BaseClass / OOP-BaseClassDispatch / EventDesigner V3
PB v3.30 / v5.70 - OS Mac Mini OSX 10.xx - VM Window Pro / Linux Ubuntu
Downloads on my Webspace
User avatar
kenmo
Addict
Addict
Posts: 1897
Joined: Tue Dec 23, 2003 3:54 am

Re: ScintillaGadget macOS Version >= v10.14

Post by kenmo »

I see. I don't know Cocoa well, but I'm always impressed with what people can do with CocoaMessage() at runtime :)
User avatar
Shardik
Addict
Addict
Posts: 1839
Joined: Thu Apr 21, 2005 2:38 pm
Location: Germany

Re: ScintillaGadget macOS Version >= v10.14

Post by Shardik »

mk-soft wrote:Unfortunately it does not work with CocoaMessage afterwards. I already tried that.
Same with me. Currently I would assume that Fred or freak have to implement at least Scintilla release 3-7-3 in oder to solve that problem.

It was a tough problem: you may take a look into this problem solving thread on Google groups.

They even got support from Apple Developer Technical Support twice although that didn't result in a solution. In ScintillaView.mm (Scintilla release 4-1-3, search for "10_14" twice) the final patch was applied...
Last edited by Shardik on Thu Jul 02, 2020 10:05 am, edited 1 time in total.
User avatar
kenmo
Addict
Addict
Posts: 1897
Joined: Tue Dec 23, 2003 3:54 am

Re: ScintillaGadget macOS Version >= v10.14

Post by kenmo »

What a pain... it took 6 months for some smart people to workaround Apple's change...

And I know that PureBasic is slow to update Scintilla versions because it breaks other backwards compatibilities... :(
User avatar
kenmo
Addict
Addict
Posts: 1897
Joined: Tue Dec 23, 2003 3:54 am

Re: ScintillaGadget macOS Version >= v10.14

Post by kenmo »

Coming back to this, just to be clear:

To enable Dark Mode support, I need to build on 10.14+ right?

But to avoid this Scintilla issue, I need to build on 10.13- ?

:( Can't have both. So my software can't support MacOS Dark Mode until we have a Scintilla fix (PB 5.73 maybe)
User avatar
mk-soft
Addict
Addict
Posts: 3110
Joined: Fri May 12, 2006 6:51 pm
Location: Germany

Re: ScintillaGadget macOS Version >= v10.14

Post by mk-soft »

Please update ScintillaGadget ...
My Projects ThreadToGUI / OOP-BaseClass / OOP-BaseClassDispatch / EventDesigner V3
PB v3.30 / v5.70 - OS Mac Mini OSX 10.xx - VM Window Pro / Linux Ubuntu
Downloads on my Webspace
User avatar
kenmo
Addict
Addict
Posts: 1897
Joined: Tue Dec 23, 2003 3:54 am

Re: ScintillaGadget macOS Version >= v10.14

Post by kenmo »

mk-soft wrote:Please update ScintillaGadget ...
This bugfix is my #1 most wanted right now :(

I didn't want to bump it again, but since you did... :mrgreen:
User avatar
mk-soft
Addict
Addict
Posts: 3110
Joined: Fri May 12, 2006 6:51 pm
Location: Germany

Re: ScintillaGadget macOS Version >= v10.14

Post by mk-soft »

Then you could finally compile the Purebasic IDE in darkmode. 8)
My Projects ThreadToGUI / OOP-BaseClass / OOP-BaseClassDispatch / EventDesigner V3
PB v3.30 / v5.70 - OS Mac Mini OSX 10.xx - VM Window Pro / Linux Ubuntu
Downloads on my Webspace
User avatar
Danilo
Addict
Addict
Posts: 3010
Joined: Sat Apr 26, 2003 8:26 am
Location: Planet Earth

Re: ScintillaGadget macOS Version >= v10.14

Post by Danilo »

Works without problems here. 8) :twisted:

Code: Select all

If OpenWindow(0, 0, 0, 800, 600, "ScintillaGadget", #PB_Window_SystemMenu | #PB_Window_ScreenCentered)
    
    If InitScintilla()
      ScintillaGadget(0, 10, 10, 780, 580, 0)
      
      ; Output set to red color
      ScintillaSendMessage(0, #SCI_STYLESETFORE, 0, RGB(255, 0, 0))
      
      ; Set the initial text to the ScintillaGadget
      *Text=UTF8("This is a simple ScintillaGadget with text... :: This is a simple ScintillaGadget with text...")
      ScintillaSendMessage(0, #SCI_SETTEXT, 0, *Text)
      FreeMemory(*Text) ; The buffer made by UTF8() has to be freed, to avoid memory leak
      
      ; Adding a second line of text with linebreak before
      For i = 0 To 100
      Text$ = Chr(10) + "This is a simple ScintillaGadget with text... :: This is a simple ScintillaGadget with text..."
      *Text=UTF8(Text$)
      ScintillaSendMessage(0, #SCI_APPENDTEXT, Len(Text$), *Text)
      FreeMemory(*Text)
      Next
    EndIf
    
    Repeat : Until WaitWindowEvent() = #PB_Event_CloseWindow
EndIf
User avatar
mk-soft
Addict
Addict
Posts: 3110
Joined: Fri May 12, 2006 6:51 pm
Location: Germany

Re: ScintillaGadget macOS Version >= v10.14

Post by mk-soft »

Danilo wrote:Works without problems here. 8) :twisted:
What is working here ???

The ScintiallaGadget still jumps horizontally the ScrollBar and the content when you click with the mouse in the content.
And this since macOS Catalina

It is annoying that this bug has not been fixed. :( :evil:
My Projects ThreadToGUI / OOP-BaseClass / OOP-BaseClassDispatch / EventDesigner V3
PB v3.30 / v5.70 - OS Mac Mini OSX 10.xx - VM Window Pro / Linux Ubuntu
Downloads on my Webspace
User avatar
Danilo
Addict
Addict
Posts: 3010
Joined: Sat Apr 26, 2003 8:26 am
Location: Planet Earth

Re: ScintillaGadget macOS Version >= v10.14

Post by Danilo »

mk-soft wrote:The ScintiallaGadget still jumps horizontally the ScrollBar and the content when you click with the mouse in the content.
Thanks for describing the bug! That's what I wanted to know. ;)
Post Reply