Submitted by Armando on 2010/03/04 15:54
When  I use the gantt chart, I'm plagued with all kings of errors of that type :  "Wrong number of arguments"  "invalid property assignment"
 
 
Here's an example of my functions :
 
Function DueDate_EQ_TaskActEnd( duedate,TaskActEnd, projet, task, etape )
  If IsNull(DueDate) And (Task = True Or projet = True Or etape = True ) Then
    DueDate_EQ_TaskActEnd = TaskActEnd
  ElseIf IsNull(TaskActEnd) Then
    DueDate_EQ_TaskActEnd = duedate
  Else
    DueDate_EQ_TaskActEnd = duedate
  End If
End Function

 
 
Here's what the gantt chart sends to my function parameters
 
DueDate_EQ_TaskActEnd ( NULL,40242,6666666667, 0, -1, 0 )
 
 
The first 3 parameters are dates. The 2 bold ones are the ones sent by the gantt.
 
The third parameter is huge and it's the one causing problems.
 
Sorry ! My mistake
 
The bold one is the one sent by the gantt. As you can see, it's not an integer and is interpreted as 2 different parameters, because of the Comma separation.  I'm not an expert but it seems to be caused by the "time" details after the date that the gantt chart sends to my script.
 
How can I use that info in my function without breaking everything ? And why can't my function work with these different format ?
 
A million thanks to the one able to help !
 
[EDITED]
 

Comments

Interestingly, this also affects all hierarchical equations.
 
Maybe is there a way (as an option) to set gantt without minutes and seconds ?

could it be that the gantt sends floats without the necessary delimiters or with a coma instead of a dot ?

Wow. The regional settings fixed that. I never thought about it.
 
Gantt <--> grid  relationship seems to work fine now. I'm very happy about that. I'm also happy to remove one bug out of your plate.
 
That was an easy one. But damn did I loose some time over it. ;)
 
 
P.S. : There are still a few glitches in relation to gantt display -- like the black diamond (losange) appearing sometimes when it shouldn't, but a refresh fixes it. Maybe is that a gantt component problem though as the data in the grid reflects the right duration.