diff --git a/Moose Development/Moose/Core/Base.lua b/Moose Development/Moose/Core/Base.lua index 1fc421662..ffc5a63bf 100644 --- a/Moose Development/Moose/Core/Base.lua +++ b/Moose Development/Moose/Core/Base.lua @@ -902,7 +902,7 @@ do -- Scheduling ]] -- NOTE: MasterObject (first parameter) needs to be nil or it will be the first argument passed to the SchedulerFunction! - local ScheduleID = self.Scheduler:Schedule(self, SchedulerFunction, {...}, Start, nil, nil, nil) + local ScheduleID = self.Scheduler:Schedule(nil, SchedulerFunction, {...}, Start) self._.Schedules[#self._.Schedules+1] = ScheduleID @@ -931,9 +931,9 @@ do -- Scheduling self.Scheduler = SCHEDULER:New( self ) end - -- NOTE: MasterObject (first parameter) should(!) be nil as it will be the first argument passed to the SchedulerFunction!s + -- NOTE: MasterObject (first parameter) should(!) be nil as it will be the first argument passed to the SchedulerFunction! local ScheduleID = self.Scheduler:Schedule( - self, + nil, SchedulerFunction, { ... }, Start, diff --git a/Moose Development/Moose/Core/ScheduleDispatcher.lua b/Moose Development/Moose/Core/ScheduleDispatcher.lua index 4149103e3..2ba64baa0 100644 --- a/Moose Development/Moose/Core/ScheduleDispatcher.lua +++ b/Moose Development/Moose/Core/ScheduleDispatcher.lua @@ -221,8 +221,8 @@ function SCHEDULEDISPATCHER:AddSchedule( Scheduler, ScheduleFunction, ScheduleAr if ShowTrace then SchedulerObject:T( Prefix .. Name .. ":" .. Line .. " (" .. Source .. ")" ) end - return ScheduleFunction( unpack( ScheduleArguments ) ) - --return ScheduleFunction( SchedulerObject, unpack( ScheduleArguments ) ) + -- The master object is passed as first parameter. A few :Schedule() calls in MOOSE expect this currently. But in principle it should be removed. + return ScheduleFunction( SchedulerObject, unpack( ScheduleArguments ) ) end Status, Result = xpcall( Timer, ErrorHandler ) else