@@ -11,7 +11,7 @@ local debugger = true
1111
1212local projectDirectory = fs .getDir (table.pack (... )[2 ] or " " )
1313
14- local activeKey , frames , monFrames , variables , shedules = {}, {}, {}, {}, {}
14+ local activeKey , frames , monFrames , variables , schedules = {}, {}, {}, {}, {}
1515local mainFrame , activeFrame , focusedObject , updaterActive
1616
1717if not term .isColor or not term .isColor () then
@@ -122,13 +122,13 @@ local basaltError = function(errMsg)
122122 baseTerm .setCursorPos (1 ,yPos + 1 )
123123end
124124
125- local function handleShedules (event , p1 , p2 , p3 , p4 )
126- if (# shedules > 0 )then
125+ local function handleSchedules (event , p1 , p2 , p3 , p4 )
126+ if (# schedules > 0 )then
127127 local finished = {}
128- for n = 1 ,# shedules do
129- if (shedules [n ]~= nil )then
130- if (coroutine.status (shedules [n ]) == " suspended" )then
131- local ok , result = coroutine.resume (shedules [n ], event , p1 , p2 , p3 , p4 )
128+ for n = 1 ,# schedules do
129+ if (schedules [n ]~= nil )then
130+ if (coroutine.status (schedules [n ]) == " suspended" )then
131+ local ok , result = coroutine.resume (schedules [n ], event , p1 , p2 , p3 , p4 )
132132 if not (ok )then
133133 basaltError (result )
134134 end
@@ -138,7 +138,7 @@ local function handleShedules(event, p1, p2, p3, p4)
138138 end
139139 end
140140 for n = 1 ,# finished do
141- table.remove (shedules , finished [n ]- (n - 1 ))
141+ table.remove (schedules , finished [n ]- (n - 1 ))
142142 end
143143 end
144144end
@@ -197,15 +197,14 @@ local function basaltUpdateEvent(event, p1, p2, p3, p4)
197197 for _ , v in pairs (frames ) do
198198 v :eventHandler (event , p1 , p2 , p3 , p4 )
199199 end
200- handleShedules (event , p1 , p2 , p3 , p4 )
200+ handleSchedules (event , p1 , p2 , p3 , p4 )
201201 drawFrames ()
202202end
203203
204204local basalt = {}
205205basalt = {
206206 setTheme = setTheme ,
207207 getTheme = getTheme ,
208- stopUpdate = stop ,
209208 getVersion = function ()
210209 return version
211210 end ,
@@ -273,13 +272,13 @@ basalt = {
273272 end
274273 end ,
275274
276- shedule = function (f )
277- assert (f ~= " function" , " Shedule needs a function in order to work!" )
275+ schedule = function (f )
276+ assert (f ~= " function" , " Schedule needs a function in order to work!" )
278277 return function (...)
279278 local co = coroutine.create (f )
280279 local ok , result = coroutine.resume (co , ... )
281280 if (ok )then
282- table.insert (shedules , co )
281+ table.insert (schedules , co )
283282 else
284283 basaltError (result )
285284 end
0 commit comments