Forum Discussion

ThunduBeedi's avatar
ThunduBeedi
Occasional Contributor
9 years ago

Clicking on a date in a calendar does not update on another window.

Hi,

I have two controls, one SysMonthCal32 calendar and another SWT_Window table. Manually, if I click on a date in the calendar, the date will be updated on the SWT_Window0 as a label. 

 

When I use GUIObject.click() on a date, I can see the click happen in the calendar date, but the date is not updated on the SWT_Window0.

 

Any idea, where the problem is?

 

Thank you.

2 Replies

  • TanyaYatskovska's avatar
    TanyaYatskovska
    SmartBear Alumni (Retired)

    Hi Thundubeedi,

     

    The event handler that changes the date in the SWT_Window control wasn’t fired for some reason. If you use the Click method to select the date in the SysMonthCal32 control, the onClick event handler should be called. Is it possible that the code that assigns this value to the other control is located in another event handler?

    • ThunduBeedi's avatar
      ThunduBeedi
      Occasional Contributor

      Hi Tanya,

      I am sorry to say this, but I have no clue whether the code to assign the date value to another control is in some other event handler.

      Since the value is updated with a combination of key and click, does this means the code is in some other event handler apart from onClick? If so, is there a way to generate key event rather than using obj.key()? This being said, manually doing, a key action is never required.

       

      Thank you.