Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
O
openbis
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
sispub
openbis
Commits
6d7f8fe0
Commit
6d7f8fe0
authored
12 years ago
by
cramakri
Browse files
Options
Downloads
Patches
Plain Diff
MINOR : Handle null values for properties
SVN: 28112
parent
350e432a
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
openbis-ipad/openBIS/openBIS/CISDOBDetailViewController.m
+12
-4
12 additions, 4 deletions
openbis-ipad/openBIS/openBIS/CISDOBDetailViewController.m
with
12 additions
and
4 deletions
openbis-ipad/openBIS/openBIS/CISDOBDetailViewController.m
+
12
−
4
View file @
6d7f8fe0
...
@@ -250,7 +250,9 @@
...
@@ -250,7 +250,9 @@
{
{
NSDictionary
*
properties
=
[
self
propertiesAtIndexPath
:
indexPath
];
NSDictionary
*
properties
=
[
self
propertiesAtIndexPath
:
indexPath
];
NSString
*
label
=
[
properties
valueForKey
:
@
"label"
];
NSString
*
label
=
[
properties
valueForKey
:
@
"label"
];
if
([[
NSNull
null
]
isEqual
:
label
])
label
=
@
""
;
NSString
*
value
=
[
properties
valueForKey
:
@
"value"
];
NSString
*
value
=
[
properties
valueForKey
:
@
"value"
];
if
([[
NSNull
null
]
isEqual
:
value
])
value
=
@
""
;
//
Font
and
size
obtained
from
the
storyboard
//
Font
and
size
obtained
from
the
storyboard
CGFloat
labelFontSize
=
12.
f
;
CGFloat
labelFontSize
=
12.
f
;
...
@@ -291,8 +293,14 @@
...
@@ -291,8 +293,14 @@
if
(
!
self
.
detailItem
)
return
;
if
(
!
self
.
detailItem
)
return
;
NSDictionary
*
properties
;
NSDictionary
*
properties
;
properties
=
[
self
propertiesAtIndexPath
:
indexPath
];
properties
=
[
self
propertiesAtIndexPath
:
indexPath
];
cell
.
textLabel
.
text
=
[
properties
valueForKey
:
@
"label"
];
cell
.
detailTextLabel
.
text
=
[
properties
valueForKey
:
@
"value"
];
NSString
*
label
=
[
properties
valueForKey
:
@
"label"
];
if
([[
NSNull
null
]
isEqual
:
label
])
label
=
@
""
;
NSString
*
value
=
[
properties
valueForKey
:
@
"value"
];
if
([[
NSNull
null
]
isEqual
:
value
])
value
=
@
""
;
cell
.
textLabel
.
text
=
label
;
cell
.
detailTextLabel
.
text
=
value
;
}
}
#
pragma
mark
-
Status
Updates
#
pragma
mark
-
Status
Updates
...
@@ -341,7 +349,7 @@
...
@@ -341,7 +349,7 @@
NSError
*
errorOrNil
=
[[
note
userInfo
]
valueForKey
:
NSUnderlyingErrorKey
];
NSError
*
errorOrNil
=
[[
note
userInfo
]
valueForKey
:
NSUnderlyingErrorKey
];
if
(
errorOrNil
)
{
if
(
errorOrNil
)
{
NSString
*
description
=
[[
errorOrNil
userInfo
]
valueForKey
:
NSLocalizedDescriptionKey
];
NSString
*
description
=
[[
errorOrNil
userInfo
]
valueForKey
:
NSLocalizedDescriptionKey
];
NSString
*
statusText
=
[
NSString
stringWithFormat
:
@
"Could not drill
:%@"
,
description
];
NSString
*
statusText
=
[
NSString
stringWithFormat
:
@
"Could not drill:
%@"
,
description
];
[
self
setStatusText
:
statusText
];
[
self
setStatusText
:
statusText
];
}
else
{
}
else
{
[
self
clearStatusText
];
[
self
clearStatusText
];
...
@@ -352,7 +360,7 @@
...
@@ -352,7 +360,7 @@
NSError
*
errorOrNil
=
[[
note
userInfo
]
valueForKey
:
NSUnderlyingErrorKey
];
NSError
*
errorOrNil
=
[[
note
userInfo
]
valueForKey
:
NSUnderlyingErrorKey
];
if
(
errorOrNil
)
{
if
(
errorOrNil
)
{
NSString
*
description
=
[[
errorOrNil
userInfo
]
valueForKey
:
NSLocalizedDescriptionKey
];
NSString
*
description
=
[[
errorOrNil
userInfo
]
valueForKey
:
NSLocalizedDescriptionKey
];
NSString
*
statusText
=
[
NSString
stringWithFormat
:
@
"Could not retrieve details
:%@"
,
description
];
NSString
*
statusText
=
[
NSString
stringWithFormat
:
@
"Could not retrieve details:
%@"
,
description
];
[
self
setStatusText
:
statusText
];
[
self
setStatusText
:
statusText
];
}
else
{
}
else
{
[
self
clearStatusText
];
[
self
clearStatusText
];
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment