Can't select new date with Dategadget()

Linux specific forum
Hexagon
User
User
Posts: 26
Joined: Sun Mar 13, 2005 9:52 pm
Location: Norway

Can't select new date with Dategadget()

Post by Hexagon »

I can open the date selection window, but I can't change the date, or even close the selection window. This also happens with the example file for dategadget.

I tried this on two different computers, Ubuntu 7.10 Gutsy/PB 4.20 and ubuntu 8.04 Hardy/PB 4.30beta1, both with the same results. The same code compiles and works fine in Windows XP and PB 4.20. If I run the windows compiled executable in unbuntu (with wine 1.1.4) I do get a working dategadget, but there is nothing returned back from GetGadgetText.

Am I doing something wrong, or do I miss some libraries to get this working?
User avatar
Progi1984
Addict
Addict
Posts: 806
Joined: Fri Feb 25, 2005 1:01 am
Location: France > Rennes
Contact:

Post by Progi1984 »

Have you some code for testing tonight ?
Hexagon
User
User
Posts: 26
Joined: Sun Mar 13, 2005 9:52 pm
Location: Norway

Post by Hexagon »

Code: Select all

If OpenWindow(0, 0, 0, 250, 200, "DateGadget Test", #PB_Window_SystemMenu | #PB_Window_ScreenCentered)
  If CreateGadgetList(WindowID(0))
    DateGadget(0, 10, 70, 230, 25,"Date %dd.%mm.%yyyy",0, #PB_Date_CheckBox)
    TextGadget(1,10,10,230,25,"xx",#PB_Text_Border)
    TextGadget(2,10,40,230,25,"xx",#PB_Text_Border)
    Repeat:
      SetGadgetText(1,"GetGadgetState: "+FormatDate("%dd.%mm.%yyyy",GetGadgetState(0)))
      SetGadgetText(2, "GetGadgetText: "+GetGadgetText(0))
      Delay(10)
    Until WindowEvent() = #PB_Event_CloseWindow
    SetGadgetState(0,946000000)
    Repeat:
     SetGadgetText(1,"GetGadgetState: "+FormatDate("%dd.%mm.%yyyy",GetGadgetState(0)))
     SetGadgetText(2, "GetGadgetText: "+GetGadgetText(0))
     Delay(10)
    Until WindowEvent() = #PB_Event_CloseWindow
  EndIf
EndIf
The checkbox works, and I do get a date as output, but I am unable to change the date by using the calendar. I can only change it by using SetGagdetState().
User avatar
Progi1984
Addict
Addict
Posts: 806
Joined: Fri Feb 25, 2005 1:01 am
Location: France > Rennes
Contact:

Post by Progi1984 »

In this example too, the dategadget doesn't run :

Code: Select all

  If OpenWindow(0, 0, 0, 250, 250,"DateGadget", #PB_Window_SystemMenu|#PB_Window_ScreenCentered)
    If CreateGadgetList(WindowID(0))
      DateGadget(0, 10, 10, 190, 25, "Date : %dd/%mm/%yyyy Heure : %hh:%ii")
      Repeat: Until WaitWindowEvent() = #PB_Event_CloseWindow
    EndIf
  EndIf
Post a bug report.
Hexagon
User
User
Posts: 26
Joined: Sun Mar 13, 2005 9:52 pm
Location: Norway

Post by Hexagon »

Your example dosen't work on my system either. The bug is already posted over one month ago. Stange I didn't find it when I searched for information...
Post Reply