Discuss anything related to web development but no technical support questions


Post by manumonte91 »

I am using Bryntum version 23, but I can't understanding the following problem: when I open a gantt with resource histogram, it returns an error from browser console, it says: "Abstract method called", it comes from the function "getTimeSpanDefiningStore" in the object "Sch.mixin.TimelinePanel" with only the code "throw "Abstract method called"". Can anyone help me about it?

Post by mats »

Please provide us with a full clear test case.

Post by manumonte91 »

There's a Gantt/Histogram opened correctly with Bryntum 12
ganttbryntum12.PNG
ganttbryntum12.PNG (72.57 KiB) Viewed 3099 times
Upgrading to Bryntum 23 returns this error on browser console
bugbryntum.png
bugbryntum.png (89.84 KiB) Viewed 3099 times
Below there's an archive with reference files that create Gantt/Histogram.

I hope it is enough.
Attachments
GanttHistogram View.zip
(4.48 KiB) Downloaded 184 times

Post by mats »

Sorry, no it's not enough. You need to upload an example that we can run, not just some javascript files. Please look at our samples, and create something similar.

Post by manumonte91 »

How can I do? The code is integrated in a Visual Studio solution, it's a complicated question making an example to run about it.

Post by mats »

Look at our original histogram sample, try to modify it to produce the error. Should be simple!

Post by manumonte91 »

I've done a bit of tests and I've seen how to solve the problem: I modified into Sch.mixin.TimelinePanel file in line 359 from Bryntum with the following code:
getTimeSpanDefiningStore : function () {
    return this.taskStore;
    //throw "Abstract method called";
},
The frame code that I added I've taken it from Gnt.panel.Gantt file in line 943 where it there's the same name function that returns in output "this.taskStore", so I copied it from there and paste it into the interesting function, also commenting the "throw" instruction that causes the issue about it, and now it works.

Anyway thanks for the support.

Post by arcady »

Don't do this. First of all method you edited is supposed to be abstract. :)
Instead you should add this method to Gnt.panel.ResourceHistogram class. But if you edit our standard classes you'll have problems upgrading our software since you'll have to keep in mind to apply your patch every time.
So I'd suggest you to extend Gnt.panel.ResourceHistogram class:
Ext.define('MyHistogram', {
    extend : 'Gnt.panel.ResourceHistogram',
    getTimeSpanDefiningStore : function () {
        return this.taskStore;
    }
});
And in the meantime we will upgrade standard Gnt.panel.ResourceHistogram to support getTimeSpanDefiningStore method so next release will include the fix.
Here is a ticket to track the issue status: https://www.assembla.com/spaces/bryntum/tickets/1528
Thanks very much for the feedback. :)

Post by manumonte91 »

Ok, thanks for the suggestion, it works anyway.

Post Reply