gantt nexttask function generates runtime error 438

TeeChart for ActiveX, COM and ASP
Post Reply
manne
Newbie
Newbie
Posts: 2
Joined: Mon Oct 22, 2007 12:00 am

gantt nexttask function generates runtime error 438

Post by manne » Mon Oct 22, 2007 11:36 am

Dear support team,


I've a problem with the "nexttask" function.

The following code is cut out from the manual but it doesn't work:
In German, the runtime error box reports: Objekt unterstützt diese Eigenschaft oder Methode nicht.

Is this a bug?

I've tried it with the latest version of teeChart, but the error is
still the same...


Here is the sourcecode:



Code: Select all

Private Sub Form_Load()
    fillChart
End Sub

Private Sub fillChart()
    Dim tmp1, tmp2 As Integer

    With TChart1.Series(0).asGantt
       .AddGantt DateValue("1,1,1997"), DateValue("31,1,1997"),2,"Hello"
       .AddGantt DateValue("1997,1,15"), DateValue("1997,2,15"),1,"Nice"
       .AddGantt DateValue("1997, 2,1"),DateValue("1997,2,28"),0,"World"
       .AddGantt DateValue("1997, 3, 1"), DateValue("1997, 3, 31"), 2,""
       .AddGantt DateValue("1997, 4, 1"), DateValue("1997, 4, 30"), 0,""
       .AddGantt DateValue("1997, 3, 15"), DateValue("1997, 4, 15"),1,""
       'change connecting lines

       .ConnectingPen.Width = 3
       .ConnectingPen.Color = vbBlue
       ' increase bar heights
       .Pointer.VerticalSize = 16
    End With


    With TChart1.Series(0).asGantt
tmp1=.AddGantt(DateValue("1,1,1997"),DateValue("31,1,1997"),2,"Development")
tmp2=.AddGantt(DateValue("1997,1,15"),DateValue("1997,2,15"),1,"Testing")
    End With
    TChart1.Series(0).asGantt.NextTask(tmp1) = tmp2  'Runtime Error 438
End Sub

Thanks for any help or idea


Manne

Narcís
Site Admin
Site Admin
Posts: 14730
Joined: Mon Jun 09, 2003 4:00 am
Location: Banyoles, Catalonia
Contact:

Post by Narcís » Mon Oct 22, 2007 2:03 pm

Hi Manne,

Thanks for reporting. You should do this:

Code: Select all

    TChart1.Series(0).asGantt.NextTask.Value(tmp1) = tmp2
Could you please indicate where did you exactly found this code?

Thanks in advance!
Best Regards,
Narcís Calvet / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Image Image Image Image Image Image
Instructions - How to post in this forum

manne
Newbie
Newbie
Posts: 2
Joined: Mon Oct 22, 2007 12:00 am

Post by manne » Mon Oct 22, 2007 2:24 pm

Hello Narcis,

thanks a lot for your solution! I've spent hours of try and fail
to solve this problem.

The code sample is from the TeeChart 4.0.x online help (gantt)


greets


manne

Narcís
Site Admin
Site Admin
Posts: 14730
Joined: Mon Jun 09, 2003 4:00 am
Location: Banyoles, Catalonia
Contact:

Post by Narcís » Mon Oct 22, 2007 2:27 pm

Hi manne,

Thanks for the information I've added this to our defect list to be fixed for next releases.
Best Regards,
Narcís Calvet / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Image Image Image Image Image Image
Instructions - How to post in this forum

Post Reply