Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
gmsh
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Larry Price
gmsh
Commits
f11c0e29
Commit
f11c0e29
authored
11 years ago
by
Maxime Graulich
Browse files
Options
Downloads
Patches
Plain Diff
iOS: refresh model list
parent
9031e39c
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
contrib/mobile/iOS/Onelab/ModelListController.mm
+14
-3
14 additions, 3 deletions
contrib/mobile/iOS/Onelab/ModelListController.mm
with
14 additions
and
3 deletions
contrib/mobile/iOS/Onelab/ModelListController.mm
+
14
−
3
View file @
f11c0e29
...
@@ -42,14 +42,19 @@
...
@@ -42,14 +42,19 @@
-
(
void
)
refreshList
-
(
void
)
refreshList
{
{
/*NSArray *docs = [[NSFileManager defaultManager] contentsOfDirectoryAtPath:docsPath error:NULL];
NSString
*
docsPath
=
[
Utils
getApplicationDocumentsDirectory
];
NSArray
*
docs
=
[[
NSFileManager
defaultManager
]
contentsOfDirectoryAtPath
:
docsPath
error
:
NULL
];
for
(
NSString
*
doc
in
docs
)
{
for
(
NSString
*
doc
in
docs
)
{
NSString
*
docPath
=
[
NSString
stringWithFormat
:
@"%@/%@/"
,
docsPath
,
doc
];
NSString
*
docPath
=
[
NSString
stringWithFormat
:
@"%@/%@/"
,
docsPath
,
doc
];
BOOL
isDir
=
NO
;
[[
NSFileManager
defaultManager
]
fileExistsAtPath
:
docPath
isDirectory
:
&
isDir
];
BOOL
isDir
=
NO
;
[[
NSFileManager
defaultManager
]
fileExistsAtPath
:
docPath
isDirectory
:
&
isDir
];
if
(
isDir
){
if
(
isDir
){
NSString
*
infos
=
[
NSString
stringWithFormat
:
@"%@%@"
,
docPath
,
@"infos.xml"
];
if
([[
NSFileManager
defaultManager
]
fileExistsAtPath
:
infos
])
{
currentDir
=
docPath
;
[
self
parseInfosFile
:
infos
];
}
}
}
}
*/
}
[
self
.
tableView
reloadData
];
[
self
.
tableView
reloadData
];
[
self
.
refreshControl
endRefreshing
];
[
self
.
refreshControl
endRefreshing
];
}
}
...
@@ -158,6 +163,12 @@
...
@@ -158,6 +163,12 @@
-
(
void
)
parser
:(
NSXMLParser
*
)
parser
didEndElement
:(
NSString
*
)
elementName
namespaceURI
:(
NSString
*
)
namespaceURI
qualifiedName
:(
NSString
*
)
qName
-
(
void
)
parser
:(
NSXMLParser
*
)
parser
didEndElement
:(
NSString
*
)
elementName
namespaceURI
:(
NSString
*
)
namespaceURI
qualifiedName
:(
NSString
*
)
qName
{
{
if
([
elementName
isEqual
:
@"title"
])
{
if
([
elementName
isEqual
:
@"title"
])
{
for
(
Model
*
mp
in
models
)
{
if
([[
mp
getName
]
isEqual
:
currentElementValue
]){
[
parser
abortParsing
];
return
;
}
}
Model
*
m
=
[[
Model
alloc
]
initWithName
:
currentElementValue
];
Model
*
m
=
[[
Model
alloc
]
initWithName
:
currentElementValue
];
[
models
addObject
:
m
];
[
models
addObject
:
m
];
}
}
...
...
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