| Quintiq file version 2.0 | 
| #parent: #root | 
| Method SetRecurrencePatternWeekly ( | 
|   Number weekday_i | 
| ) as LibCal_Event | 
| { | 
|   Description: 'Set a recurrence pattern for a specific day of the week.' | 
|   TextBody: | 
|   [* | 
|     // Use a FeedbackObject the collect the validation feedback. | 
|     feedback := LibCal_Validate::FeedbackObject();  | 
|      | 
|     moreInfo := this.GetEventInfo(); | 
|     LibCal_Validate::RegisterError( LibCal_Validate::Event_Pattern_Weekday( weekday_i ), moreInfo ); | 
|      | 
|     // Process the feedback that has been registered by the validation (if any). | 
|     LibCal_Util::ProcessFeedbackObject( feedback ); | 
|      | 
|     // The below is only executed when no validation errors were encountered. | 
|     onMonday    := weekday_i = monday; | 
|     onTuesday   := weekday_i = tuesday; | 
|     onWednesday := weekday_i = wednesday; | 
|     onThursday  := weekday_i = thursday; | 
|     onFriday    := weekday_i = friday; | 
|     onSaturday  := weekday_i = saturday; | 
|     onSunday    := weekday_i = sunday; | 
|      | 
|     // Make the API fluent. | 
|     return this.SetRecurrencePatternWeekly( onMonday, onTuesday, onWednesday, onThursday, onFriday, onSaturday, onSunday ); | 
|   *] | 
| } |