Commit d5590e2737a1514b852fd5e86c725cfc8a2caab6

Authored by Imanol-Mikel Barba Sabariego
1 parent 9bf8e055

FINAL COMMIT

BT Vendor/BT Vendor.xcodeproj/project.pbxproj
... ... @@ -259,6 +259,7 @@
259 259 F98356E0192EC84700EA6821 /* MenuTableViewController.m */,
260 260 F9A8EF7B192FE201009E7532 /* Stack.m */,
261 261 F98356DA192EAFD400EA6821 /* CommunicationProtocol.m */,
  262 + F95C3F2A19E87B8700C040C0 /* ChildViewController.m */,
262 263 F933F80219B6819400521B90 /* DatePickerViewController.m */,
263 264 F92F567719B75F5E00A1EACA /* PriceChangerViewController.m */,
264 265 F92F568E19B763FD00A1EACA /* NameChangerViewController.m */,
... ... @@ -269,7 +270,6 @@
269 270 F989B60119BCE28C00657DD9 /* SalesLog.m */,
270 271 F9B9100B19E5A0A1006D4D06 /* Incident.m */,
271 272 F9B9100819E59773006D4D06 /* IncidentLog.m */,
272   - F95C3F2A19E87B8700C040C0 /* ChildViewController.m */,
273 273 );
274 274 name = "BT Vendor";
275 275 path = TestAppExample;
... ... @@ -379,6 +379,7 @@
379 379 F98356DF192EC84700EA6821 /* MenuTableViewController.h */,
380 380 F98356D9192EAFD400EA6821 /* CommunicationProtocol.h */,
381 381 F9A8EF7A192FE201009E7532 /* Stack.h */,
  382 + F95C3F2919E87B8700C040C0 /* ChildViewController.h */,
382 383 F933F80119B6819400521B90 /* DatePickerViewController.h */,
383 384 F92F567619B75F5E00A1EACA /* PriceChangerViewController.h */,
384 385 F92F568D19B763FD00A1EACA /* NameChangerViewController.h */,
... ... @@ -388,7 +389,6 @@
388 389 F989B60019BCE28C00657DD9 /* SalesLog.h */,
389 390 F9B9100A19E5A0A1006D4D06 /* Incident.h */,
390 391 F9B9100719E59773006D4D06 /* IncidentLog.h */,
391   - F95C3F2919E87B8700C040C0 /* ChildViewController.h */,
392 392 );
393 393 name = Headers;
394 394 sourceTree = "<group>";
... ...
BT Vendor/BT Vendor.xcodeproj/project.xcworkspace/xcuserdata/imanol.xcuserdatad/UserInterfaceState.xcuserstate
No preview for this file type
BT Vendor/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 = "436567273.012728"
  29 + timestampString = "437065369.601573"
30 30 startingColumnNumber = "9223372036854775807"
31 31 endingColumnNumber = "9223372036854775807"
32   - startingLineNumber = "992"
33   - endingLineNumber = "992"
  32 + startingLineNumber = "988"
  33 + endingLineNumber = "988"
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 = "436567273.012728"
  45 + timestampString = "437065369.601573"
46 46 startingColumnNumber = "9223372036854775807"
47 47 endingColumnNumber = "9223372036854775807"
48   - startingLineNumber = "737"
49   - endingLineNumber = "737"
  48 + startingLineNumber = "734"
  49 + endingLineNumber = "734"
50 50 landmarkName = "-toggleDropList:"
51 51 landmarkType = "5">
52 52 </BreakpointContent>
... ... @@ -58,11 +58,11 @@
58 58 ignoreCount = "0"
59 59 continueAfterRunningActions = "No"
60 60 filePath = "CommunicationProtocol.m"
61   - timestampString = "434381762.875075"
  61 + timestampString = "437062910.396222"
62 62 startingColumnNumber = "9223372036854775807"
63 63 endingColumnNumber = "9223372036854775807"
64   - startingLineNumber = "337"
65   - endingLineNumber = "337"
  64 + startingLineNumber = "329"
  65 + endingLineNumber = "329"
66 66 landmarkName = "-readIncidentLog::"
67 67 landmarkType = "5">
68 68 </BreakpointContent>
... ... @@ -74,11 +74,11 @@
74 74 ignoreCount = "0"
75 75 continueAfterRunningActions = "No"
76 76 filePath = "CommunicationProtocol.m"
77   - timestampString = "434381762.875075"
  77 + timestampString = "437062910.396222"
78 78 startingColumnNumber = "9223372036854775807"
79 79 endingColumnNumber = "9223372036854775807"
80   - startingLineNumber = "336"
81   - endingLineNumber = "336"
  80 + startingLineNumber = "329"
  81 + endingLineNumber = "329"
82 82 landmarkName = "-readIncidentLog::"
83 83 landmarkType = "5">
84 84 </BreakpointContent>
... ... @@ -90,11 +90,11 @@
90 90 ignoreCount = "0"
91 91 continueAfterRunningActions = "No"
92 92 filePath = "CommunicationProtocol.m"
93   - timestampString = "434381762.875075"
  93 + timestampString = "437062910.396222"
94 94 startingColumnNumber = "9223372036854775807"
95 95 endingColumnNumber = "9223372036854775807"
96   - startingLineNumber = "349"
97   - endingLineNumber = "349"
  96 + startingLineNumber = "340"
  97 + endingLineNumber = "340"
98 98 landmarkName = "-readIncidentLog::"
99 99 landmarkType = "5">
100 100 </BreakpointContent>
... ... @@ -170,11 +170,11 @@
170 170 ignoreCount = "0"
171 171 continueAfterRunningActions = "No"
172 172 filePath = "MenuTableViewController.m"
173   - timestampString = "436567273.012728"
  173 + timestampString = "437065369.601573"
174 174 startingColumnNumber = "9223372036854775807"
175 175 endingColumnNumber = "9223372036854775807"
176   - startingLineNumber = "1097"
177   - endingLineNumber = "1097"
  176 + startingLineNumber = "1107"
  177 + endingLineNumber = "1107"
178 178 landmarkName = "-tableView:didSelectRowAtIndexPath:"
179 179 landmarkType = "5">
180 180 </BreakpointContent>
... ... @@ -186,12 +186,12 @@
186 186 ignoreCount = "0"
187 187 continueAfterRunningActions = "No"
188 188 filePath = "MenuTableViewController.m"
189   - timestampString = "436465076.64059"
  189 + timestampString = "437065369.601573"
190 190 startingColumnNumber = "9223372036854775807"
191 191 endingColumnNumber = "9223372036854775807"
192   - startingLineNumber = "214"
193   - endingLineNumber = "214"
194   - landmarkName = "-generateIncidentListNavLevel"
  192 + startingLineNumber = "220"
  193 + endingLineNumber = "220"
  194 + landmarkName = "-generateIncidentListNavLevel:"
195 195 landmarkType = "5">
196 196 </BreakpointContent>
197 197 </BreakpointProxy>
... ... @@ -202,12 +202,12 @@
202 202 ignoreCount = "0"
203 203 continueAfterRunningActions = "No"
204 204 filePath = "MenuTableViewController.m"
205   - timestampString = "436567273.012728"
  205 + timestampString = "437065369.601573"
206 206 startingColumnNumber = "9223372036854775807"
207 207 endingColumnNumber = "9223372036854775807"
208   - startingLineNumber = "863"
209   - endingLineNumber = "863"
210   - landmarkName = "-tableView:titleForHeaderInSection:"
  208 + startingLineNumber = "860"
  209 + endingLineNumber = "860"
  210 + landmarkName = "-tableView:numberOfRowsInSection:"
211 211 landmarkType = "5">
212 212 </BreakpointContent>
213 213 </BreakpointProxy>
... ... @@ -218,11 +218,11 @@
218 218 ignoreCount = "0"
219 219 continueAfterRunningActions = "No"
220 220 filePath = "MenuTableViewController.m"
221   - timestampString = "436567273.012728"
  221 + timestampString = "437065369.601573"
222 222 startingColumnNumber = "9223372036854775807"
223 223 endingColumnNumber = "9223372036854775807"
224   - startingLineNumber = "1186"
225   - endingLineNumber = "1186"
  224 + startingLineNumber = "1206"
  225 + endingLineNumber = "1206"
226 226 landmarkName = "-numberOfSectionsInTableView:"
227 227 landmarkType = "5">
228 228 </BreakpointContent>
... ... @@ -234,13 +234,13 @@
234 234 ignoreCount = "0"
235 235 continueAfterRunningActions = "No"
236 236 filePath = "MenuTableViewController.m"
237   - timestampString = "436567273.012728"
  237 + timestampString = "437065369.601573"
238 238 startingColumnNumber = "9223372036854775807"
239 239 endingColumnNumber = "9223372036854775807"
240   - startingLineNumber = "1187"
241   - endingLineNumber = "1187"
242   - landmarkName = "-numberOfSectionsInTableView:"
243   - landmarkType = "5">
  240 + startingLineNumber = "1207"
  241 + endingLineNumber = "1207"
  242 + landmarkName = "@implementation MenuTableViewController"
  243 + landmarkType = "3">
244 244 </BreakpointContent>
245 245 </BreakpointProxy>
246 246 <BreakpointProxy
... ... @@ -266,11 +266,11 @@
266 266 ignoreCount = "0"
267 267 continueAfterRunningActions = "No"
268 268 filePath = "MenuTableViewController.m"
269   - timestampString = "436567273.012728"
  269 + timestampString = "437065369.601573"
270 270 startingColumnNumber = "9223372036854775807"
271 271 endingColumnNumber = "9223372036854775807"
272   - startingLineNumber = "1306"
273   - endingLineNumber = "1306"
  272 + startingLineNumber = "1324"
  273 + endingLineNumber = "1324"
274 274 landmarkName = "-tableView:cellForRowAtIndexPath:"
275 275 landmarkType = "5">
276 276 </BreakpointContent>
... ... @@ -282,12 +282,12 @@
282 282 ignoreCount = "0"
283 283 continueAfterRunningActions = "No"
284 284 filePath = "MenuTableViewController.m"
285   - timestampString = "436567273.012728"
  285 + timestampString = "437065369.601573"
286 286 startingColumnNumber = "9223372036854775807"
287 287 endingColumnNumber = "9223372036854775807"
288   - startingLineNumber = "667"
289   - endingLineNumber = "667"
290   - landmarkName = "-didRotateFromInterfaceOrientation:"
  288 + startingLineNumber = "664"
  289 + endingLineNumber = "664"
  290 + landmarkName = "-willRotateToInterfaceOrientation:duration:"
291 291 landmarkType = "5">
292 292 </BreakpointContent>
293 293 </BreakpointProxy>
... ... @@ -298,11 +298,11 @@
298 298 ignoreCount = "0"
299 299 continueAfterRunningActions = "No"
300 300 filePath = "MenuTableViewController.m"
301   - timestampString = "436567273.012728"
  301 + timestampString = "437065369.601573"
302 302 startingColumnNumber = "9223372036854775807"
303 303 endingColumnNumber = "9223372036854775807"
304   - startingLineNumber = "1391"
305   - endingLineNumber = "1391"
  304 + startingLineNumber = "1409"
  305 + endingLineNumber = "1409"
306 306 landmarkName = "-tableView:cellForRowAtIndexPath:"
307 307 landmarkType = "5">
308 308 </BreakpointContent>
... ... @@ -314,11 +314,11 @@
314 314 ignoreCount = "0"
315 315 continueAfterRunningActions = "No"
316 316 filePath = "MenuTableViewController.m"
317   - timestampString = "436567273.012728"
  317 + timestampString = "437065369.601573"
318 318 startingColumnNumber = "9223372036854775807"
319 319 endingColumnNumber = "9223372036854775807"
320   - startingLineNumber = "1383"
321   - endingLineNumber = "1383"
  320 + startingLineNumber = "1401"
  321 + endingLineNumber = "1401"
322 322 landmarkName = "-tableView:cellForRowAtIndexPath:"
323 323 landmarkType = "5">
324 324 </BreakpointContent>
... ... @@ -330,11 +330,11 @@
330 330 ignoreCount = "0"
331 331 continueAfterRunningActions = "No"
332 332 filePath = "MenuTableViewController.m"
333   - timestampString = "436567273.012728"
  333 + timestampString = "437065369.601573"
334 334 startingColumnNumber = "9223372036854775807"
335 335 endingColumnNumber = "9223372036854775807"
336   - startingLineNumber = "1178"
337   - endingLineNumber = "1178"
  336 + startingLineNumber = "1198"
  337 + endingLineNumber = "1198"
338 338 landmarkName = "-tableView:indentationLevelForRowAtIndexPath:"
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 = "436567273.012728"
  349 + timestampString = "437065369.601573"
350 350 startingColumnNumber = "9223372036854775807"
351 351 endingColumnNumber = "9223372036854775807"
352   - startingLineNumber = "1176"
353   - endingLineNumber = "1176"
  352 + startingLineNumber = "1196"
  353 + endingLineNumber = "1196"
354 354 landmarkName = "-tableView:indentationLevelForRowAtIndexPath:"
355 355 landmarkType = "5">
356 356 </BreakpointContent>
... ... @@ -362,11 +362,11 @@
362 362 ignoreCount = "0"
363 363 continueAfterRunningActions = "No"
364 364 filePath = "PriceChangerViewController.m"
365   - timestampString = "432259134.170788"
  365 + timestampString = "437062910.396222"
366 366 startingColumnNumber = "9223372036854775807"
367 367 endingColumnNumber = "9223372036854775807"
368   - startingLineNumber = "48"
369   - endingLineNumber = "48"
  368 + startingLineNumber = "58"
  369 + endingLineNumber = "58"
370 370 landmarkName = "-dismissKeyboard"
371 371 landmarkType = "5">
372 372 </BreakpointContent>
... ... @@ -426,11 +426,11 @@
426 426 ignoreCount = "0"
427 427 continueAfterRunningActions = "No"
428 428 filePath = "MenuTableViewController.m"
429   - timestampString = "436567273.012728"
  429 + timestampString = "437065369.601573"
430 430 startingColumnNumber = "9223372036854775807"
431 431 endingColumnNumber = "9223372036854775807"
432   - startingLineNumber = "1507"
433   - endingLineNumber = "1507"
  432 + startingLineNumber = "1525"
  433 + endingLineNumber = "1525"
434 434 landmarkName = "-tableView:cellForRowAtIndexPath:"
435 435 landmarkType = "5">
436 436 </BreakpointContent>
... ... @@ -442,11 +442,11 @@
442 442 ignoreCount = "0"
443 443 continueAfterRunningActions = "No"
444 444 filePath = "MenuTableViewController.m"
445   - timestampString = "436567273.012728"
  445 + timestampString = "437065369.601573"
446 446 startingColumnNumber = "9223372036854775807"
447 447 endingColumnNumber = "9223372036854775807"
448   - startingLineNumber = "1492"
449   - endingLineNumber = "1492"
  448 + startingLineNumber = "1510"
  449 + endingLineNumber = "1510"
450 450 landmarkName = "-tableView:cellForRowAtIndexPath:"
451 451 landmarkType = "5">
452 452 </BreakpointContent>
... ... @@ -504,11 +504,11 @@
504 504 ignoreCount = "0"
505 505 continueAfterRunningActions = "No"
506 506 filePath = "MenuTableViewController.m"
507   - timestampString = "436567273.012728"
  507 + timestampString = "437065369.601573"
508 508 startingColumnNumber = "9223372036854775807"
509 509 endingColumnNumber = "9223372036854775807"
510   - startingLineNumber = "629"
511   - endingLineNumber = "629"
  510 + startingLineNumber = "626"
  511 + endingLineNumber = "626"
512 512 landmarkName = "-viewDidLoad"
513 513 landmarkType = "5">
514 514 </BreakpointContent>
... ... @@ -516,32 +516,16 @@
516 516 <BreakpointProxy
517 517 BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
518 518 <BreakpointContent
519   - shouldBeEnabled = "Yes"
520   - ignoreCount = "0"
521   - continueAfterRunningActions = "No"
522   - filePath = "MenuTableViewController.m"
523   - timestampString = "436465076.64059"
524   - startingColumnNumber = "9223372036854775807"
525   - endingColumnNumber = "9223372036854775807"
526   - startingLineNumber = "160"
527   - endingLineNumber = "160"
528   - landmarkName = "-generateSaleListNavLevel"
529   - landmarkType = "5">
530   - </BreakpointContent>
531   - </BreakpointProxy>
532   - <BreakpointProxy
533   - BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
534   - <BreakpointContent
535 519 shouldBeEnabled = "No"
536 520 ignoreCount = "0"
537 521 continueAfterRunningActions = "No"
538 522 filePath = "MenuTableViewController.m"
539   - timestampString = "436465076.64059"
  523 + timestampString = "437065369.601573"
540 524 startingColumnNumber = "9223372036854775807"
541 525 endingColumnNumber = "9223372036854775807"
542   - startingLineNumber = "139"
543   - endingLineNumber = "139"
544   - landmarkName = "-generateSaleListNavLevel"
  526 + startingLineNumber = "143"
  527 + endingLineNumber = "143"
  528 + landmarkName = "-generateSaleListNavLevel:"
545 529 landmarkType = "5">
546 530 </BreakpointContent>
547 531 </BreakpointProxy>
... ... @@ -568,11 +552,11 @@
568 552 ignoreCount = "0"
569 553 continueAfterRunningActions = "No"
570 554 filePath = "MenuTableViewController.m"
571   - timestampString = "436567273.012728"
  555 + timestampString = "437065369.601573"
572 556 startingColumnNumber = "9223372036854775807"
573 557 endingColumnNumber = "9223372036854775807"
574   - startingLineNumber = "1164"
575   - endingLineNumber = "1164"
  558 + startingLineNumber = "1184"
  559 + endingLineNumber = "1184"
576 560 landmarkName = "-tableView:didSelectRowAtIndexPath:"
577 561 landmarkType = "5">
578 562 </BreakpointContent>
... ... @@ -584,11 +568,11 @@
584 568 ignoreCount = "0"
585 569 continueAfterRunningActions = "No"
586 570 filePath = "MenuTableViewController.m"
587   - timestampString = "436567273.012728"
  571 + timestampString = "437065369.601573"
588 572 startingColumnNumber = "9223372036854775807"
589 573 endingColumnNumber = "9223372036854775807"
590   - startingLineNumber = "894"
591   - endingLineNumber = "894"
  574 + startingLineNumber = "890"
  575 + endingLineNumber = "890"
592 576 landmarkName = "-tableView:didSelectRowAtIndexPath:"
593 577 landmarkType = "5">
594 578 </BreakpointContent>
... ... @@ -600,11 +584,11 @@
600 584 ignoreCount = "0"
601 585 continueAfterRunningActions = "No"
602 586 filePath = "MenuTableViewController.m"
603   - timestampString = "436567273.012728"
  587 + timestampString = "437065369.601573"
604 588 startingColumnNumber = "9223372036854775807"
605 589 endingColumnNumber = "9223372036854775807"
606   - startingLineNumber = "893"
607   - endingLineNumber = "893"
  590 + startingLineNumber = "889"
  591 + endingLineNumber = "889"
608 592 landmarkName = "-tableView:didSelectRowAtIndexPath:"
609 593 landmarkType = "5">
610 594 </BreakpointContent>
... ... @@ -616,11 +600,11 @@
616 600 ignoreCount = "0"
617 601 continueAfterRunningActions = "No"
618 602 filePath = "MenuTableViewController.m"
619   - timestampString = "436567273.012728"
  603 + timestampString = "437065369.601573"
620 604 startingColumnNumber = "9223372036854775807"
621 605 endingColumnNumber = "9223372036854775807"
622   - startingLineNumber = "882"
623   - endingLineNumber = "882"
  606 + startingLineNumber = "879"
  607 + endingLineNumber = "879"
624 608 landmarkName = "-tableView:sectionForSectionIndexTitle:atIndex:"
625 609 landmarkType = "5">
626 610 </BreakpointContent>
... ... @@ -696,11 +680,11 @@
696 680 ignoreCount = "0"
697 681 continueAfterRunningActions = "No"
698 682 filePath = "MenuTableViewController.m"
699   - timestampString = "436467072.187571"
  683 + timestampString = "437065369.601573"
700 684 startingColumnNumber = "9223372036854775807"
701 685 endingColumnNumber = "9223372036854775807"
702   - startingLineNumber = "550"
703   - endingLineNumber = "550"
  686 + startingLineNumber = "547"
  687 + endingLineNumber = "547"
704 688 landmarkName = "-handleOpenURL:"
705 689 landmarkType = "5">
706 690 </BreakpointContent>
... ... @@ -712,11 +696,11 @@
712 696 ignoreCount = "0"
713 697 continueAfterRunningActions = "No"
714 698 filePath = "MenuTableViewController.m"
715   - timestampString = "436467072.187571"
  699 + timestampString = "437065369.601573"
716 700 startingColumnNumber = "9223372036854775807"
717 701 endingColumnNumber = "9223372036854775807"
718   - startingLineNumber = "557"
719   - endingLineNumber = "557"
  702 + startingLineNumber = "554"
  703 + endingLineNumber = "554"
720 704 landmarkName = "-handleOpenURL:"
721 705 landmarkType = "5">
722 706 </BreakpointContent>
... ... @@ -728,11 +712,11 @@
728 712 ignoreCount = "0"
729 713 continueAfterRunningActions = "No"
730 714 filePath = "MenuTableViewController.m"
731   - timestampString = "436467072.187571"
  715 + timestampString = "437065369.601573"
732 716 startingColumnNumber = "9223372036854775807"
733 717 endingColumnNumber = "9223372036854775807"
734   - startingLineNumber = "534"
735   - endingLineNumber = "534"
  718 + startingLineNumber = "531"
  719 + endingLineNumber = "531"
736 720 landmarkName = "-handleOpenURL:"
737 721 landmarkType = "5">
738 722 </BreakpointContent>
... ... @@ -744,11 +728,11 @@
744 728 ignoreCount = "0"
745 729 continueAfterRunningActions = "No"
746 730 filePath = "MenuTableViewController.m"
747   - timestampString = "436467072.187571"
  731 + timestampString = "437065369.601573"
748 732 startingColumnNumber = "9223372036854775807"
749 733 endingColumnNumber = "9223372036854775807"
750   - startingLineNumber = "515"
751   - endingLineNumber = "515"
  734 + startingLineNumber = "512"
  735 + endingLineNumber = "512"
752 736 landmarkName = "-alertView:clickedButtonAtIndex:"
753 737 landmarkType = "5">
754 738 </BreakpointContent>
... ...
BT Vendor/CommunicationProtocol.h
... ... @@ -25,7 +25,7 @@
25 25 #define REPORT_SERVER_URL @"http://seneca.upc.es:8090/machine"
26 26  
27 27 @protocol CommunicationProtocolDelegate <NSObject>
28   -- (void)processMessage:(CommunicationProtocol*)protocol didFinishEnteringItem:(NSString*) response;
  28 +- (void) processMessage:(CommunicationProtocol*)protocol didFinishEnteringItem:(NSString*) response;
29 29 - (void) reportProtocolError: (CommunicationProtocol*)protocol didFinishEnteringItem:(NSString*) error;
30 30 @end
31 31  
... ... @@ -43,7 +43,6 @@
43 43 -(void) readSensorData;
44 44 -(void) readSalesLog: (NSDateComponents*) start : (NSDateComponents*) end;
45 45 -(void) readIncidentLog: (NSDateComponents*) start : (NSDateComponents*) end;
46   -//-(void) testA9 : (NSMutableString*) testString;
47 46 +(id) sharedProtocol;
48 47  
49 48 @end
... ...
BT Vendor/CommunicationProtocol.m
... ... @@ -257,8 +257,7 @@
257 257 NSMutableString *command = [NSMutableString stringWithFormat: @"A5"];
258 258 NSInteger year = [date year];
259 259 year = year - (year/100)*100;
260   - [command appendString:[NSString stringWithFormat:@"%02ld",(long)year]];
261   - [command appendString:[NSString stringWithFormat:@"%02ld%02ld%02ld%02ld%02ld",(long)[date month],(long)[date day],(long)[date hour],(long)[date minute],(long)[date second]]];
  260 + [command appendString:[NSString stringWithFormat:@"%02ld%02ld%02ld%02ld%02ld%02ld",(long)year,(long)[date month],(long)[date day],(long)[date hour],(long)[date minute],(long)[date second]]];
262 261 [self writeMessage:command];
263 262 }
264 263  
... ... @@ -282,8 +281,6 @@
282 281 {
283 282 NSString *command = @"A4";
284 283 [self writeMessage:command];
285   -
286   - /*NSMutableString *answer = [[NSMutableString alloc]initWithString:@"P4000150001500015000000010010030050020000010020101010100000000000000000000000000"];*/
287 284 }
288 285  
289 286 -(void) readSalesLog : (NSDateComponents*) start : (NSDateComponents*) end
... ... @@ -299,8 +296,7 @@
299 296 {
300 297 NSInteger year = [start year];
301 298 year = year - (year/100)*100;
302   - [startDate appendString:[NSString stringWithFormat:@"%02ld",(long)year]];
303   - [startDate appendString:[NSString stringWithFormat:@"%02ld%02ld%02ld%02ld",(long)[start month],(long)[start day],(long)[start hour],(long)[start minute]]];
  299 + [startDate appendString:[NSString stringWithFormat:@"%02ld%02ld%02ld%02ld%02ld",(long)year,(long)[start month],(long)[start day],(long)[start hour],(long)[start minute]]];
304 300 }
305 301 if(end == nil)
306 302 {
... ... @@ -310,15 +306,12 @@
310 306 {
311 307 NSInteger year = [end year];
312 308 year = year - (year/100)*100;
313   - [endDate appendString:[NSString stringWithFormat:@"%02ld",(long)year]];
314   - [endDate appendString:[NSString stringWithFormat:@"%02ld%02ld%02ld%02ld",(long)[end month],(long)[end day],(long)[end hour],(long)[end minute]]];
  309 + [endDate appendString:[NSString stringWithFormat:@"%02ld%02ld%02ld%02ld%02ld",(long)year,(long)[end month],(long)[end day],(long)[end hour],(long)[end minute]]];
315 310 }
316 311 [command appendString:startDate];
317 312 [command appendString:@"-"];
318 313 [command appendString:endDate];
319 314 [self writeMessage:command];
320   -
321   - //NSMutableString *answer = [[NSMutableString alloc]initWithString:@"P21408161036000001000000110450000001P21409012216000100000000220900000100P21409032307000000010502330800000000P21409070540000000020000440350000001P2P2"];
322 315 }
323 316  
324 317 -(void) readIncidentLog:(NSDateComponents *)start :(NSDateComponents *)end
... ... @@ -334,8 +327,7 @@
334 327 {
335 328 NSInteger year = [start year];
336 329 year = year - (year/100)*100;
337   - [startDate appendString:[NSString stringWithFormat:@"%02ld",(long)year]];
338   - [startDate appendString:[NSString stringWithFormat:@"%02ld%02ld%02ld%02ld",(long)[start month],(long)[start day],(long)[start hour],(long)[start minute]]];
  330 + [startDate appendString:[NSString stringWithFormat:@"%02ld%02ld%02ld%02ld%02ld",(long)year,(long)[start month],(long)[start day],(long)[start hour],(long)[start minute]]];
339 331 }
340 332 if(end == nil)
341 333 {
... ... @@ -345,22 +337,12 @@
345 337 {
346 338 NSInteger year = [end year];
347 339 year = year - (year/100)*100;
348   - [endDate appendString:[NSString stringWithFormat:@"%02ld",(long)year]];
349   - [endDate appendString:[NSString stringWithFormat:@"%02ld%02ld%02ld%02ld",(long)[end month],(long)[end day],(long)[end hour],(long)[end minute]]];
  340 + [endDate appendString:[NSString stringWithFormat:@"%02ld%02ld%02ld%02ld%02ld",(long)year,(long)[end month],(long)[end day],(long)[end hour],(long)[end minute]]];
350 341 }
351 342 [command appendString:startDate];
352 343 [command appendString:@"-"];
353 344 [command appendString:endDate];
354 345 [self writeMessage:command];
355   -
356   - //@"P3140816103600012222P3140910093600023333P3140921103600034444P3140927103600045555P3P3"
357 346 }
358 347  
359   -/*-(void) testA9:(NSMutableString *)testString
360   -{
361   - NSMutableString *messageA9 = [[NSMutableString alloc] initWithString:@"A9"];
362   - [messageA9 appendString:testString];
363   - [self writeMessage:messageA9];
364   -}*/
365   -
366 348 @end
... ...
BT Vendor/DatePickerViewController.h
... ... @@ -11,19 +11,20 @@
11 11 #import <UIKit/UIKit.h>
12 12 #import <QuartzCore/QuartzCore.h>
13 13 #import "BTAppDelegate.h"
  14 +#import "ChildViewController.h"
14 15  
15 16 @protocol DatePickerViewControllerDelegate <NSObject>
16 17 - (void)passDateViewController:(DatePickerViewController*)controller didFinishEnteringItem:(NSDate *)date;
17 18  
18 19 @end
19 20  
20   -@interface DatePickerViewController : UIViewController
  21 +@interface DatePickerViewController : ChildViewController
21 22  
22 23 @property (strong, nonatomic) IBOutlet UIView *datePickerView;
23 24 @property (strong, nonatomic) IBOutlet UIDatePicker *datePicker;
24 25 @property (nonatomic, strong) id <DatePickerViewControllerDelegate> delegate;
25 26  
26   -- (void)showInView:(UIView *)aView animated:(BOOL)animated;
27   -- (IBAction)closePopup:(id)sender;
  27 +- (void) showInView:(UIView *)aView animated:(BOOL)animated;
  28 +- (IBAction) closePopup:(id)sender;
28 29  
29 30 @end
... ...
BT Vendor/DatePickerViewController.m
... ... @@ -23,6 +23,18 @@
23 23 return self;
24 24 }
25 25  
  26 +
  27 +- (void) parentViewControllerDidRotateWithOrientation: (UIDeviceOrientation) orientation
  28 +{
  29 + NSLog(@"[DatePickerViewController.m]: Screen did rotate");
  30 +}
  31 +
  32 +- (void) parentViewControllerWillRotateToInterfaceOrientation: (UIInterfaceOrientation)toInterfaceOrientation duration: (NSTimeInterval)duration
  33 +{
  34 + NSLog(@"[DatePickerViewController.m]: Screen will rotate");
  35 +}
  36 +
  37 +
26 38 - (void)viewDidLoad
27 39 {
28 40 self.view.backgroundColor=[[UIColor blackColor] colorWithAlphaComponent:.7];
... ... @@ -69,6 +81,7 @@
69 81 - (IBAction)closePopup:(id)sender
70 82 {
71 83 [self.delegate passDateViewController:self didFinishEnteringItem:[[self datePicker] date]];
  84 + [self.childDelegate removeChildFromParentController:self];
72 85 [self removeAnimate];
73 86 }
74 87  
... ...
BT Vendor/DateRangePickerViewController.h
... ... @@ -39,9 +39,9 @@
39 39 @property (strong, nonatomic) IBOutlet UIView *scrolledView;
40 40 @property (nonatomic, strong) id <DateRangePickerViewControllerDelegate> delegate;
41 41  
42   -- (void)showInView:(UIView *)aView animated:(BOOL)animated;
43   -- (IBAction)toggleFromDate:(id)sender;
44   -- (IBAction)toggleToDate:(id)sender;
45   -- (IBAction)closePopup:(id)sender;
  42 +- (void) showInView:(UIView *)aView animated:(BOOL)animated;
  43 +- (IBAction) toggleFromDate:(id)sender;
  44 +- (IBAction) toggleToDate:(id)sender;
  45 +- (IBAction) closePopup:(id)sender;
46 46  
47 47 @end
... ...
BT Vendor/IncidentLog.h
... ... @@ -16,6 +16,6 @@
16 16 @property (strong,nonatomic) NSMutableArray *incidents;
17 17  
18 18 - (id) init;
19   -- (void) setResponseValue:(NSString *)response;
  19 +- (void) setResponseValue : (NSString *)response;
20 20  
21 21 @end
... ...
BT Vendor/MenuTableViewController.h
... ... @@ -86,7 +86,6 @@ enum {
86 86  
87 87 @interface MenuTableViewController : UITableViewController <DatePickerViewControllerDelegate,PriceChangerViewControllerDelegate,NameChangerViewControllerDelegate, DateRangePickerViewControllerDelegate, CommunicationProtocolDelegate, NSURLConnectionDataDelegate, ChildViewControllerDelegate,UIAlertViewDelegate>
88 88  
89   -- (void) navBack;
90 89 - (void) handleOpenURL: (NSURL*) url;
91 90  
92 91 @end
... ...
BT Vendor/MenuTableViewController.m
... ... @@ -45,6 +45,15 @@
45 45  
46 46 @property (nonatomic,strong) const NSArray *cellIdentifiers;
47 47  
  48 +//NAVIGATION LEVEL ATTRIBUTES
  49 +@property (strong,nonatomic) NSMutableArray *childViewControllers;
  50 +@property uint8_t currentNavLevel;
  51 +@property Boolean showIndexes;
  52 +@property (strong,nonatomic) NSString *currentCellIdentifier;
  53 +@property (strong,nonatomic) const NSMutableArray *currentElements;
  54 +@property (strong,nonatomic) const NSMutableArray *currentStructure;
  55 +@property (strong,nonatomic) const NSMutableArray *currentHeaders;
  56 +
48 57 //GENERAL ATTRIBUTES
49 58 @property (nonatomic,strong) CommunicationProtocol* protocol;
50 59 @property (strong,nonatomic) NSString *machineMACAddr;
... ... @@ -52,7 +61,6 @@
52 61 @property (strong,nonatomic) Stack *parentLayout;
53 62 @property (strong,nonatomic) NSTimer *timeoutTimer;
54 63 @property (strong,nonatomic) NSMutableArray *batchCommands;
55   -
56 64 @property (strong,nonatomic) Sensors *sensorStatus;
57 65 @property (strong,nonatomic) SalesLog *salesLog;
58 66 @property (strong,nonatomic) Sale *currentSale;
... ... @@ -61,14 +69,7 @@
61 69 @property uint8_t requestedLog;
62 70 @property uint8_t sentCommand;
63 71  
64   -@property (strong,nonatomic) NSMutableArray *childViewControllers;
65   -@property uint8_t currentNavLevel;
66   -@property Boolean showIndexes;
67   -@property (strong,nonatomic) NSString *currentCellIdentifier;
68   -@property (strong,nonatomic) const NSMutableArray *currentElements;
69   -@property (strong,nonatomic) const NSMutableArray *currentStructure;
70   -@property (strong,nonatomic) const NSMutableArray *currentHeaders;
71   -
  72 +//CHILD VIEW CONTOLLERS
72 73 @property (strong,nonatomic) DatePickerViewController *datePickerViewController;
73 74 @property (strong,nonatomic) PriceChangerViewController *priceChangerViewController;
74 75 @property (strong,nonatomic) NameChangerViewController *nameChangerViewController;
... ... @@ -105,9 +106,10 @@
105 106 [self setCellIdentifiers:[[NSArray alloc] initWithObjects:CELL_IDENTIFIERS, nil]];
106 107 }
107 108  
108   -- (void) generateMaintenanceLevel
  109 +- (void) generateMaintenanceLevel : (NSString *) response
109 110 {
110   - //Initialize sensor status
  111 + [self setSensorStatus:[[Sensors alloc]init]];
  112 + [[self sensorStatus] setResponseValue:response];
111 113 [self setMaintenanceElements:[[NSMutableArray alloc] initWithObjects:MAINTENANCE_ELEMENTS, nil]];
112 114 [self setMaintenanceStructure:[[NSMutableArray alloc] initWithObjects:MAINTENANCE_CELLS_PER_SECTION, nil]];
113 115 if([[self maintenanceStructure] count] > 1)
... ... @@ -120,8 +122,10 @@
120 122 }
121 123 }
122 124  
123   -- (void) generateSaleListNavLevel
  125 +- (void) generateSaleListNavLevel : (NSString*) response
124 126 {
  127 + [self setSalesLog:[[SalesLog alloc]init]];
  128 + [[self salesLog] setResponseValue:response];
125 129 NSMutableArray *dateArray = [[NSMutableArray alloc] init];
126 130 NSMutableArray *dateHeaderArray = [[NSMutableArray alloc] init];
127 131 NSMutableArray *dateStructure = [[NSMutableArray alloc] init];
... ... @@ -178,8 +182,10 @@
178 182 return TRUE;
179 183 }
180 184  
181   -- (void) generateIncidentListNavLevel
  185 +- (void) generateIncidentListNavLevel : (NSString*) response
182 186 {
  187 + [self setIncidentLog:[[IncidentLog alloc]init]];
  188 + [[self incidentLog] setResponseValue:response];
183 189 NSMutableArray *dateArray = [[NSMutableArray alloc] init];
184 190 NSMutableArray *dateHeaderArray = [[NSMutableArray alloc] init];
185 191 NSMutableArray *dateStructure = [[NSMutableArray alloc] init];
... ... @@ -237,7 +243,7 @@
237 243  
238 244 - (void) changeNavLevel: (uint8_t) level : (BOOL) push
239 245 {
240   - NSLog(@"[MenuTableViewController.m]: navLevel is %d",level);
  246 + NSLog(@"[MenuTableViewController.m]: Changing to navLevel %d",level);
241 247 self.showIndexes = FALSE;
242 248 if(push)
243 249 {
... ... @@ -304,10 +310,6 @@
304 310 [self setCurrentHeaders:[self configHeaders]];
305 311 }
306 312 //AND SO ON...
307   - NSLog(@"MenuTableViewController.m]: New elements: %@",[self currentElements]);
308   - NSLog(@"MenuTableViewController.m]: New structure: %@",[self currentStructure]);
309   - NSLog(@"MenuTableViewController.m]: New headers: %@",[self currentHeaders]);
310   - NSLog(@"MenuTableViewController.m]: New cell identifier: %@",[self currentCellIdentifier]);
311 313 [self reloadTable:UITableViewRowAnimationAutomatic];
312 314 }
313 315  
... ... @@ -401,25 +403,19 @@
401 403 else if(self.sentCommand == A2 && [[response substringToIndex:2]isEqualToString:@"P2"])
402 404 {
403 405 NSLog(@"[MenuTableViewController.m]: Received A2 answer");
404   - [self setSalesLog:[[SalesLog alloc]init]];
405   - [[self salesLog] setResponseValue:response];
406   - [self generateSaleListNavLevel];
  406 + [self generateSaleListNavLevel : response];
407 407 [self changeNavLevel:SALE_LIST:TRUE];
408 408 }
409 409 else if(self.sentCommand == A3 && [[response substringToIndex:2]isEqualToString:@"P3"])
410 410 {
411 411 NSLog(@"[MenuTableViewController.m]: Received A3 answer");
412   - [self setIncidentLog:[[IncidentLog alloc]init]];
413   - [[self incidentLog] setResponseValue:response];
414   - [self generateIncidentListNavLevel];
  412 + [self generateIncidentListNavLevel : response];
415 413 [self changeNavLevel:INCIDENT_LIST:TRUE];
416 414 }
417 415 else if(self.sentCommand == A4 && [[response substringToIndex:2]isEqualToString:@"P4"])
418 416 {
419 417 NSLog(@"[MenuTableViewController.m]: Received A4 answer");
420   - [self setSensorStatus:[[Sensors alloc]init]];
421   - [[self sensorStatus] setResponseValue:response];
422   - [self generateMaintenanceLevel];
  418 + [self generateMaintenanceLevel : response];
423 419 [self changeNavLevel:MAINTENANCE:TRUE];
424 420 }
425 421 else if(self.sentCommand == A5 && [[response substringToIndex:2]isEqualToString:@"P5"])
... ... @@ -471,6 +467,7 @@
471 467 {
472 468 self.sentCommand = NONE;
473 469 }
  470 + return;
474 471 }
475 472 else
476 473 {
... ... @@ -885,7 +882,6 @@
885 882  
886 883 - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
887 884 {
888   - NSLog(@"Section: %ld Row: %ld",(long)[indexPath section],(long)[indexPath row]);
889 885 [tableView deselectRowAtIndexPath:indexPath animated:YES];
890 886 UITableViewCell *cell = [[self tableView] cellForRowAtIndexPath:indexPath];
891 887 NSString *cellName = [[cell textLabel]text];
... ... @@ -1042,12 +1038,16 @@
1042 1038 {
1043 1039 self.datePickerViewController = [[DatePickerViewController alloc] initWithNibName:@"DatePickerViewController_iPad_Landscape" bundle:nil];
1044 1040 self.datePickerViewController.delegate = self;
  1041 + self.datePickerViewController.childDelegate = self;
  1042 + [self.childViewControllers insertObject:self.datePickerViewController atIndex:self.childViewControllers.count];
1045 1043 [self.datePickerViewController showInView:self.navigationController.view animated:YES];
1046 1044 }
1047 1045 else
1048 1046 {
1049 1047 self.datePickerViewController = [[DatePickerViewController alloc] initWithNibName:@"DatePickerViewController_iPad" bundle:nil];
1050 1048 self.datePickerViewController.delegate = self;
  1049 + self.datePickerViewController.childDelegate = self;
  1050 + [self.childViewControllers insertObject:self.datePickerViewController atIndex:self.childViewControllers.count];
1051 1051 [self.datePickerViewController showInView:self.navigationController.view animated:YES];
1052 1052 }
1053 1053 }
... ... @@ -1057,12 +1057,16 @@
1057 1057 {
1058 1058 self.datePickerViewController = [[DatePickerViewController alloc] initWithNibName:@"DatePickerViewController" bundle:nil];
1059 1059 self.datePickerViewController.delegate = self;
  1060 + self.datePickerViewController.childDelegate = self;
  1061 + [self.childViewControllers insertObject:self.datePickerViewController atIndex:self.childViewControllers.count];
1060 1062 [self.datePickerViewController showInView:self.navigationController.view animated:YES];
1061 1063 }
1062 1064 else
1063 1065 {
1064 1066 self.datePickerViewController = [[DatePickerViewController alloc] initWithNibName:@"DatePickerViewController_Landscape" bundle:nil];
1065 1067 self.datePickerViewController.delegate = self;
  1068 + self.datePickerViewController.childDelegate = self;
  1069 + [self.childViewControllers insertObject:self.datePickerViewController atIndex:self.childViewControllers.count];
1066 1070 [self.datePickerViewController showInView:self.navigationController.view animated:YES];
1067 1071 }
1068 1072 }
... ... @@ -1079,12 +1083,16 @@
1079 1083 {
1080 1084 self.priceChangerViewController = [[PriceChangerViewController alloc] initWithNibName:@"PriceChangerViewController_iPad_Landscape" bundle:nil];
1081 1085 self.priceChangerViewController.delegate = self;
  1086 + self.priceChangerViewController.childDelegate = self;
  1087 + [self.childViewControllers insertObject:self.priceChangerViewController atIndex:self.childViewControllers.count];
1082 1088 [self.priceChangerViewController showInView:self.navigationController.view animated:YES];
1083 1089 }
1084 1090 else
1085 1091 {
1086 1092 self.priceChangerViewController = [[PriceChangerViewController alloc] initWithNibName:@"PriceChangerViewController_iPad" bundle:nil];
1087 1093 self.priceChangerViewController.delegate = self;
  1094 + self.priceChangerViewController.childDelegate = self;
  1095 + [self.childViewControllers insertObject:self.priceChangerViewController atIndex:self.childViewControllers.count];
1088 1096 [self.priceChangerViewController showInView:self.navigationController.view animated:YES];
1089 1097 }
1090 1098 }
... ... @@ -1094,12 +1102,16 @@
1094 1102 {
1095 1103 self.priceChangerViewController = [[PriceChangerViewController alloc] initWithNibName:@"PriceChangerViewController" bundle:nil];
1096 1104 self.priceChangerViewController.delegate = self;
  1105 + self.priceChangerViewController.childDelegate = self;
  1106 + [self.childViewControllers insertObject:self.priceChangerViewController atIndex:self.childViewControllers.count];
1097 1107 [self.priceChangerViewController showInView:self.navigationController.view animated:YES];
1098 1108 }
1099 1109 else
1100 1110 {
1101 1111 self.priceChangerViewController = [[PriceChangerViewController alloc] initWithNibName:@"PriceChangerViewController_Landscape" bundle:nil];
1102 1112 self.priceChangerViewController.delegate = self;
  1113 + self.priceChangerViewController.childDelegate = self;
  1114 + [self.childViewControllers insertObject:self.priceChangerViewController atIndex:self.childViewControllers.count];
1103 1115 [self.priceChangerViewController showInView:self.navigationController.view animated:YES];
1104 1116 }
1105 1117 }
... ... @@ -1116,12 +1128,16 @@
1116 1128 {
1117 1129 self.nameChangerViewController = [[NameChangerViewController alloc] initWithNibName:@"NameChangerViewController_iPad_Landscape" bundle:nil];
1118 1130 self.nameChangerViewController.delegate = self;
  1131 + self.nameChangerViewController.childDelegate = self;
  1132 + [self.childViewControllers insertObject:self.nameChangerViewController atIndex:self.childViewControllers.count];
1119 1133 [self.nameChangerViewController showInView:self.navigationController.view animated:YES];
1120 1134 }
1121 1135 else
1122 1136 {
1123 1137 self.nameChangerViewController = [[NameChangerViewController alloc] initWithNibName:@"NameChangerViewController_iPad" bundle:nil];
1124 1138 self.nameChangerViewController.delegate = self;
  1139 + self.nameChangerViewController.childDelegate = self;
  1140 + [self.childViewControllers insertObject:self.nameChangerViewController atIndex:self.childViewControllers.count];
1125 1141 [self.nameChangerViewController showInView:self.navigationController.view animated:YES];
1126 1142 }
1127 1143 }
... ... @@ -1131,12 +1147,16 @@
1131 1147 {
1132 1148 self.nameChangerViewController = [[NameChangerViewController alloc] initWithNibName:@"NameChangerViewController_Landscape" bundle:nil];
1133 1149 self.nameChangerViewController.delegate = self;
  1150 + self.nameChangerViewController.childDelegate = self;
  1151 + [self.childViewControllers insertObject:self.nameChangerViewController atIndex:self.childViewControllers.count];
1134 1152 [self.nameChangerViewController showInView:self.navigationController.view animated:YES];
1135 1153 }
1136 1154 else
1137 1155 {
1138 1156 self.nameChangerViewController = [[NameChangerViewController alloc] initWithNibName:@"NameChangerViewController" bundle:nil];
1139 1157 self.nameChangerViewController.delegate = self;
  1158 + self.nameChangerViewController.childDelegate = self;
  1159 + [self.childViewControllers insertObject:self.nameChangerViewController atIndex:self.childViewControllers.count];
1140 1160 [self.nameChangerViewController showInView:self.navigationController.view animated:YES];
1141 1161 }
1142 1162 }
... ... @@ -1194,10 +1214,8 @@
1194 1214 //INSTANTIATE CELL IF NEEDED
1195 1215 if (cell == nil)
1196 1216 {
1197   - NSLog(@"[MenuTableViewController.m]: Initializing cell");
1198 1217 if([self currentNavLevel] == MAINTENANCE)
1199 1218 {
1200   - NSLog(@"[MenuTableViewController.m]: Dispatching Maintenance-type cell");
1201 1219 cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleValue1 reuseIdentifier:[self currentCellIdentifier]];
1202 1220 }
1203 1221 else
... ... @@ -1620,7 +1638,6 @@
1620 1638 NSCalendar *calendar = [[NSCalendar alloc] initWithCalendarIdentifier:NSGregorianCalendar];
1621 1639 NSCalendarUnit units = NSYearCalendarUnit | NSMonthCalendarUnit | NSDayCalendarUnit | NSHourCalendarUnit | NSMinuteCalendarUnit | NSSecondCalendarUnit;
1622 1640 NSDateComponents *components = [calendar components:units fromDate:date];
1623   - NSLog(@"[MenuTableViewController.m]: %@", components);
1624 1641 [_protocol updateTime: components];
1625 1642 [self setSentCommand:A5];
1626 1643 [self startTimeoutTimer];
... ... @@ -1628,7 +1645,6 @@
1628 1645  
1629 1646 - (void)passPriceViewController:(PriceChangerViewController *)controller didFinishEnteringItem:(NSArray *)data
1630 1647 {
1631   - NSLog(@"[MenuTableViewController.m]: %@", data);
1632 1648 //Channel,Code,Price
1633 1649 NSString *channelString = [data objectAtIndex:0];
1634 1650 NSString *codeString = [data objectAtIndex:1];
... ... @@ -1671,7 +1687,6 @@
1671 1687  
1672 1688 - (void)passNameViewController:(PriceChangerViewController *)controller didFinishEnteringItem:(NSArray *)data
1673 1689 {
1674   - NSLog(@"[MenuTableViewController.m]: %@", data);
1675 1690 //Channel,Code,Name
1676 1691 NSString *channelString = [data objectAtIndex:0];
1677 1692 NSString *codeString = [data objectAtIndex:1];
... ... @@ -1712,7 +1727,6 @@
1712 1727 if([self requestedLog] == SALES_LOG)
1713 1728 {
1714 1729 NSLog(@"[MenuTableViewController.m]: Changing to navLevel: SALE_LIST");
1715   -
1716 1730 NSCalendar *calendar = [[NSCalendar alloc] initWithCalendarIdentifier:NSGregorianCalendar];
1717 1731 NSCalendarUnit units = NSYearCalendarUnit | NSMonthCalendarUnit | NSDayCalendarUnit | NSHourCalendarUnit | NSMinuteCalendarUnit | NSSecondCalendarUnit;
1718 1732 NSDateComponents *componentsFrom = nil;
... ... @@ -1732,7 +1746,6 @@
1732 1746 else if([self requestedLog] == INCIDENT_LOG)
1733 1747 {
1734 1748 NSLog(@"[MenuTableViewController.m]: Changing to navLevel: INCIDENT_LIST");
1735   -
1736 1749 NSCalendar *calendar = [[NSCalendar alloc] initWithCalendarIdentifier:NSGregorianCalendar];
1737 1750 NSCalendarUnit units = NSYearCalendarUnit | NSMonthCalendarUnit | NSDayCalendarUnit | NSHourCalendarUnit | NSMinuteCalendarUnit | NSSecondCalendarUnit;
1738 1751 NSDateComponents *componentsFrom = nil;
... ...
BT Vendor/NameChangerViewController.h
... ... @@ -11,6 +11,7 @@
11 11 #import <UIKit/UIKit.h>
12 12 #import <QuartzCore/QuartzCore.h>
13 13 #import "BTAppDelegate.h"
  14 +#import "ChildViewController.h"
14 15  
15 16 @protocol NameChangerViewControllerDelegate <NSObject>
16 17 - (void)passNameViewController:(NameChangerViewController*)controller didFinishEnteringItem:(NSArray *)data;
... ... @@ -18,7 +19,7 @@
18 19 @end
19 20  
20 21  
21   -@interface NameChangerViewController : UIViewController <UITextFieldDelegate>
  22 +@interface NameChangerViewController : ChildViewController <UITextFieldDelegate>
22 23  
23 24 @property (strong, nonatomic) IBOutlet UIView *nameChangerView;
24 25 @property (strong, nonatomic) IBOutlet UITextField *name;
... ... @@ -26,8 +27,8 @@
26 27 @property (strong, nonatomic) IBOutlet UITextField *code;
27 28 @property (nonatomic, strong) id <NameChangerViewControllerDelegate> delegate;
28 29  
29   -- (void)showInView:(UIView *)aView animated:(BOOL)animated;
30   -- (IBAction)closePopup:(id)sender;
  30 +- (void) showInView:(UIView *)aView animated:(BOOL)animated;
  31 +- (IBAction) closePopup:(id)sender;
31 32  
32 33  
33 34 @end
34 35 \ No newline at end of file
... ...
BT Vendor/NameChangerViewController.m
... ... @@ -23,6 +23,16 @@
23 23 return self;
24 24 }
25 25  
  26 +- (void) parentViewControllerDidRotateWithOrientation: (UIDeviceOrientation) orientation
  27 +{
  28 + NSLog(@"[NameChangerViewController.m]: Screen did rotate");
  29 +}
  30 +
  31 +- (void) parentViewControllerWillRotateToInterfaceOrientation: (UIInterfaceOrientation)toInterfaceOrientation duration: (NSTimeInterval)duration
  32 +{
  33 + NSLog(@"[NameChangerViewController.m]: Screen will rotate");
  34 +}
  35 +
26 36 - (void)viewDidLoad
27 37 {
28 38 self.nameChangerView.layer.cornerRadius = 5;
... ... @@ -88,6 +98,7 @@
88 98 {
89 99 NSArray *data = [[NSArray alloc] initWithObjects:[[self channel] text],[[self code] text],[[self name] text], nil];
90 100 [self.delegate passNameViewController:self didFinishEnteringItem:data];
  101 + [self.childDelegate removeChildFromParentController:self];
91 102 [self removeAnimate];
92 103 }
93 104  
... ...
BT Vendor/PriceChangerViewController.h
... ... @@ -11,6 +11,7 @@
11 11 #import <UIKit/UIKit.h>
12 12 #import <QuartzCore/QuartzCore.h>
13 13 #import "BTAppDelegate.h"
  14 +#import "ChildViewController.h"
14 15  
15 16 @protocol PriceChangerViewControllerDelegate <NSObject>
16 17 - (void)passPriceViewController:(PriceChangerViewController*)controller didFinishEnteringItem:(NSArray *)data;
... ... @@ -18,7 +19,7 @@
18 19 @end
19 20  
20 21  
21   -@interface PriceChangerViewController : UIViewController <UITextFieldDelegate>
  22 +@interface PriceChangerViewController : ChildViewController <UITextFieldDelegate>
22 23  
23 24 @property (strong, nonatomic) IBOutlet UIView *priceChangerView;
24 25 @property (strong, nonatomic) IBOutlet UITextField *price;
... ... @@ -26,8 +27,8 @@
26 27 @property (strong, nonatomic) IBOutlet UITextField *code;
27 28 @property (nonatomic, strong) id <PriceChangerViewControllerDelegate> delegate;
28 29  
29   -- (void)showInView:(UIView *)aView animated:(BOOL)animated;
30   -- (IBAction)closePopup:(id)sender;
  30 +- (void) showInView:(UIView *)aView animated:(BOOL)animated;
  31 +- (IBAction) closePopup:(id)sender;
31 32  
32 33  
33 34 @end
... ...
BT Vendor/PriceChangerViewController.m
... ... @@ -23,6 +23,16 @@
23 23 return self;
24 24 }
25 25  
  26 +- (void) parentViewControllerDidRotateWithOrientation: (UIDeviceOrientation) orientation
  27 +{
  28 + NSLog(@"[PriceChangerViewController.m]: Screen did rotate");
  29 +}
  30 +
  31 +- (void) parentViewControllerWillRotateToInterfaceOrientation: (UIInterfaceOrientation)toInterfaceOrientation duration: (NSTimeInterval)duration
  32 +{
  33 + NSLog(@"[PriceChangerViewController.m]: Screen will rotate");
  34 +}
  35 +
26 36 - (void)viewDidLoad
27 37 {
28 38 self.priceChangerView.layer.cornerRadius = 5;
... ... @@ -105,6 +115,7 @@
105 115 [self formatPrice];
106 116 NSArray *data = [[NSArray alloc] initWithObjects:[[self channel] text],[[self code] text],[[self price] text], nil];
107 117 [self.delegate passPriceViewController:self didFinishEnteringItem:data];
  118 + [self.childDelegate removeChildFromParentController:self];
108 119 [self removeAnimate];
109 120 }
110 121  
... ...
BT Vendor/SalesLog.h
... ... @@ -16,6 +16,6 @@
16 16 @property (strong,nonatomic) NSMutableArray *sales;
17 17  
18 18 - (id) init;
19   -- (void) setResponseValue:(NSString *)response;
  19 +- (void) setResponseValue : (NSString *)response;
20 20  
21 21 @end
... ...
BT Vendor/Sensors.h
... ... @@ -23,6 +23,6 @@
23 23 @property (strong,nonatomic) NSMutableArray *changeAvailable;
24 24  
25 25 - (id) init;
26   -- (void) setResponseValue:(NSString *)response;
  26 +- (void) setResponseValue: (NSString *)response;
27 27  
28 28 @end
... ...
BT Vendor/Stack.h
... ... @@ -11,7 +11,7 @@
11 11 @interface Stack : NSObject
12 12  
13 13 - (id) init;
14   -- (void) push: (id) element;
  14 +- (void) push : (id) element;
15 15 - (id) pop;
16 16 - (NSInteger) count;
17 17 - (void) clear;
... ...
BT Vendor/Stack.m
... ... @@ -24,7 +24,7 @@
24 24 return self;
25 25 }
26 26  
27   -- (void) push: (id) element
  27 +- (void) push : (id) element
28 28 {
29 29 [[self dataArray] addObject:element];
30 30 [self setLastPosition: [self lastPosition] + 1];
... ...
1   -TESTS:
2   -- A3 command
3   -- Batch commands
4   -- Localization
5   -
6 1 BUGS:
7 2 - On date change, response is overwritten by previous query, trimming needed according to numBytes
8   -
9   -TODO:
10   -- Refactor code
... ...
btvendor_web/css/btvendor.css
... ... @@ -10,14 +10,14 @@ table.textinput
10 10 border: 0px;
11 11 }
12 12  
13   -#container
  13 +#container
14 14 {
15 15 height: 100%;
16 16 width:100%;
17   - ont-size: 0;
  17 + font-size: 0;
18 18 }
19 19  
20   -#left, #right
  20 +#left, #right
21 21 {
22 22 display: inline-block;
23 23 *display: inline;
... ...
btvendor_web/js/vendorform.js
... ... @@ -22,6 +22,18 @@ function processPrice(price)
22 22 return euros + cents
23 23 }
24 24  
  25 +function clearInputs()
  26 +{
  27 + $("input[type=radio]").prop('checked',false)
  28 + $("input[name=datepicker").val("")
  29 + $("input[name=channela6").val("")
  30 + $("input[name=producta6").val("")
  31 + $("input[name=price").val("")
  32 + $("input[name=channela7").val("")
  33 + $("input[name=producta7").val("")
  34 + $("input[name=productname").val("")
  35 +}
  36 +
25 37 function addCommand()
26 38 {
27 39 command=$("input[name=command]:checked").val()
... ... @@ -89,6 +101,7 @@ function addCommand()
89 101 $("select[name=commandlist]").append(new Option(command,command))
90 102 numCommands++
91 103 $("select[name=commandlist]").attr('size',numCommands)
  104 + clearInputs()
92 105 }
93 106  
94 107 function removeCommand()
... ...