pb 5b4 : trackbargadget is not realtime

Got an idea for enhancing PureBasic? New command(s) you'd like to see?
drgolf
Enthusiast
Enthusiast
Posts: 106
Joined: Tue Mar 03, 2009 3:40 pm
Location: france

pb 5b4 : trackbargadget is not realtime

Post by drgolf »

on osx : the value change only when the mouse is released : not good
on windows : the value change when the trackbbar position change

Code: Select all

Enumeration 
  #Window_0
EndEnumeration

Enumeration 
  #text_0
  #tb_0
EndEnumeration


Procedure InitWindow_0()
  OpenWindow(#Window_0, 0, 0, 290, 130, "", #PB_Window_SystemMenu)
  TextGadget(#text_0,10,10,50,20,"0",#PB_Text_Border|#PB_Text_Center)
  TrackBarGadget(#tb_0,10,70,150,25,0,100)
EndProcedure

initwindow_0()

Repeat
Select WaitWindowEvent()
    Case #PB_Event_Gadget
      Select EventGadget()
        Case #tb_0
          SetGadgetText(#text_0,Str(GetGadgetState(#tb_0)))
      EndSelect
    Case #PB_Event_CloseWindow
      CloseWindow(#window_0)
      Break
  EndSelect
ForEver
End
User avatar
Mindphazer
Enthusiast
Enthusiast
Posts: 456
Joined: Mon Sep 10, 2012 10:41 am
Location: Savoie

Re: pb 5b4 : trackbargadget is not realtime

Post by Mindphazer »

It's not specific to PB 5.00
It does the same on PB 4.61 and 4.60 (and probably versions below ; I don't have them anymore)

But... should it be considered as a bug ?
MacBook Pro 16" M4 Pro - 24 Gb - MacOS 15.4.1 - Iphone 15 Pro Max - iPad at home
...and unfortunately... Windows at work...
Polo
Addict
Addict
Posts: 2422
Joined: Tue May 06, 2003 5:07 pm
Location: UK

Re: pb 5b4 : trackbargadget is not realtime

Post by Polo »

It's a missing feature I'd say, like live scrollbars on all OSes.
User avatar
Mindphazer
Enthusiast
Enthusiast
Posts: 456
Joined: Mon Sep 10, 2012 10:41 am
Location: Savoie

Re: pb 5b4 : trackbargadget is not realtime

Post by Mindphazer »

I agree
MacBook Pro 16" M4 Pro - 24 Gb - MacOS 15.4.1 - Iphone 15 Pro Max - iPad at home
...and unfortunately... Windows at work...
Fred
Administrator
Administrator
Posts: 18162
Joined: Fri May 17, 2002 4:39 pm
Location: France
Contact:

Re: pb 5b4 : trackbargadget is not realtime

Post by Fred »

Unfortunately it doesn't work live on OS X, but we can't do anything about it.
wilbert
PureBasic Expert
PureBasic Expert
Posts: 3942
Joined: Sun Aug 08, 2004 5:21 am
Location: Netherlands

Re: pb 5b4 : trackbargadget is not realtime

Post by wilbert »

I assume it's the same problem you mentioned before about the PureBasic event queue being locked until you release the button ?
OS X itself calls the target/action also while the trackbar gadget is used.
Fred
Administrator
Administrator
Posts: 18162
Joined: Fri May 17, 2002 4:39 pm
Location: France
Contact:

Re: pb 5b4 : trackbargadget is not realtime

Post by Fred »

Yes, it's the same issue.
IdeasVacuum
Always Here
Always Here
Posts: 6426
Joined: Fri Oct 23, 2009 2:33 am
Location: Wales, UK
Contact:

Re: pb 5b4 : trackbargadget is not realtime

Post by IdeasVacuum »

Oh well, looks like Apple are well on the way to self-destruct again, so it won't be a problem in the future :shock:
IdeasVacuum
If it sounds simple, you have not grasped the complexity.
wilbert
PureBasic Expert
PureBasic Expert
Posts: 3942
Joined: Sun Aug 08, 2004 5:21 am
Location: Netherlands

Re: pb 5b4 : trackbargadget is not realtime

Post by wilbert »

IdeasVacuum wrote:Oh well, looks like Apple are well on the way to self-destruct again, so it won't be a problem in the future :shock:
It's not an OS X issue, it's a PureBasic issue.
Of course scrollbars and sliders are working realtime in the OS itself. 8)
IdeasVacuum
Always Here
Always Here
Posts: 6426
Joined: Fri Oct 23, 2009 2:33 am
Location: Wales, UK
Contact:

Re: pb 5b4 : trackbargadget is not realtime

Post by IdeasVacuum »

...it won't matter whose issue it is if the platform isn't there anymore - but I jest. :twisted:
IdeasVacuum
If it sounds simple, you have not grasped the complexity.
gwhuntoon
New User
New User
Posts: 9
Joined: Sun Mar 03, 2013 2:50 pm
Location: Muskegon, MI USA

Re: pb 5b4 : trackbargadget is not realtime

Post by gwhuntoon »

Well, this response is way late but it's supported now in PB 5.21 with BindEvent. I modified the above example as follows and have only tested it in OSX Mavericks.

Code: Select all

Enumeration 
  #Window_0
EndEnumeration

Enumeration 
  #text_0
  #tb_0
EndEnumeration

Procedure GadgetHandler()
  SetGadgetText(#text_0,Str(GetGadgetState(#tb_0)))  
EndProcedure

Procedure InitWindow_0()
  OpenWindow(#Window_0, 0, 0, 290, 130, "", #PB_Window_SystemMenu)
  TextGadget(#text_0,10,10,50,20,"0",#PB_Text_Border|#PB_Text_Center)
  TrackBarGadget(#tb_0,10,70,150,25,0,100)
  
  BindEvent(#PB_Event_Gadget, @GadgetHandler())
EndProcedure


initwindow_0()

Repeat
Select WaitWindowEvent()
    Case #PB_Event_CloseWindow
      CloseWindow(#window_0)
      Break
  EndSelect
ForEver
End
Post Reply