It is currently Sat Apr 21, 2018 11:58 pm

All times are UTC + 1 hour




Post new topic Reply to topic  [ 6 posts ] 
Author Message
 Post subject: [Done] 5.61 Gadget doesn't redraw on High Sierra
PostPosted: Tue Dec 26, 2017 8:50 pm 
Offline
Addict
Addict
User avatar

Joined: Tue Dec 23, 2003 3:54 am
Posts: 1545
Here's an example of gadgets not redrawing after upgrade to Mac OS "High Sierra"... this affects the PB IDE and my own PB programs!

Click "Add" to add a few ScintillaGadgets (at least 3)
Click "Next" to cycle through them, example: 1 -> 2 -> 3 -> 1

Notice when unhiding them, they do not appear!

Code:
Enumeration
  #Button1
  #Button2
EndEnumeration

OpenWindow(0, 0, 0, 640, 480, "Add 3+ gadgets, then cycle through them", #PB_Window_ScreenCentered | #PB_Window_SystemMenu)
ButtonGadget(#Button1, 10, 0, 100, 20, "Add Gadget")
ButtonGadget(#Button2, 200, 0, 100, 20, "Next Gadget")
InitScintilla()

Global nGadgets.i = 0
Global Selected.i = 0

Procedure AddGadget()
  If (nGadgets < 9)
    If (nGadgets > 0)
      HideGadget(10 + Selected, #True)
    EndIf
    Selected = nGadgets
    ScintillaGadget(10 + Selected, 10, 30, WindowWidth(0) - 20, WindowHeight(0)-40, #Null)
    St.s = Str(1 + nGadgets)
    ScintillaSendMessage(10 + Selected, #SCI_SETTEXT, #Null, @St)
    ScintillaSendMessage(10 + Selected, #SCI_STYLESETBACK, #STYLE_DEFAULT, RGB(240+Random(15),240+Random(15),240+Random(15)))
    SetActiveGadget(10 + Selected)
    nGadgets + 1
  EndIf
EndProcedure

Procedure NextGadget()
  If (nGadgets > 1)
    HideGadget(10 + Selected, #True)
    Selected = (Selected + 1) % nGadgets
    HideGadget(10 + Selected, #False)
  EndIf
EndProcedure

BindGadgetEvent(#Button1, @AddGadget())
BindGadgetEvent(#Button2, @NextGadget())
AddGadget()
Repeat
  Event = WaitWindowEvent()
Until (Event = #PB_Event_Menu) Or (Event = #PB_Event_CloseWindow)


Top
 Profile  
Reply with quote  
 Post subject: [Done] Re: [5.61] Gadget doesn't redraw on High Sierra
PostPosted: Tue Dec 26, 2017 8:53 pm 
Offline
Addict
Addict
User avatar

Joined: Tue Dec 23, 2003 3:54 am
Posts: 1545
Maybe it's a ScintillaGadget problem, because EditorGadget seems to work OK:

Code:
OpenWindow(0, 0, 0, 640, 480, "Add 3+ gadgets, then cycle through them", #PB_Window_ScreenCentered | #PB_Window_SystemMenu)
ButtonGadget(1, 10, 0, 100, 20, "Add Gadget")
ButtonGadget(2, 200, 0, 100, 20, "Next Gadget")

Global nGadgets.i = 0
Global Selected.i = 0

Procedure AddGadget()
  If (nGadgets < 9)
    If (nGadgets > 0)
      HideGadget(10 + Selected, #True)
    EndIf
    Selected = nGadgets
    EditorGadget(10 + Selected, 10, 30, WindowWidth(0) - 20, WindowHeight(0)-40, 0)
    SetGadgetText(10 + Selected, Str(1 + nGadgets))
    nGadgets + 1
  EndIf
EndProcedure

Procedure NextGadget()
  If (nGadgets > 1)
    HideGadget(10 + Selected, #True)
    Selected = (Selected + 1) % nGadgets
    HideGadget(10 + Selected, #False)
  EndIf
EndProcedure

BindGadgetEvent(1, @AddGadget())
BindGadgetEvent(2, @NextGadget())
AddGadget()
Repeat
  Event = WaitWindowEvent()
Until (Event = #PB_Event_Menu) Or (Event = #PB_Event_CloseWindow)


Top
 Profile  
Reply with quote  
 Post subject: Re: [5.61] Gadget doesn't redraw on High Sierra
PostPosted: Wed Dec 27, 2017 11:52 am 
Offline
Addict
Addict
User avatar

Joined: Fri May 12, 2006 6:51 pm
Posts: 1195
Location: Germany
Confirmed.

Same problem with PB-IDE

_________________
My Projects OOP-BaseClass / OOP-BaseClassDispatch / Event-Designer /
PB v3.30 / v5.60 - OS Mac Mini OSX 10.xx - VM Window Pro / Linux Ubuntu
Downloads on my Webspace


Top
 Profile  
Reply with quote  
 Post subject: Re: [5.61] Gadget doesn't redraw on High Sierra
PostPosted: Sun Jan 07, 2018 1:49 pm 
Offline
Administrator
Administrator

Joined: Fri May 17, 2002 4:39 pm
Posts: 13252
Location: France
Fixed.


Top
 Profile  
Reply with quote  
 Post subject: Re: [Done] 5.61 Gadget doesn't redraw on High Sierra
PostPosted: Wed Jan 10, 2018 12:40 am 
Offline
Addict
Addict
User avatar

Joined: Tue Dec 23, 2003 3:54 am
Posts: 1545
Thank you.

Just wondering: Could you say how it was fixed? Did the Scintilla version update?


Top
 Profile  
Reply with quote  
 Post subject: Re: [Done] 5.61 Gadget doesn't redraw on High Sierra
PostPosted: Wed Jan 10, 2018 9:25 am 
Offline
Administrator
Administrator

Joined: Fri May 17, 2002 4:39 pm
Posts: 13252
Location: France
We put the scintilla component in a NSScrollView because early version required it (IIRC), but it was no more necessary. Just switching the NSScrollView to NSBox fixed the issue (and it's better anyway as Scintilla now handle the scroll itself).


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 6 posts ] 

All times are UTC + 1 hour


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  

 


Powered by phpBB © 2008 phpBB Group
subSilver+ theme by Canver Software, sponsor Sanal Modifiye