Beispiel #1
0
 def showTaskCreationDialog_(self, sender):
     # Set default values for the title, start date and priority
     # Cocoa bindings will clear out the related fields in the sheet
     self._.calItemTitle = None
     self._.calItemStartDate = NSDate.date()
     NSApp.beginSheet_modalForWindow_modalDelegate_didEndSelector_contextInfo_(
         self.taskCreationDialog, self.mainWindow,
         self, 'didEndSheet:returnCode:contextInfo:', None)
Beispiel #2
0
 def showEventCreationDialog_(self, sender):
     # Set default values for the title and start/end date
     # Cocoa bindings will clear out the related fields in the sheet
     self._.calItemTitle = None
     self._.calItemStartDate = NSDate.date()
     self._.calItemEndDate = NSDate.dateWithTimeIntervalSinceNow_(3600)
     NSApp.beginSheet_modalForWindow_modalDelegate_didEndSelector_contextInfo_(
             self.eventCreationDialog, self.mainWindow, self,
             'didEndSheet:returnCode:contextInfo:', None)