[Done] PB5.60 Date gadget doesn't function correctly on OSX...

Post bugreports for the Mac OSX version here
User avatar
DoubleDutch
Addict
Addict
Posts: 3219
Joined: Thu Aug 07, 2003 7:01 pm
Location: United Kingdom
Contact:

[Done] PB5.60 Date gadget doesn't function correctly on OSX...

Post by DoubleDutch »

GetGadgetState on the date gadget does not return the date. Works on Windows, returns 0 on OSX.
(SetGadgetState does work ok though)

On Windows it's easy to change the year if using the Calendar (it zoomes out to pick the year), but on OSX you have to cycle through all the years using the left/right buttons.

If you enable the date tick box on OSX then you can't manually edit the date text on the Mac.
https://deluxepixel.com <- My Business website
https://reportcomplete.com <- School end of term reports system
User avatar
Shardik
Addict
Addict
Posts: 1989
Joined: Thu Apr 21, 2005 2:38 pm
Location: Germany

Re: PB5.60 Date gadget doesn't function correctly on OSX...

Post by Shardik »

DoubleDutch wrote:GetGadgetState on the date gadget does not return the date. Works on Windows, returns 0 on OSX.
Sorry, but I can't confirm this finding. The following test works like a charm in reading the date with GetGadgetState() directly after creation of the DateGadget and after changing the date in the dropped down calendar (tested successfully on MacOS 10.6.8 'Snow Leopard' with PB 5.60 x86 and MacOS 10.12.3 'Sierra' with PB 5.60 x86 and x64):

Code: Select all

OpenWindow(0, 270, 100, 160, 200, "DateGadget")
DateGadget(0, 10, 10, 140, 25, "Date: %mm/%dd/%yyyy")

MessageRequester("Info", "Current date: " +
  FormatDate("%mm/%dd/%yyyy", GetGadgetState(0)))

Repeat
  Select WaitWindowEvent()
    Case #PB_Event_CloseWindow
      Break
    Case #PB_Event_Gadget
      If EventGadget() = 0 And EventType() = #PB_EventType_Change
        MessageRequester("Info", "Changed date: " +
          FormatDate("%mm/%dd/%yyyy", GetGadgetState(0)))
      EndIf
  EndSelect
ForEver
DoubleDutch wrote:If you enable the date tick box on OSX then you can't manually edit the date text on the Mac.
I can confirm this bug. Manually editing the date is only possible when the tick box is disabled.

Another bug is revealed if you edit the date manually and then click onto the drop down button: a manually changed month is not updated in the calendar and after manually changing a day the selected day is not updated. You may reproduce this behaviour with the following simple test code:

Code: Select all

OpenWindow(0, 270, 100, 190, 200, "DateGadget")
DateGadget(0, 10, 10, 170, 25, "Date: %mm/%dd/%yyyy", 0, #PB_Date_CheckBox)

Repeat
Until WaitWindowEvent() = #PB_Event_CloseWindow
User avatar
DoubleDutch
Addict
Addict
Posts: 3219
Joined: Thu Aug 07, 2003 7:01 pm
Location: United Kingdom
Contact:

Re: PB5.60 Date gadget doesn't function correctly on OSX...

Post by DoubleDutch »

Thanks for testing, the date problem (getgadgetstate) occurred for me in a large program. I'll try your test code next time I'm on the Mac. :)
https://deluxepixel.com <- My Business website
https://reportcomplete.com <- School end of term reports system
Fred
Administrator
Administrator
Posts: 16619
Joined: Fri May 17, 2002 4:39 pm
Location: France
Contact:

Re: PB5.60 Date gadget doesn't function correctly on OSX...

Post by Fred »

Did you get the chance to test ?
User avatar
mk-soft
Always Here
Always Here
Posts: 5335
Joined: Fri May 12, 2006 6:51 pm
Location: Germany

Re: PB5.60 Date gadget doesn't function correctly on OSX...

Post by mk-soft »

I can confirm this bug. Manually editing the date don´t work at all

Code: Select all

OpenWindow(0, 270, 100, 180, 200, "DateGadget")
DateGadget(0, 10, 10, 140, 25, "Date: %mm/%dd/%yyyy")
;DateGadget(0, 10, 10, 170, 25, "Date: %mm/%dd/%yyyy", 0, #PB_Date_CheckBox)

Repeat
  Select WaitWindowEvent()
    Case #PB_Event_CloseWindow
      Break
    Case #PB_Event_Gadget
      If EventGadget() = 0 And EventType() = #PB_EventType_Change
        Debug (FormatDate("%mm/%dd/%yyyy", GetGadgetState(0)) + " " + GetGadgetText(0))
      EndIf
  EndSelect
ForEver
MacOS: 10.12.6; PB v5.60 Odd
My Projects ThreadToGUI / OOP-BaseClass / EventDesigner V3
PB v3.30 / v5.75 - OS Mac Mini OSX 10.xx - VM Window Pro / Linux Ubuntu
Downloads on my Webspace / OneDrive
Fred
Administrator
Administrator
Posts: 16619
Joined: Fri May 17, 2002 4:39 pm
Location: France
Contact:

Re: [Done] PB5.60 Date gadget doesn't function correctly on OSX...

Post by Fred »

Fixed.
Post Reply