PDA

View Full Version : Use Calendar within other package



MonkeySleeve
5 Sep 2019, 5:23 AM
I'm trying to figure out how the new calendar works in regards with the stores and events but first I want to be able to actually just see it without data. For our app we use packages in order to dynamically load in the package if the user uses a Route to that package(In this case, the calendar). So we don't want it to load the calendar package unnecessary when it doesn't have to yet. So we've added the calendar package to our 'uses' property in the app.json.

The actual app that is suppose to show the calendar is called SysCalendar and this is also a package so it can be loaded in when needed. But now i'm noticing that requiring 'Ext.calendar.store.Calendars' in the SysCalendarViewModel, results in an error when building the app:

[ERR] com.sencha.exceptions.ExBuild: Failed to find any files for C:\Program Files (x86)\Apache Software Foundation\Tomcat 7.0\webapps\sys-app\packages\local\SysCalendar\src\view\calendar\CalendarModel.js::ClassRequire::Ext.calendar.store.Calendars

Is there a way to let other packages use the calendar package?

MonkeySleeve
6 Sep 2019, 4:19 AM
Found it, turns out you can set it in package.json in the 'requires' property:


"requires": ["calendar", "ux"]