Commit 822cb43a752fbda4c2188dafa02db75ece90db53
1 parent
3dbfe50c
FINAL CODE BEFORE REFACTOR AND TESTS
Showing
25 changed files
with
346 additions
and
110 deletions
DUREX Vendor Control/BT Vendor.xcodeproj/project.pbxproj
... | ... | @@ -12,7 +12,7 @@ |
12 | 12 | 3471866518070D9300FA0FB2 /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 3471866418070D9300FA0FB2 /* UIKit.framework */; }; |
13 | 13 | 347186A618070E7200FA0FB2 /* libEMFramework.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 347186A518070E7200FA0FB2 /* libEMFramework.a */; }; |
14 | 14 | 347186AC18070FAB00FA0FB2 /* CoreBluetooth.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 347186AB18070FAB00FA0FB2 /* CoreBluetooth.framework */; }; |
15 | - 34AAB883189804FF0019860D /* DUREXAppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 34AAB877189804FF0019860D /* DUREXAppDelegate.m */; }; | |
15 | + 34AAB883189804FF0019860D /* BTAppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 34AAB877189804FF0019860D /* BTAppDelegate.m */; }; | |
16 | 16 | 34AAB885189804FF0019860D /* EMDevicePickerViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 34AAB87A189804FF0019860D /* EMDevicePickerViewController.m */; }; |
17 | 17 | 34AAB889189804FF0019860D /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 34AAB880189804FF0019860D /* main.m */; }; |
18 | 18 | 34AAB88D189805300019860D /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 34AAB88C189805300019860D /* Images.xcassets */; }; |
... | ... | @@ -84,8 +84,8 @@ |
84 | 84 | 347186A318070E6500FA0FB2 /* EMTypes.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EMTypes.h; sourceTree = "<group>"; }; |
85 | 85 | 347186A518070E7200FA0FB2 /* libEMFramework.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libEMFramework.a; path = EmmocoMobileFramework/Framework/libEMFramework.a; sourceTree = SOURCE_ROOT; }; |
86 | 86 | 347186AB18070FAB00FA0FB2 /* CoreBluetooth.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreBluetooth.framework; path = System/Library/Frameworks/CoreBluetooth.framework; sourceTree = SDKROOT; }; |
87 | - 34AAB876189804FF0019860D /* DUREXAppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = DUREXAppDelegate.h; path = FirstAppExample/DUREXAppDelegate.h; sourceTree = SOURCE_ROOT; }; | |
88 | - 34AAB877189804FF0019860D /* DUREXAppDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = DUREXAppDelegate.m; path = FirstAppExample/DUREXAppDelegate.m; sourceTree = SOURCE_ROOT; }; | |
87 | + 34AAB876189804FF0019860D /* BTAppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = BTAppDelegate.h; path = FirstAppExample/BTAppDelegate.h; sourceTree = SOURCE_ROOT; }; | |
88 | + 34AAB877189804FF0019860D /* BTAppDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = BTAppDelegate.m; path = FirstAppExample/BTAppDelegate.m; sourceTree = SOURCE_ROOT; }; | |
89 | 89 | 34AAB879189804FF0019860D /* EMDevicePickerViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = EMDevicePickerViewController.h; path = FirstAppExample/EMDevicePickerViewController.h; sourceTree = SOURCE_ROOT; }; |
90 | 90 | 34AAB87A189804FF0019860D /* EMDevicePickerViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = EMDevicePickerViewController.m; path = FirstAppExample/EMDevicePickerViewController.m; sourceTree = SOURCE_ROOT; }; |
91 | 91 | 34AAB87E189804FF0019860D /* BT Vendor-Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = "BT Vendor-Info.plist"; path = "FirstAppExample/BT Vendor-Info.plist"; sourceTree = SOURCE_ROOT; }; |
... | ... | @@ -218,7 +218,7 @@ |
218 | 218 | 3471865418070D9300FA0FB2 = { |
219 | 219 | isa = PBXGroup; |
220 | 220 | children = ( |
221 | - 3471866618070D9300FA0FB2 /* DUREX Vendor Control */, | |
221 | + 3471866618070D9300FA0FB2 /* BT Vendor */, | |
222 | 222 | 3471865F18070D9300FA0FB2 /* Frameworks */, |
223 | 223 | 3471865E18070D9300FA0FB2 /* Products */, |
224 | 224 | ); |
... | ... | @@ -244,7 +244,7 @@ |
244 | 244 | name = Frameworks; |
245 | 245 | sourceTree = "<group>"; |
246 | 246 | }; |
247 | - 3471866618070D9300FA0FB2 /* DUREX Vendor Control */ = { | |
247 | + 3471866618070D9300FA0FB2 /* BT Vendor */ = { | |
248 | 248 | isa = PBXGroup; |
249 | 249 | children = ( |
250 | 250 | F9CED59719BE0863008F3764 /* Toast View */, |
... | ... | @@ -254,7 +254,7 @@ |
254 | 254 | 3471866718070D9300FA0FB2 /* Supporting Files */, |
255 | 255 | F9ED745419B89E4600C7298D /* Views */, |
256 | 256 | F9ED745519B89E7700C7298D /* Headers */, |
257 | - 34AAB877189804FF0019860D /* DUREXAppDelegate.m */, | |
257 | + 34AAB877189804FF0019860D /* BTAppDelegate.m */, | |
258 | 258 | F98356D5192E835F00EA6821 /* InitialViewController.m */, |
259 | 259 | F98356E0192EC84700EA6821 /* MenuTableViewController.m */, |
260 | 260 | F9A8EF7B192FE201009E7532 /* Stack.m */, |
... | ... | @@ -271,7 +271,7 @@ |
271 | 271 | F9B9100819E59773006D4D06 /* IncidentLog.m */, |
272 | 272 | F95C3F2A19E87B8700C040C0 /* ChildViewController.m */, |
273 | 273 | ); |
274 | - name = "DUREX Vendor Control"; | |
274 | + name = "BT Vendor"; | |
275 | 275 | path = TestAppExample; |
276 | 276 | sourceTree = "<group>"; |
277 | 277 | }; |
... | ... | @@ -374,7 +374,7 @@ |
374 | 374 | F9ED745519B89E7700C7298D /* Headers */ = { |
375 | 375 | isa = PBXGroup; |
376 | 376 | children = ( |
377 | - 34AAB876189804FF0019860D /* DUREXAppDelegate.h */, | |
377 | + 34AAB876189804FF0019860D /* BTAppDelegate.h */, | |
378 | 378 | F98356D4192E835F00EA6821 /* InitialViewController.h */, |
379 | 379 | F98356DF192EC84700EA6821 /* MenuTableViewController.h */, |
380 | 380 | F98356D9192EAFD400EA6821 /* CommunicationProtocol.h */, |
... | ... | @@ -514,7 +514,7 @@ |
514 | 514 | F989B60219BCE28C00657DD9 /* SalesLog.m in Sources */, |
515 | 515 | F95C3F2B19E87B8700C040C0 /* ChildViewController.m in Sources */, |
516 | 516 | F92F567919B75F5E00A1EACA /* PriceChangerViewController.m in Sources */, |
517 | - 34AAB883189804FF0019860D /* DUREXAppDelegate.m in Sources */, | |
517 | + 34AAB883189804FF0019860D /* BTAppDelegate.m in Sources */, | |
518 | 518 | F98356DB192EAFD400EA6821 /* CommunicationProtocol.m in Sources */, |
519 | 519 | F98356E1192EC84700EA6821 /* MenuTableViewController.m in Sources */, |
520 | 520 | F98446F019B9EAE9005C4992 /* Sensors.m in Sources */, | ... | ... |
DUREX Vendor Control/BT Vendor.xcodeproj/project.xcworkspace/xcuserdata/imanol.xcuserdatad/UserInterfaceState.xcuserstate
No preview for this file type
DUREX Vendor Control/BT Vendor.xcodeproj/xcuserdata/imanol.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist
... | ... | @@ -26,11 +26,11 @@ |
26 | 26 | ignoreCount = "0" |
27 | 27 | continueAfterRunningActions = "No" |
28 | 28 | filePath = "MenuTableViewController.m" |
29 | - timestampString = "435859231.211213" | |
29 | + timestampString = "436467072.187571" | |
30 | 30 | startingColumnNumber = "9223372036854775807" |
31 | 31 | endingColumnNumber = "9223372036854775807" |
32 | - startingLineNumber = "928" | |
33 | - endingLineNumber = "928" | |
32 | + startingLineNumber = "1038" | |
33 | + endingLineNumber = "1038" | |
34 | 34 | landmarkName = "-tableView:didSelectRowAtIndexPath:" |
35 | 35 | landmarkType = "5"> |
36 | 36 | </BreakpointContent> |
... | ... | @@ -42,11 +42,11 @@ |
42 | 42 | ignoreCount = "0" |
43 | 43 | continueAfterRunningActions = "No" |
44 | 44 | filePath = "MenuTableViewController.m" |
45 | - timestampString = "435859231.211213" | |
45 | + timestampString = "436467072.187571" | |
46 | 46 | startingColumnNumber = "9223372036854775807" |
47 | 47 | endingColumnNumber = "9223372036854775807" |
48 | - startingLineNumber = "830" | |
49 | - endingLineNumber = "830" | |
48 | + startingLineNumber = "940" | |
49 | + endingLineNumber = "940" | |
50 | 50 | landmarkName = "-tableView:didSelectRowAtIndexPath:" |
51 | 51 | landmarkType = "5"> |
52 | 52 | </BreakpointContent> |
... | ... | @@ -58,11 +58,11 @@ |
58 | 58 | ignoreCount = "0" |
59 | 59 | continueAfterRunningActions = "No" |
60 | 60 | filePath = "MenuTableViewController.m" |
61 | - timestampString = "435854984.608419" | |
61 | + timestampString = "436467072.187571" | |
62 | 62 | startingColumnNumber = "9223372036854775807" |
63 | 63 | endingColumnNumber = "9223372036854775807" |
64 | - startingLineNumber = "623" | |
65 | - endingLineNumber = "623" | |
64 | + startingLineNumber = "733" | |
65 | + endingLineNumber = "733" | |
66 | 66 | landmarkName = "-toggleDropList:" |
67 | 67 | landmarkType = "5"> |
68 | 68 | </BreakpointContent> |
... | ... | @@ -186,11 +186,11 @@ |
186 | 186 | ignoreCount = "0" |
187 | 187 | continueAfterRunningActions = "No" |
188 | 188 | filePath = "MenuTableViewController.m" |
189 | - timestampString = "435859231.211213" | |
189 | + timestampString = "436467072.187571" | |
190 | 190 | startingColumnNumber = "9223372036854775807" |
191 | 191 | endingColumnNumber = "9223372036854775807" |
192 | - startingLineNumber = "1033" | |
193 | - endingLineNumber = "1033" | |
192 | + startingLineNumber = "1143" | |
193 | + endingLineNumber = "1143" | |
194 | 194 | landmarkName = "-tableView:didSelectRowAtIndexPath:" |
195 | 195 | landmarkType = "5"> |
196 | 196 | </BreakpointContent> |
... | ... | @@ -202,11 +202,11 @@ |
202 | 202 | ignoreCount = "0" |
203 | 203 | continueAfterRunningActions = "No" |
204 | 204 | filePath = "MenuTableViewController.m" |
205 | - timestampString = "435854984.608419" | |
205 | + timestampString = "436465076.64059" | |
206 | 206 | startingColumnNumber = "9223372036854775807" |
207 | 207 | endingColumnNumber = "9223372036854775807" |
208 | - startingLineNumber = "212" | |
209 | - endingLineNumber = "212" | |
208 | + startingLineNumber = "214" | |
209 | + endingLineNumber = "214" | |
210 | 210 | landmarkName = "-generateIncidentListNavLevel" |
211 | 211 | landmarkType = "5"> |
212 | 212 | </BreakpointContent> |
... | ... | @@ -218,12 +218,12 @@ |
218 | 218 | ignoreCount = "0" |
219 | 219 | continueAfterRunningActions = "No" |
220 | 220 | filePath = "MenuTableViewController.m" |
221 | - timestampString = "435854984.608419" | |
221 | + timestampString = "436467072.187571" | |
222 | 222 | startingColumnNumber = "9223372036854775807" |
223 | 223 | endingColumnNumber = "9223372036854775807" |
224 | - startingLineNumber = "749" | |
225 | - endingLineNumber = "749" | |
226 | - landmarkName = "-tableView:numberOfRowsInSection:" | |
224 | + startingLineNumber = "859" | |
225 | + endingLineNumber = "859" | |
226 | + landmarkName = "-tableView:titleForHeaderInSection:" | |
227 | 227 | landmarkType = "5"> |
228 | 228 | </BreakpointContent> |
229 | 229 | </BreakpointProxy> |
... | ... | @@ -234,11 +234,11 @@ |
234 | 234 | ignoreCount = "0" |
235 | 235 | continueAfterRunningActions = "No" |
236 | 236 | filePath = "MenuTableViewController.m" |
237 | - timestampString = "435859231.211213" | |
237 | + timestampString = "436467072.187571" | |
238 | 238 | startingColumnNumber = "9223372036854775807" |
239 | 239 | endingColumnNumber = "9223372036854775807" |
240 | - startingLineNumber = "835" | |
241 | - endingLineNumber = "835" | |
240 | + startingLineNumber = "945" | |
241 | + endingLineNumber = "945" | |
242 | 242 | landmarkName = "-tableView:didSelectRowAtIndexPath:" |
243 | 243 | landmarkType = "5"> |
244 | 244 | </BreakpointContent> |
... | ... | @@ -250,11 +250,11 @@ |
250 | 250 | ignoreCount = "0" |
251 | 251 | continueAfterRunningActions = "No" |
252 | 252 | filePath = "MenuTableViewController.m" |
253 | - timestampString = "435859231.211213" | |
253 | + timestampString = "436467072.187571" | |
254 | 254 | startingColumnNumber = "9223372036854775807" |
255 | 255 | endingColumnNumber = "9223372036854775807" |
256 | - startingLineNumber = "1122" | |
257 | - endingLineNumber = "1122" | |
256 | + startingLineNumber = "1232" | |
257 | + endingLineNumber = "1232" | |
258 | 258 | landmarkName = "-numberOfSectionsInTableView:" |
259 | 259 | landmarkType = "5"> |
260 | 260 | </BreakpointContent> |
... | ... | @@ -266,13 +266,13 @@ |
266 | 266 | ignoreCount = "0" |
267 | 267 | continueAfterRunningActions = "No" |
268 | 268 | filePath = "MenuTableViewController.m" |
269 | - timestampString = "435859231.211213" | |
269 | + timestampString = "436467072.187571" | |
270 | 270 | startingColumnNumber = "9223372036854775807" |
271 | 271 | endingColumnNumber = "9223372036854775807" |
272 | - startingLineNumber = "1123" | |
273 | - endingLineNumber = "1123" | |
274 | - landmarkName = "@implementation MenuTableViewController" | |
275 | - landmarkType = "3"> | |
272 | + startingLineNumber = "1233" | |
273 | + endingLineNumber = "1233" | |
274 | + landmarkName = "-numberOfSectionsInTableView:" | |
275 | + landmarkType = "5"> | |
276 | 276 | </BreakpointContent> |
277 | 277 | </BreakpointProxy> |
278 | 278 | <BreakpointProxy |
... | ... | @@ -298,11 +298,11 @@ |
298 | 298 | ignoreCount = "0" |
299 | 299 | continueAfterRunningActions = "No" |
300 | 300 | filePath = "MenuTableViewController.m" |
301 | - timestampString = "435859231.211213" | |
301 | + timestampString = "436467072.187571" | |
302 | 302 | startingColumnNumber = "9223372036854775807" |
303 | 303 | endingColumnNumber = "9223372036854775807" |
304 | - startingLineNumber = "1242" | |
305 | - endingLineNumber = "1242" | |
304 | + startingLineNumber = "1352" | |
305 | + endingLineNumber = "1352" | |
306 | 306 | landmarkName = "-tableView:cellForRowAtIndexPath:" |
307 | 307 | landmarkType = "5"> |
308 | 308 | </BreakpointContent> |
... | ... | @@ -314,12 +314,12 @@ |
314 | 314 | ignoreCount = "0" |
315 | 315 | continueAfterRunningActions = "No" |
316 | 316 | filePath = "MenuTableViewController.m" |
317 | - timestampString = "435854984.608419" | |
317 | + timestampString = "436467072.187571" | |
318 | 318 | startingColumnNumber = "9223372036854775807" |
319 | 319 | endingColumnNumber = "9223372036854775807" |
320 | - startingLineNumber = "553" | |
321 | - endingLineNumber = "553" | |
322 | - landmarkName = "-willRotateToInterfaceOrientation:duration:" | |
320 | + startingLineNumber = "663" | |
321 | + endingLineNumber = "663" | |
322 | + landmarkName = "-didRotateFromInterfaceOrientation:" | |
323 | 323 | landmarkType = "5"> |
324 | 324 | </BreakpointContent> |
325 | 325 | </BreakpointProxy> |
... | ... | @@ -330,11 +330,11 @@ |
330 | 330 | ignoreCount = "0" |
331 | 331 | continueAfterRunningActions = "No" |
332 | 332 | filePath = "MenuTableViewController.m" |
333 | - timestampString = "435859231.211213" | |
333 | + timestampString = "436467072.187571" | |
334 | 334 | startingColumnNumber = "9223372036854775807" |
335 | 335 | endingColumnNumber = "9223372036854775807" |
336 | - startingLineNumber = "1327" | |
337 | - endingLineNumber = "1327" | |
336 | + startingLineNumber = "1437" | |
337 | + endingLineNumber = "1437" | |
338 | 338 | landmarkName = "-tableView:cellForRowAtIndexPath:" |
339 | 339 | landmarkType = "5"> |
340 | 340 | </BreakpointContent> |
... | ... | @@ -346,11 +346,11 @@ |
346 | 346 | ignoreCount = "0" |
347 | 347 | continueAfterRunningActions = "No" |
348 | 348 | filePath = "MenuTableViewController.m" |
349 | - timestampString = "435859231.211213" | |
349 | + timestampString = "436467072.187571" | |
350 | 350 | startingColumnNumber = "9223372036854775807" |
351 | 351 | endingColumnNumber = "9223372036854775807" |
352 | - startingLineNumber = "1319" | |
353 | - endingLineNumber = "1319" | |
352 | + startingLineNumber = "1429" | |
353 | + endingLineNumber = "1429" | |
354 | 354 | landmarkName = "-tableView:cellForRowAtIndexPath:" |
355 | 355 | landmarkType = "5"> |
356 | 356 | </BreakpointContent> |
... | ... | @@ -362,11 +362,11 @@ |
362 | 362 | ignoreCount = "0" |
363 | 363 | continueAfterRunningActions = "No" |
364 | 364 | filePath = "MenuTableViewController.m" |
365 | - timestampString = "435859231.211213" | |
365 | + timestampString = "436467072.187571" | |
366 | 366 | startingColumnNumber = "9223372036854775807" |
367 | 367 | endingColumnNumber = "9223372036854775807" |
368 | - startingLineNumber = "1114" | |
369 | - endingLineNumber = "1114" | |
368 | + startingLineNumber = "1224" | |
369 | + endingLineNumber = "1224" | |
370 | 370 | landmarkName = "-tableView:indentationLevelForRowAtIndexPath:" |
371 | 371 | landmarkType = "5"> |
372 | 372 | </BreakpointContent> |
... | ... | @@ -378,11 +378,11 @@ |
378 | 378 | ignoreCount = "0" |
379 | 379 | continueAfterRunningActions = "No" |
380 | 380 | filePath = "MenuTableViewController.m" |
381 | - timestampString = "435859231.211213" | |
381 | + timestampString = "436467072.187571" | |
382 | 382 | startingColumnNumber = "9223372036854775807" |
383 | 383 | endingColumnNumber = "9223372036854775807" |
384 | - startingLineNumber = "1112" | |
385 | - endingLineNumber = "1112" | |
384 | + startingLineNumber = "1222" | |
385 | + endingLineNumber = "1222" | |
386 | 386 | landmarkName = "-tableView:indentationLevelForRowAtIndexPath:" |
387 | 387 | landmarkType = "5"> |
388 | 388 | </BreakpointContent> |
... | ... | @@ -458,11 +458,11 @@ |
458 | 458 | ignoreCount = "0" |
459 | 459 | continueAfterRunningActions = "No" |
460 | 460 | filePath = "MenuTableViewController.m" |
461 | - timestampString = "435859231.211213" | |
461 | + timestampString = "436467072.187571" | |
462 | 462 | startingColumnNumber = "9223372036854775807" |
463 | 463 | endingColumnNumber = "9223372036854775807" |
464 | - startingLineNumber = "1443" | |
465 | - endingLineNumber = "1443" | |
464 | + startingLineNumber = "1553" | |
465 | + endingLineNumber = "1553" | |
466 | 466 | landmarkName = "-tableView:cellForRowAtIndexPath:" |
467 | 467 | landmarkType = "5"> |
468 | 468 | </BreakpointContent> |
... | ... | @@ -474,11 +474,11 @@ |
474 | 474 | ignoreCount = "0" |
475 | 475 | continueAfterRunningActions = "No" |
476 | 476 | filePath = "MenuTableViewController.m" |
477 | - timestampString = "435859231.211213" | |
477 | + timestampString = "436467072.187571" | |
478 | 478 | startingColumnNumber = "9223372036854775807" |
479 | 479 | endingColumnNumber = "9223372036854775807" |
480 | - startingLineNumber = "1428" | |
481 | - endingLineNumber = "1428" | |
480 | + startingLineNumber = "1538" | |
481 | + endingLineNumber = "1538" | |
482 | 482 | landmarkName = "-tableView:cellForRowAtIndexPath:" |
483 | 483 | landmarkType = "5"> |
484 | 484 | </BreakpointContent> |
... | ... | @@ -536,11 +536,11 @@ |
536 | 536 | ignoreCount = "0" |
537 | 537 | continueAfterRunningActions = "No" |
538 | 538 | filePath = "MenuTableViewController.m" |
539 | - timestampString = "435854984.608419" | |
539 | + timestampString = "436467072.187571" | |
540 | 540 | startingColumnNumber = "9223372036854775807" |
541 | 541 | endingColumnNumber = "9223372036854775807" |
542 | - startingLineNumber = "522" | |
543 | - endingLineNumber = "522" | |
542 | + startingLineNumber = "625" | |
543 | + endingLineNumber = "625" | |
544 | 544 | landmarkName = "-viewDidLoad" |
545 | 545 | landmarkType = "5"> |
546 | 546 | </BreakpointContent> |
... | ... | @@ -552,11 +552,11 @@ |
552 | 552 | ignoreCount = "0" |
553 | 553 | continueAfterRunningActions = "No" |
554 | 554 | filePath = "MenuTableViewController.m" |
555 | - timestampString = "435854984.608419" | |
555 | + timestampString = "436465076.64059" | |
556 | 556 | startingColumnNumber = "9223372036854775807" |
557 | 557 | endingColumnNumber = "9223372036854775807" |
558 | - startingLineNumber = "158" | |
559 | - endingLineNumber = "158" | |
558 | + startingLineNumber = "160" | |
559 | + endingLineNumber = "160" | |
560 | 560 | landmarkName = "-generateSaleListNavLevel" |
561 | 561 | landmarkType = "5"> |
562 | 562 | </BreakpointContent> |
... | ... | @@ -568,11 +568,11 @@ |
568 | 568 | ignoreCount = "0" |
569 | 569 | continueAfterRunningActions = "No" |
570 | 570 | filePath = "MenuTableViewController.m" |
571 | - timestampString = "435854984.608419" | |
571 | + timestampString = "436465076.64059" | |
572 | 572 | startingColumnNumber = "9223372036854775807" |
573 | 573 | endingColumnNumber = "9223372036854775807" |
574 | - startingLineNumber = "137" | |
575 | - endingLineNumber = "137" | |
574 | + startingLineNumber = "139" | |
575 | + endingLineNumber = "139" | |
576 | 576 | landmarkName = "-generateSaleListNavLevel" |
577 | 577 | landmarkType = "5"> |
578 | 578 | </BreakpointContent> |
... | ... | @@ -600,11 +600,11 @@ |
600 | 600 | ignoreCount = "0" |
601 | 601 | continueAfterRunningActions = "No" |
602 | 602 | filePath = "MenuTableViewController.m" |
603 | - timestampString = "435859231.211213" | |
603 | + timestampString = "436467072.187571" | |
604 | 604 | startingColumnNumber = "9223372036854775807" |
605 | 605 | endingColumnNumber = "9223372036854775807" |
606 | - startingLineNumber = "1100" | |
607 | - endingLineNumber = "1100" | |
606 | + startingLineNumber = "1210" | |
607 | + endingLineNumber = "1210" | |
608 | 608 | landmarkName = "-tableView:didSelectRowAtIndexPath:" |
609 | 609 | landmarkType = "5"> |
610 | 610 | </BreakpointContent> |
... | ... | @@ -616,11 +616,11 @@ |
616 | 616 | ignoreCount = "0" |
617 | 617 | continueAfterRunningActions = "No" |
618 | 618 | filePath = "MenuTableViewController.m" |
619 | - timestampString = "435855046.616674" | |
619 | + timestampString = "436467072.187571" | |
620 | 620 | startingColumnNumber = "9223372036854775807" |
621 | 621 | endingColumnNumber = "9223372036854775807" |
622 | - startingLineNumber = "780" | |
623 | - endingLineNumber = "780" | |
622 | + startingLineNumber = "890" | |
623 | + endingLineNumber = "890" | |
624 | 624 | landmarkName = "-tableView:didSelectRowAtIndexPath:" |
625 | 625 | landmarkType = "5"> |
626 | 626 | </BreakpointContent> |
... | ... | @@ -632,11 +632,11 @@ |
632 | 632 | ignoreCount = "0" |
633 | 633 | continueAfterRunningActions = "No" |
634 | 634 | filePath = "MenuTableViewController.m" |
635 | - timestampString = "435855046.616674" | |
635 | + timestampString = "436467072.187571" | |
636 | 636 | startingColumnNumber = "9223372036854775807" |
637 | 637 | endingColumnNumber = "9223372036854775807" |
638 | - startingLineNumber = "779" | |
639 | - endingLineNumber = "779" | |
638 | + startingLineNumber = "889" | |
639 | + endingLineNumber = "889" | |
640 | 640 | landmarkName = "-tableView:didSelectRowAtIndexPath:" |
641 | 641 | landmarkType = "5"> |
642 | 642 | </BreakpointContent> |
... | ... | @@ -648,11 +648,11 @@ |
648 | 648 | ignoreCount = "0" |
649 | 649 | continueAfterRunningActions = "No" |
650 | 650 | filePath = "MenuTableViewController.m" |
651 | - timestampString = "435855046.616674" | |
651 | + timestampString = "436467072.187571" | |
652 | 652 | startingColumnNumber = "9223372036854775807" |
653 | 653 | endingColumnNumber = "9223372036854775807" |
654 | - startingLineNumber = "768" | |
655 | - endingLineNumber = "768" | |
654 | + startingLineNumber = "878" | |
655 | + endingLineNumber = "878" | |
656 | 656 | landmarkName = "-tableView:sectionForSectionIndexTitle:atIndex:" |
657 | 657 | landmarkType = "5"> |
658 | 658 | </BreakpointContent> |
... | ... | @@ -721,5 +721,69 @@ |
721 | 721 | landmarkType = "5"> |
722 | 722 | </BreakpointContent> |
723 | 723 | </BreakpointProxy> |
724 | + <BreakpointProxy | |
725 | + BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint"> | |
726 | + <BreakpointContent | |
727 | + shouldBeEnabled = "No" | |
728 | + ignoreCount = "0" | |
729 | + continueAfterRunningActions = "No" | |
730 | + filePath = "MenuTableViewController.m" | |
731 | + timestampString = "436467072.187571" | |
732 | + startingColumnNumber = "9223372036854775807" | |
733 | + endingColumnNumber = "9223372036854775807" | |
734 | + startingLineNumber = "550" | |
735 | + endingLineNumber = "550" | |
736 | + landmarkName = "-handleOpenURL:" | |
737 | + landmarkType = "5"> | |
738 | + </BreakpointContent> | |
739 | + </BreakpointProxy> | |
740 | + <BreakpointProxy | |
741 | + BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint"> | |
742 | + <BreakpointContent | |
743 | + shouldBeEnabled = "No" | |
744 | + ignoreCount = "0" | |
745 | + continueAfterRunningActions = "No" | |
746 | + filePath = "MenuTableViewController.m" | |
747 | + timestampString = "436467072.187571" | |
748 | + startingColumnNumber = "9223372036854775807" | |
749 | + endingColumnNumber = "9223372036854775807" | |
750 | + startingLineNumber = "557" | |
751 | + endingLineNumber = "557" | |
752 | + landmarkName = "-handleOpenURL:" | |
753 | + landmarkType = "5"> | |
754 | + </BreakpointContent> | |
755 | + </BreakpointProxy> | |
756 | + <BreakpointProxy | |
757 | + BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint"> | |
758 | + <BreakpointContent | |
759 | + shouldBeEnabled = "No" | |
760 | + ignoreCount = "0" | |
761 | + continueAfterRunningActions = "No" | |
762 | + filePath = "MenuTableViewController.m" | |
763 | + timestampString = "436467072.187571" | |
764 | + startingColumnNumber = "9223372036854775807" | |
765 | + endingColumnNumber = "9223372036854775807" | |
766 | + startingLineNumber = "534" | |
767 | + endingLineNumber = "534" | |
768 | + landmarkName = "-handleOpenURL:" | |
769 | + landmarkType = "5"> | |
770 | + </BreakpointContent> | |
771 | + </BreakpointProxy> | |
772 | + <BreakpointProxy | |
773 | + BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint"> | |
774 | + <BreakpointContent | |
775 | + shouldBeEnabled = "No" | |
776 | + ignoreCount = "0" | |
777 | + continueAfterRunningActions = "No" | |
778 | + filePath = "MenuTableViewController.m" | |
779 | + timestampString = "436467072.187571" | |
780 | + startingColumnNumber = "9223372036854775807" | |
781 | + endingColumnNumber = "9223372036854775807" | |
782 | + startingLineNumber = "515" | |
783 | + endingLineNumber = "515" | |
784 | + landmarkName = "-alertView:clickedButtonAtIndex:" | |
785 | + landmarkType = "5"> | |
786 | + </BreakpointContent> | |
787 | + </BreakpointProxy> | |
724 | 788 | </Breakpoints> |
725 | 789 | </Bucket> | ... | ... |
DUREX Vendor Control/Base.lproj/Localizable.strings
... | ... | @@ -105,4 +105,12 @@ |
105 | 105 | "Device answer timeout occurred" = "Device answer timeout occurred"; |
106 | 106 | "Incident log" = "Incident log"; |
107 | 107 | "Error Code" = "Error Code"; |
108 | -"Error Value" = "Error Value"; | |
109 | 108 | \ No newline at end of file |
109 | +"Error Value" = "Error Value"; | |
110 | +"Error obtaining data from URL" = "Error obtaining data from URL"; | |
111 | +"Missing fields version and/or commands in JSON file" = "Missing fields version and/or commands in JSON file"; | |
112 | +"Version mismatch" = "Version mismatch"; | |
113 | +"Do you want to run batch command file" = "Do you want to run batch command file"; | |
114 | +"WARNING: Machine ID does not match currently connected machine. Do you wish to continue?" = "WARNING: Machine ID does not match currently connected machine. Do you wish to continue?"; | |
115 | +"Confirmation" = "Confirmation"; | |
116 | +"OK" = "OK"; | |
117 | +"Cancel" = "Cancel"; | |
110 | 118 | \ No newline at end of file | ... | ... |
DUREX Vendor Control/ChildViewController.m
... | ... | @@ -46,4 +46,14 @@ |
46 | 46 | } |
47 | 47 | */ |
48 | 48 | |
49 | +- (void) parentViewControllerDidRotateWithOrientation:(UIDeviceOrientation)orientation | |
50 | +{ | |
51 | + //STUB | |
52 | +} | |
53 | + | |
54 | +- (void) parentViewControllerWillRotateToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation duration:(NSTimeInterval)duration | |
55 | +{ | |
56 | + //STUB | |
57 | +} | |
58 | + | |
49 | 59 | @end | ... | ... |
DUREX Vendor Control/DatePickerViewController.h
... | ... | @@ -10,7 +10,7 @@ |
10 | 10 | |
11 | 11 | #import <UIKit/UIKit.h> |
12 | 12 | #import <QuartzCore/QuartzCore.h> |
13 | -#import "DUREXAppDelegate.h" | |
13 | +#import "BTAppDelegate.h" | |
14 | 14 | |
15 | 15 | @protocol DatePickerViewControllerDelegate <NSObject> |
16 | 16 | - (void)passDateViewController:(DatePickerViewController*)controller didFinishEnteringItem:(NSDate *)date; | ... | ... |
DUREX Vendor Control/DateRangePickerViewController.h
DUREX Vendor Control/FirstAppExample/DUREXAppDelegate.h renamed to DUREX Vendor Control/FirstAppExample/BTAppDelegate.h
... | ... | @@ -8,10 +8,12 @@ |
8 | 8 | |
9 | 9 | #import <UIKit/UIKit.h> |
10 | 10 | |
11 | -@interface DUREXAppDelegate : UIResponder <UIApplicationDelegate> | |
11 | +@interface BTAppDelegate : UIResponder <UIApplicationDelegate> | |
12 | 12 | |
13 | 13 | @property (strong, nonatomic) UIWindow *window; |
14 | 14 | @property (nonatomic, strong) IBOutlet UINavigationController *navController; |
15 | +@property (strong, nonatomic) NSURL *handledURL; | |
16 | +@property (strong,nonatomic) NSString *currentVersion; | |
15 | 17 | |
16 | 18 | |
17 | 19 | ... | ... |
DUREX Vendor Control/FirstAppExample/DUREXAppDelegate.m renamed to DUREX Vendor Control/FirstAppExample/BTAppDelegate.m
... | ... | @@ -6,18 +6,19 @@ |
6 | 6 | // Copyright (c) 2013 Emmoco. All rights reserved. |
7 | 7 | // |
8 | 8 | |
9 | -#import "DUREXAppDelegate.h" | |
9 | +#import "BTAppDelegate.h" | |
10 | 10 | #import "EMFramework.h" |
11 | 11 | #import "EMDevicePickerViewController.h" |
12 | +#import "MenuTableViewController.h" | |
12 | 13 | |
13 | -@interface DUREXAppDelegate () <UINavigationControllerDelegate> | |
14 | +@interface BTAppDelegate () <UINavigationControllerDelegate> | |
14 | 15 | { |
15 | 16 | |
16 | 17 | } |
17 | 18 | |
18 | 19 | @end |
19 | 20 | |
20 | -@implementation DUREXAppDelegate | |
21 | +@implementation BTAppDelegate | |
21 | 22 | |
22 | 23 | - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions |
23 | 24 | { |
... | ... | @@ -26,6 +27,9 @@ |
26 | 27 | [[self navController] setDelegate:self]; |
27 | 28 | |
28 | 29 | [[EMConnectionListManager sharedManager] startUpdating]; |
30 | + | |
31 | + self.handledURL = nil; | |
32 | + self.currentVersion = @"1.0.0"; | |
29 | 33 | return YES; |
30 | 34 | } |
31 | 35 | |
... | ... | @@ -74,4 +78,24 @@ |
74 | 78 | } |
75 | 79 | } |
76 | 80 | |
81 | +- (BOOL)application:(UIApplication *)application handleOpenURL:(NSURL *)url | |
82 | +{ | |
83 | + NSLog(@"[DUREXAppDelegate.m]: Handling URL %@",url); | |
84 | + if ([self.navController.topViewController isKindOfClass:[MenuTableViewController class]]) | |
85 | + { | |
86 | + MenuTableViewController *viewController = (MenuTableViewController*) self.navController.topViewController; | |
87 | + if (url != nil && [url isFileURL]) | |
88 | + { | |
89 | + NSLog(@"[DUREXAppDelegate.m]: Pushing URL to MenuTableViewController..."); | |
90 | + [viewController handleOpenURL:url]; | |
91 | + } | |
92 | + } | |
93 | + else | |
94 | + { | |
95 | + NSLog(@"[DUREXAppDelegate.m]: Storing handled URL..."); | |
96 | + self.handledURL = url; | |
97 | + } | |
98 | + return YES; | |
99 | +} | |
100 | + | |
77 | 101 | @end | ... | ... |
DUREX Vendor Control/FirstAppExample/Images.xcassets/AppIcon.appiconset/120 - App Icon_2x.png deleted
8.83 KB
DUREX Vendor Control/FirstAppExample/Images.xcassets/AppIcon.appiconset/29 - App Icon_2x.png
DUREX Vendor Control/FirstAppExample/Images.xcassets/AppIcon.appiconset/40 - App Icon_2x.png
DUREX Vendor Control/FirstAppExample/Images.xcassets/AppIcon.appiconset/60 - App Icon_2x.png
0 โ 100644
45 KB
DUREX Vendor Control/FirstAppExample/Images.xcassets/AppIcon.appiconset/76 - App Icon_1x.png
DUREX Vendor Control/FirstAppExample/Images.xcassets/AppIcon.appiconset/76 - App Icon_2x.png
DUREX Vendor Control/FirstAppExample/Images.xcassets/AppIcon.appiconset/Contents.json
DUREX Vendor Control/FirstAppExample/main.m
... | ... | @@ -8,11 +8,11 @@ |
8 | 8 | |
9 | 9 | #import <UIKit/UIKit.h> |
10 | 10 | |
11 | -#import "DUREXAppDelegate.h" | |
11 | +#import "BTAppDelegate.h" | |
12 | 12 | |
13 | 13 | int main(int argc, char * argv[]) |
14 | 14 | { |
15 | 15 | @autoreleasepool { |
16 | - return UIApplicationMain(argc, argv, nil, NSStringFromClass([DUREXAppDelegate class])); | |
16 | + return UIApplicationMain(argc, argv, nil, NSStringFromClass([BTAppDelegate class])); | |
17 | 17 | } |
18 | 18 | } | ... | ... |
DUREX Vendor Control/MenuTableViewController.h
... | ... | @@ -22,6 +22,8 @@ |
22 | 22 | |
23 | 23 | #define num(x) [NSNumber numberWithUnsignedInt:x] |
24 | 24 | |
25 | +#define BATCH_ALERT_TAG 200 | |
26 | + | |
25 | 27 | #define CELL_CARAT_TAG 100 |
26 | 28 | |
27 | 29 | #define MENU_ELEMENTS @"[1000]Maintenance",@"[1001]Basic Configuration",@"[1002]Sending a Report" |
... | ... | @@ -73,6 +75,7 @@ enum { |
73 | 75 | A6, |
74 | 76 | A7, |
75 | 77 | //A9, |
78 | + BATCH_COMMANDS, | |
76 | 79 | INVALID_COMMAND, |
77 | 80 | NONE, |
78 | 81 | } commandTypes; |
... | ... | @@ -82,8 +85,9 @@ enum { |
82 | 85 | INCIDENT_LOG, |
83 | 86 | } logType; |
84 | 87 | |
85 | -@interface MenuTableViewController : UITableViewController <DatePickerViewControllerDelegate,PriceChangerViewControllerDelegate,NameChangerViewControllerDelegate, DateRangePickerViewControllerDelegate, CommunicationProtocolDelegate, NSURLConnectionDataDelegate, ChildViewControllerDelegate> | |
88 | +@interface MenuTableViewController : UITableViewController <DatePickerViewControllerDelegate,PriceChangerViewControllerDelegate,NameChangerViewControllerDelegate, DateRangePickerViewControllerDelegate, CommunicationProtocolDelegate, NSURLConnectionDataDelegate, ChildViewControllerDelegate,UIAlertViewDelegate> | |
86 | 89 | |
87 | 90 | - (void) navBack; |
91 | +- (void) handleOpenURL: (NSURL*) url; | |
88 | 92 | |
89 | 93 | @end | ... | ... |
DUREX Vendor Control/MenuTableViewController.m
... | ... | @@ -48,8 +48,10 @@ |
48 | 48 | //GENERAL ATTRIBUTES |
49 | 49 | @property (nonatomic,strong) CommunicationProtocol* protocol; |
50 | 50 | @property (strong,nonatomic) NSString *machineMACAddr; |
51 | +@property (strong,nonatomic) BTAppDelegate *appDelegate; | |
51 | 52 | @property (strong,nonatomic) Stack *parentLayout; |
52 | 53 | @property (strong,nonatomic) NSTimer *timeoutTimer; |
54 | +@property (strong,nonatomic) NSMutableArray *batchCommands; | |
53 | 55 | |
54 | 56 | @property (strong,nonatomic) Sensors *sensorStatus; |
55 | 57 | @property (strong,nonatomic) SalesLog *salesLog; |
... | ... | @@ -459,6 +461,17 @@ |
459 | 461 | [self.view makeToast:NSLocalizedString(@"Product name change returned error", nil) duration:3 position:[NSValue valueWithCGPoint:CGPointMake(self.view.frame.size.width/2,self.view.frame.size.height/2)] title:NSLocalizedString(@"Error", nil) image:[UIImage imageNamed:@"icon_delete"]]; |
460 | 462 | } |
461 | 463 | } |
464 | + else if(self.sentCommand == BATCH_COMMANDS) | |
465 | + { | |
466 | + if(self.batchCommands.count) | |
467 | + { | |
468 | + [self processBatchCommands]; | |
469 | + } | |
470 | + else | |
471 | + { | |
472 | + self.sentCommand = NONE; | |
473 | + } | |
474 | + } | |
462 | 475 | else |
463 | 476 | { |
464 | 477 | NSLog(@"[MenuTableViewController]: Unknown response received. Data discarded."); |
... | ... | @@ -488,10 +501,99 @@ |
488 | 501 | } |
489 | 502 | } |
490 | 503 | |
504 | + | |
505 | +//BATCH COMMAND PROCESSING | |
506 | +- (void) processBatchCommands | |
507 | +{ | |
508 | + NSString *command = [self.batchCommands objectAtIndex:0]; | |
509 | + [self.batchCommands removeObjectAtIndex:0]; | |
510 | + [_protocol writeMessage:command]; | |
511 | + [self setSentCommand:BATCH_COMMANDS]; | |
512 | + [self startTimeoutTimer]; | |
513 | +} | |
514 | + | |
515 | +-(void) alertView:(UIAlertView *)alertView clickedButtonAtIndex:(NSInteger)buttonIndex | |
516 | +{ | |
517 | + if (alertView.tag == BATCH_ALERT_TAG) | |
518 | + { | |
519 | + if (buttonIndex == 1) | |
520 | + { | |
521 | + [self processBatchCommands]; | |
522 | + } | |
523 | + } | |
524 | +} | |
525 | + | |
526 | +- (void) handleOpenURL:(NSURL *)url | |
527 | +{ | |
528 | + NSData *data = [NSData dataWithContentsOfURL:url]; | |
529 | + NSString *contents = [[NSString alloc] initWithData: data encoding:NSUTF8StringEncoding]; | |
530 | + if(data == nil) | |
531 | + { | |
532 | + NSLog(@"[MenuTableViewController.m]: Error obtaining data from URL"); | |
533 | + [self.view makeToast:NSLocalizedString(@"Error obtaining data from URL", nil) duration:3 position:[NSValue valueWithCGPoint:CGPointMake(self.view.frame.size.width/2,self.view.frame.size.height/2)] title:NSLocalizedString(@"Error", nil) image:[UIImage imageNamed:@"icon_delete"]]; | |
534 | + return; | |
535 | + } | |
536 | + NSLog(@"[MenuTableViewController.m]: Read file contents from handled URL: %@",contents); | |
537 | + NSError *error = nil; | |
538 | + NSDictionary *JSONData = [NSJSONSerialization JSONObjectWithData:data options:NSJSONReadingMutableContainers error: &error]; | |
539 | + if(!JSONData) | |
540 | + { | |
541 | + NSLog(@"[MenuTableViewController.m]: %@",error); | |
542 | + [self.view makeToast:[error localizedDescription] duration:3 position:[NSValue valueWithCGPoint:CGPointMake(self.view.frame.size.width/2,self.view.frame.size.height/2)] title:NSLocalizedString(@"Error", nil) image:[UIImage imageNamed:@"icon_delete"]]; | |
543 | + return; | |
544 | + } | |
545 | + NSString *version = [JSONData objectForKey:@"version"]; | |
546 | + NSString *name = [JSONData objectForKey:@"name"]; | |
547 | + NSString *machineID = [JSONData objectForKey:@"machineID"]; | |
548 | + NSArray *commands = [JSONData objectForKey:@"commands"]; | |
549 | + NSString *errorString = nil; | |
550 | + UIAlertView *alert; | |
551 | + if(version == nil || commands == nil) | |
552 | + { | |
553 | + errorString = NSLocalizedString(@"Missing fields version and/or commands in JSON file",nil); | |
554 | + } | |
555 | + else if(![version isEqualToString:self.appDelegate.currentVersion]) | |
556 | + { | |
557 | + errorString = NSLocalizedString(@"Version mismatch",nil); | |
558 | + } | |
559 | + else | |
560 | + { | |
561 | + self.batchCommands = [[NSMutableArray alloc] initWithArray:commands]; | |
562 | + if(![machineID isEqualToString:self.machineMACAddr]) | |
563 | + { | |
564 | + alert = [[UIAlertView alloc] initWithTitle:NSLocalizedString(@"Confirmation",nil) | |
565 | + message:[NSString stringWithFormat:@"%@ \"%@\"?\n\n",NSLocalizedString(@"Do you want to run batch command file",nil),name,NSLocalizedString(@"WARNING: Machine ID does not match currently connected machine. Do you wish to continue?",nil)] | |
566 | + delegate:self | |
567 | + cancelButtonTitle:NSLocalizedString(@"Cancel",nil) | |
568 | + otherButtonTitles:NSLocalizedString(@"OK",nil), nil]; | |
569 | + } | |
570 | + else | |
571 | + { | |
572 | + alert = [[UIAlertView alloc] initWithTitle: NSLocalizedString(@"Confirmation",nil) | |
573 | + message: [NSString stringWithFormat:@"%@ \"%@\"?",NSLocalizedString(@"Do you want to run batch command file",nil),name] | |
574 | + delegate:self | |
575 | + cancelButtonTitle:NSLocalizedString(@"Cancel",nil) | |
576 | + otherButtonTitles:NSLocalizedString(@"OK",nil), nil]; | |
577 | + } | |
578 | + } | |
579 | + if(errorString != nil) | |
580 | + { | |
581 | + alert = [[UIAlertView alloc] initWithTitle:NSLocalizedString(@"Error",nil) | |
582 | + message:[NSString stringWithFormat:@"%@",errorString] | |
583 | + delegate:nil | |
584 | + cancelButtonTitle:NSLocalizedString(@"OK",nil) | |
585 | + otherButtonTitles:nil]; | |
586 | + } | |
587 | + alert.tag = BATCH_ALERT_TAG; | |
588 | + [alert show]; | |
589 | +} | |
590 | + | |
591 | +//UITABLEVIEWCONTROLLER FUNCTIONS | |
491 | 592 | - (void)viewDidLoad |
492 | 593 | { |
493 | 594 | [super viewDidLoad]; |
494 | 595 | [_activityIndicator setHidden:YES]; |
596 | + self.appDelegate = [[UIApplication sharedApplication] delegate]; | |
495 | 597 | |
496 | 598 | //Set navigation bar |
497 | 599 | UIImage *backImage = [UIImage imageNamed:@"back_arrow.png"]; |
... | ... | @@ -516,12 +618,22 @@ |
516 | 618 | |
517 | 619 | //Set navigation level |
518 | 620 | [self initializeMenuEntries]; |
621 | + [self setChildViewControllers:[[NSMutableArray alloc]init]]; | |
519 | 622 | self.currentNavLevel = 255; |
623 | + | |
624 | + //Initialize menu view | |
625 | + | |
520 | 626 | [_protocol establishConnection]; |
521 | 627 | //[self setSentCommand:HELLO]; |
522 | 628 | //[self startTimeoutTimer]; |
523 | - [self changeNavLevel:MENU :FALSE]; | |
524 | - [self setChildViewControllers:[[NSMutableArray alloc]init]]; | |
629 | + [self changeNavLevel:MENU :FALSE]; //HACK! | |
630 | + | |
631 | + //Detect handled URL | |
632 | + if(self.appDelegate.handledURL != nil) | |
633 | + { | |
634 | + NSLog(@"[MenuTableViewController.m]: Detected handled URL in appDelegate"); | |
635 | + [self handleOpenURL: self.appDelegate.handledURL]; | |
636 | + } | |
525 | 637 | } |
526 | 638 | |
527 | 639 | -(void)didReceiveNotification:(NSNotification*) notification |
... | ... | @@ -751,7 +863,7 @@ |
751 | 863 | return [[[self currentStructure] objectAtIndex:section] intValue]; |
752 | 864 | } |
753 | 865 | |
754 | -- (NSArray *)sectionIndexTitlesForTableView:(UITableView *)tableView | |
866 | +- (const NSArray*)sectionIndexTitlesForTableView:(UITableView *)tableView | |
755 | 867 | { |
756 | 868 | if(self.showIndexes) |
757 | 869 | { | ... | ... |
DUREX Vendor Control/NameChangerViewController.h
... | ... | @@ -10,7 +10,7 @@ |
10 | 10 | |
11 | 11 | #import <UIKit/UIKit.h> |
12 | 12 | #import <QuartzCore/QuartzCore.h> |
13 | -#import "DUREXAppDelegate.h" | |
13 | +#import "BTAppDelegate.h" | |
14 | 14 | |
15 | 15 | @protocol NameChangerViewControllerDelegate <NSObject> |
16 | 16 | - (void)passNameViewController:(NameChangerViewController*)controller didFinishEnteringItem:(NSArray *)data; | ... | ... |
DUREX Vendor Control/PriceChangerViewController.h
... | ... | @@ -10,7 +10,7 @@ |
10 | 10 | |
11 | 11 | #import <UIKit/UIKit.h> |
12 | 12 | #import <QuartzCore/QuartzCore.h> |
13 | -#import "DUREXAppDelegate.h" | |
13 | +#import "BTAppDelegate.h" | |
14 | 14 | |
15 | 15 | @protocol PriceChangerViewControllerDelegate <NSObject> |
16 | 16 | - (void)passPriceViewController:(PriceChangerViewController*)controller didFinishEnteringItem:(NSArray *)data; | ... | ... |
DUREX Vendor Control/en.lproj/Localizable.strings
... | ... | @@ -105,4 +105,12 @@ |
105 | 105 | "Device answer timeout occurred" = "Device answer timeout occurred"; |
106 | 106 | "Incident log" = "Incident log"; |
107 | 107 | "Error Code" = "Error Code"; |
108 | -"Error Value" = "Error Value"; | |
109 | 108 | \ No newline at end of file |
109 | +"Error Value" = "Error Value"; | |
110 | +"Error obtaining data from URL" = "Error obtaining data from URL"; | |
111 | +"Missing fields version and/or commands in JSON file" = "Missing fields version and/or commands in JSON file"; | |
112 | +"Version mismatch" = "Version mismatch"; | |
113 | +"Do you want to run batch command file" = "Do you want to run batch command file"; | |
114 | +"WARNING: Machine ID does not match currently connected machine. Do you wish to continue?" = "WARNING: Machine ID does not match currently connected machine. Do you wish to continue?"; | |
115 | +"Confirmation" = "Confirmation"; | |
116 | +"OK" = "OK"; | |
117 | +"Cancel" = "Cancel"; | |
110 | 118 | \ No newline at end of file | ... | ... |
DUREX Vendor Control/es.lproj/Localizable.strings
... | ... | @@ -105,4 +105,12 @@ |
105 | 105 | "Device answer timeout occurred" = "El tiempo de espera de respuesta del dispositivo ha expirado"; |
106 | 106 | "Incident log" = "Registro de incidencias"; |
107 | 107 | "Error Code" = "Cรณdigo de error"; |
108 | -"Error Value" = "Valor del error"; | |
109 | 108 | \ No newline at end of file |
109 | +"Error Value" = "Valor del error"; | |
110 | +"Error obtaining data from URL" = "Error al obtener los datos de la URL"; | |
111 | +"Missing fields version and/or commands in JSON file" = "Faltan los campos de versiรณn y/o comandos en el fichero JSON"; | |
112 | +"Version mismatch" = "Versiones no coincidentes"; | |
113 | +"Do you want to run batch command file" = "ยฟDesea ejecutar el fichero por lotes"; | |
114 | +"WARNING: Machine ID does not match currently connected machine. Do you wish to continue?" = "ADVERTENCIA: El identificador de mรกquina no coincide con la mรกquina conectada. ยฟDesea continuar?"; | |
115 | +"Confirmation" = "Confirmaciรณn"; | |
116 | +"OK" = "OK"; | |
117 | +"Cancel" = "Cancelar"; | |
110 | 118 | \ No newline at end of file | ... | ... |
TODO
1 | 1 | TESTS: |
2 | 2 | - A3 command |
3 | +- Batch commands | |
4 | +- Localization | |
3 | 5 | |
4 | 6 | BUGS: |
5 | 7 | - On date change, response is overwritten by previous query, trimming needed according to numBytes |
6 | -- daterangepicker regression on landscape | |
7 | 8 | |
8 | 9 | TODO: |
9 | -- Solve bugs | |
10 | - | |
11 | -OPTIONAL: | |
12 | -- Batch command files, definition, parsing and pushing them to the app | |
13 | -- Month/Year headers on sale list and incident list | |
14 | - | |
10 | +- Refactor code | ... | ... |
codic.png
0 โ 100644
1.7 MB