Our state of the art Gantt chart


Post by MauriceLapre »

Hi,

Nice work on bringing out Gantt 4.0.0 alpha! I'm trying to get that going and start implementing the Resource Histogram, but hitting errors on using gantt.module.js.

First:
gantt-4.0.0-alpha-1/build/gantt.module.js' does not provide an export named 'EffectResolutionResult'

Not using this one anymore, so removed it for now.

Second:
gantt-4.0.0-alpha-1/build/gantt.module.js' does not provide an export named 'BryntumWidgetAdapterRegister'

Using this to create my on TaskEditor tab. But I've looked at the included TaskEditor demo and you're importing a js file from /lib now. Is this export just missing, or is there a new approach?

Third:
Uncaught (in promise) TypeError: project.taskStore.load is not a function

Does TaskStore not extend AjaxStore anymore, or is this a bug?

That stops me from going any further now, I can't load my tasks, so help would me much appreciated.

Thanks!

Kind regards,

Maurice


Post by Maxim Gorkovsky »

First:
gantt-4.0.0-alpha-1/build/gantt.module.js' does not provide an export named 'EffectResolutionResult'

This is correct, class was removed. We have a feature requests to improve conflict resolution process here:
https://github.com/bryntum/support/issues/1265
https://github.com/bryntum/support/issues/1264

Second:
gantt-4.0.0-alpha-1/build/gantt.module.js' does not provide an export named 'BryntumWidgetAdapterRegister'

This is reflected in the changelog, by mistake not as breaking change:

The Core/adapter directory has been removed. There are no Widget adapters. All Widget classes register themselves
with the Widget class, and the Widget class is the source of Widget type mapping and Widget registration and
lookup by id.

To register widget try this:

class MyWidget extends Widget {
  static get type() {
    return 'mywidget';
  }
}
MyWidget.initClass();

Third:
Uncaught (in promise) TypeError: project.taskStore.load is not a function

Does TaskStore not extend AjaxStore anymore, or is this a bug?

Task store does not extend AjaxStore as far as I can see, but you can still use taskStore.data = data. Data is supposed to be loaded via project instance. What is your usecase?


Post by MauriceLapre »

Hi,

Thanks for responding quickly.

The first is not an issue for me right now, but I'll keep the feature requests in mind.

The second is solved with the described approach. Assumption because I haven't got it working yet because of the third.

The third. From gantt.module.js 2.1.8:

class TaskStore extends PartOfProject(BuildMinimalEventStore(EventStoreMixin(AjaxStore))) {

In 4.0.0:

class TaskStore extends ChronoEventTreeStoreMixin.derive(Store).mixin(PartOfProject$1) {

My usecase is that I use this to load tasks and subtasks in different stores via different urls, manipulate the data and then manually add everything to the main taskstore. I can't use the project load for this.


Post by Maxim Gorkovsky »

I opened ticket to investigate this: https://github.com/bryntum/support/issues/1340 Thank you for report. We will try to fix this to alpha 3 (middle of next week)


Post by MauriceLapre »

Alright, thank you. If it is indeed deliberate, please let me know as soon as possible because that would force me to completely change my data loading process...


Post by Maxim Gorkovsky »

Will do.


Post by Maxim Gorkovsky »

Issue is resolved and will be released with alpha 3 next week.


Post by MauriceLapre »

That was quick! Looking forward to it!


Post Reply