How can I add an alarm's absoluteTrigger to a date picker ?

Hallo,

I call a task from CalCalendarStore, read out the absolute trigger from a set alarm of a task.
Now I would like to add this value to a date picker.
My attempt failed without error message:


log foundTask
			(*
			2010-09-22 21:37:30.234 Test dataSource[228:a0f] CalTask <0xffe80> {uid = F7B94A94-EC2F-4925-A0BD-A9623DF5F150; dateStamp = 2010-09-22 20:18:25 +0200; title = gggggggggg; notes = (null); URL = (null); calendar = CalCalendar <0xe4720> {UID = 7703BCF7-DFE7-45F0-928E-826793401EFC; title = Schultermine; notes = (null); color = NSCalibratedRGBColorSpace 0.690196 0.152941 0.682353 1; type = Local; editable = 1}; 

alarms = ("CalAlarm <0xee5c0> {action = AUDIO; URL = (null); sound = Basso; emailAddress = (null); 

relativeTrigger = 0.000000; 
absoluteTrigger = 2010-09-28 01:45:00 +0200}"); 

dueDate = 2010-09-30 00:00:00 +0200; completedDate = (null); priorty = 0}
			*)
			
			set theAbsoluteTrigger to foundTask's alarms's absoluteTrigger
			
			log theAbsoluteTrigger
			-- 2010-09-22 21:21:26.486 Test dataSource[1754:a0f] ("2010-09-28 01:45:00 +0200")
			-- correct absoluteTrigger date
			my alarmDatePicker's setDateValue_(theAbsoluteTrigger)

-- alarmDatePicker's property is bound to alarmDatePicker


Any idea how to do this?

Heiner

I can’t see anything wrong – are you sure about the date picker connection? Try testing with:

		my alarmDatePicker's setDateValue_(current application's NSDate's |date|())

I found the mistake:

The’ absoluteTrigger’ is obviously a set: (“2010-09-28 01:45:00 +0200”).

So the following line works:


my alarmDatePicker's setDateValue_(item 1 of theAbsoluteTrigger)

Thanks to Shane!!

Heiner