I am trying to set the Date (immediate) of a Calendar object when a window is first opened. So I create a script on the internalFrameOpened event of the window. I first tried the Set property ta\b. This got me the path to the property but there was no way to get the date. So, I wrote this scropt myself after playing with the Script Playground:
I used the Set Property tab. It generated this sctript:
value = u'now(0)'
system.gui.getParentWindow(event).getComponentForPath('Root Container.Calendar').date = value
When I run the app I get this error:
TypeError: can't convert u'now(0)' to java.util.Date
I am just trying to set the current date of the calendar component to today. What am I doing wrong?
That worked. What I am really trying to get to is setting the calendar to midnight Monday of the current week. Until I have time to muck around with the scripting some more I will use this. I did format the result of now(0) to just the date so I am getting midnight as my date. Thanks.