Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
PLUC Inventory - Senior Design
Project overview
Project overview
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Andrew D'Abbraccio
PLUC Inventory - Senior Design
Commits
99e429bf
Commit
99e429bf
authored
Apr 07, 2015
by
Alex Moore
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
updated book object
parent
ed775511
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
11 additions
and
10 deletions
+11
-10
WAMI/WAMI/Book.h
WAMI/WAMI/Book.h
+1
-1
WAMI/WAMI/Book.m
WAMI/WAMI/Book.m
+1
-1
WAMI/WAMI/ScanBookViewController.h
WAMI/WAMI/ScanBookViewController.h
+1
-1
WAMI/WAMI/ScanBookViewController.m
WAMI/WAMI/ScanBookViewController.m
+8
-7
No files found.
WAMI/WAMI/Book.h
View file @
99e429bf
...
...
@@ -12,5 +12,5 @@
@property
(
strong
,
nonatomic
)
NSString
*
barcode
;
@property
(
strong
,
nonatomic
)
NSString
*
callnum
;
@property
(
strong
,
nonatomic
)
NSString
*
title
;
@property
(
strong
,
nonatomic
)
NSString
*
error
Msg
;
@property
(
strong
,
nonatomic
)
NSString
*
error
;
@end
WAMI/WAMI/Book.m
View file @
99e429bf
...
...
@@ -19,7 +19,7 @@
[
copy
setBarcode
:[
self
.
barcode
copyWithZone
:
zone
]];
[
copy
setCallnum
:[
self
.
callnum
copyWithZone
:
zone
]];
[
copy
setTitle
:[
self
.
title
copyWithZone
:
zone
]];
[
copy
setError
Msg
:[
self
.
errorMsg
copyWithZone
:
zone
]];
[
copy
setError
:[
self
.
error
copyWithZone
:
zone
]];
}
return
copy
;
...
...
WAMI/WAMI/ScanBookViewController.h
View file @
99e429bf
...
...
@@ -20,7 +20,7 @@
@property
(
weak
,
nonatomic
)
IBOutlet
UITableView
*
scannedBookTableView
;
@property
(
weak
,
nonatomic
)
IBOutlet
UILabel
*
lblSection
;
@property
NS
Mutable
Array
*
scannedBookList
;
@property
NSArray
*
scannedBookList
;
@property
NSString
*
lastErrorReceived
;
-
(
IBAction
)
txtChange
:(
id
)
sender
;
...
...
WAMI/WAMI/ScanBookViewController.m
View file @
99e429bf
...
...
@@ -79,7 +79,7 @@ static int BOOK_ID_LENGTH = 14;
// Configure the cell...
Book
*
book
=
[
self
.
scannedBookList
objectAtIndex
:
indexPath
.
row
];
cell
.
textLabel
.
text
=
book
.
title
;
if
(
book
.
error
Msg
!=
nil
)
{
if
(
book
.
error
!=
nil
)
{
cell
.
contentView
.
backgroundColor
=
[
UIColor
redColor
];
cell
.
textLabel
.
backgroundColor
=
[
UIColor
redColor
];
}
...
...
@@ -96,7 +96,7 @@ static int BOOK_ID_LENGTH = 14;
NSString
*
bookID
=
book
.
barcode
;
NSString
*
callNum
=
[
book
.
callnum
stringByReplacingOccurrencesOfString
:
@" "
withString
:
@" "
];
NSString
*
title
=
book
.
title
;
NSString
*
errorMsg
=
book
.
error
Msg
;
NSString
*
errorMsg
=
book
.
error
;
NSString
*
message
;
if
(
errorMsg
!=
nil
)
{
message
=
[
NSString
stringWithFormat
:
@"Book ID: %@
\n
Call Number: %@
\n
Title: %@
\n
Error: %@"
,
bookID
,
callNum
,
title
,
errorMsg
];
...
...
@@ -271,9 +271,9 @@ static int BOOK_ID_LENGTH = 14;
-
(
void
)
updateScanHistory
:(
BOOL
)
updateOnError
{
//If RTI error triggered, pop top book off list
if
(
updateOnError
&&
[
self
.
scannedBookList
count
]
>
0
)
{
[
self
.
scannedBookList
removeObjectAtIndex
:
0
];
}
//
if (updateOnError && [self.scannedBookList count] > 0) {
// self.scannedBookList = [NSArray alloc]
//
}
// Get scanned codes - Testing GetScanned
NSString
*
getScanPath
=
...
...
@@ -313,12 +313,13 @@ static int BOOK_ID_LENGTH = 14;
book
.
title
=
[
book
.
title
stringByReplacingOccurrencesOfString
:
@" "
withString
:
@" "
];
//Add top book to list
[
self
.
scannedBookList
insertObject
:
book
atIndex
:
0
];
//[self.scannedBookList insertObject:book atIndex:0];
self
.
scannedBookList
=
books
;
//Check if last book had error
if
(
bookError
)
{
Book
*
book
=
[
self
.
scannedBookList
objectAtIndex
:
0
];
book
.
error
Msg
=
lastErrorReceived
;
book
.
error
=
lastErrorReceived
;
lastErrorReceived
=
nil
;
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment