Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
jalhyd
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor 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
Cassiopée
jalhyd
Commits
84440aeb
Commit
84440aeb
authored
5 years ago
by
David Dorchies
Browse files
Options
Downloads
Patches
Plain Diff
Fix
#109
Remove getter resultsOk in Result and ResultElement
parent
e9367347
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
src/nub.ts
+3
-1
3 additions, 1 deletion
src/nub.ts
src/util/result.ts
+1
-17
1 addition, 17 deletions
src/util/result.ts
src/util/resultelement.ts
+1
-5
1 addition, 5 deletions
src/util/resultelement.ts
with
5 additions
and
23 deletions
src/nub.ts
+
3
−
1
View file @
84440aeb
...
...
@@ -436,7 +436,7 @@ export abstract class Nub extends ComputeNode implements IObservable {
public
V
(
p
:
ParamDefinition
):
number
{
if
(
p
.
valueMode
===
ParamValueMode
.
CALCUL
)
{
if
(
this
.
result
!==
undefined
)
{
if
(
this
.
result
.
ok
)
{
if
(
this
.
result
.
resultElement
.
ok
)
{
return
this
.
result
.
vCalc
;
}
}
...
...
@@ -943,12 +943,14 @@ export abstract class Nub extends ComputeNode implements IObservable {
try
{
param
.
defineReference
(
destNub
,
p
.
targetParam
);
}
catch
(
err
)
{
// tslint:disable-next-line:no-console
console
.
error
(
`fixLinks: defineReference error`
+
` (
${
this
.
uid
}
.
${
param
.
symbol
}
=>
${
destNub
.
uid
}
.
${
p
.
targetParam
}
)`
);
// forward error
ret
.
hasErrors
=
true
;
}
}
else
{
// tslint:disable-next-line:no-console
console
.
error
(
"
fixLinks : cannot find target Nub
"
);
// forward error
ret
.
hasErrors
=
true
;
...
...
This diff is collapsed.
Click to expand it.
src/util/result.ts
+
1
−
17
View file @
84440aeb
...
...
@@ -279,23 +279,7 @@ export class Result extends JalhydObject implements INamedIterableValues {
* @returns true si le test est valide
*/
public
get
ok
():
boolean
{
return
this
.
resultsOk
&&
!
this
.
hasErrorMessages
;
}
/**
* Teste si tous les résultats + complémentaires sont valides
* @returns true si le test est valide
*/
public
get
resultsOk
():
boolean
{
if
(
this
.
_resultElements
.
length
===
0
)
{
return
false
;
}
for
(
const
r
of
this
.
_resultElements
)
{
if
(
!
r
.
resultsOk
)
{
return
false
;
}
}
return
true
;
return
this
.
resultElement
.
ok
;
}
/**
...
...
This diff is collapsed.
Click to expand it.
src/util/resultelement.ts
+
1
−
5
View file @
84440aeb
...
...
@@ -57,10 +57,6 @@ export class ResultElement {
return
Object
.
keys
(
this
.
_extraResults
).
length
>
0
;
}
public
get
resultsOk
():
boolean
{
return
this
.
_vCalc
!==
undefined
||
this
.
hasExtraResults
;
}
private
get
messageCount
():
number
{
return
this
.
log
.
messages
.
length
;
}
...
...
@@ -82,7 +78,7 @@ export class ResultElement {
}
public
get
ok
():
boolean
{
return
this
.
r
esults
Ok
&&
!
this
.
hasErrorMessages
;
return
(
this
.
_vCalc
!==
undefined
||
this
.
hasExtraR
esults
)
&&
!
this
.
hasErrorMessages
;
}
/**
...
...
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