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.
[Done] PB5.60 Date gadget doesn't function correctly on OSX...
- DoubleDutch
- 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...
https://deluxepixel.com <- My Business website
https://reportcomplete.com <- School end of term reports system
https://reportcomplete.com <- School end of term reports system
Re: PB5.60 Date gadget doesn't function correctly 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):DoubleDutch wrote:GetGadgetState on the date gadget does not return the date. Works on Windows, returns 0 on OSX.
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
I can confirm this bug. Manually editing the date is only possible when the tick box is disabled.DoubleDutch wrote:If you enable the date tick box on OSX then you can't manually edit the date text on the Mac.
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
- DoubleDutch
- 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...
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
https://reportcomplete.com <- School end of term reports system
Re: PB5.60 Date gadget doesn't function correctly on OSX...
Did you get the chance to test ?
Re: PB5.60 Date gadget doesn't function correctly on OSX...
I can confirm this bug. Manually editing the date don´t work at all
MacOS: 10.12.6; PB v5.60 Odd
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
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
PB v3.30 / v5.75 - OS Mac Mini OSX 10.xx - VM Window Pro / Linux Ubuntu
Downloads on my Webspace / OneDrive