0

I'm trying to set up an Extensible Calendar Pro in my ExtJs 4.1 application, but I still get a name is undefined error.

EDIT:

I solved the original problem, but directly went in another.

Updated code:

Ext.define('ZeuS.view.panels.ZeusMainPanel',{
    extend: 'Ext.panel.Panel',
    id : 'zeusMainPanel',
    alias : 'widget.zeus',

requires : [
    'Extensible.Extensible',
    'Extensible.calendar.CalendarPanel',
    'Extensible.calendar.data.MemoryEventStore',
    'Extensible.calendar.data.EventModel',
    'Extensible.calendar.view.*'
],

    autoShow : true,
    layout : 'border',
    border : false,

    initComponent : function(){
        this.items = [{
                /*
                 * Some other Ext Elements
                 */
            }, {
                region : 'east',
                xtype : 'extensible.calendarpanel',
                name : 'zeus-calendar',
                width : 500,
                eventStore: Ext.create('Extensible.calendar.data.EventStore', {
                    data: Ext.create('Extensible.calendar.data.EventModel',{
                        StartDate: '2101-01-12 12:00:00',
                        EndDate: '2101-01-12 13:30:00',
                        Title: 'My cool event',
                        Notes: 'Some notes'
                    })
                })
            }
        ];

        this.callParent(arguments);
    }

});

Now it loads all classes correctly when the Extensible singleton is included, but nothing works. I just have a white screen and no functions in the controller or anywhere else are called. When I remove it from the requires list it comes up with this error: Extensible.log is not a function

Do I use the plugin at all right?

Any advice?

Aminesrine
  • 2,082
  • 6
  • 35
  • 64
Demnogonis
  • 3,172
  • 5
  • 31
  • 45
  • In the commented out 'other Ext Elements' you do have something with region: 'center', right? – sha May 04 '12 at 10:32
  • Yes I have. It is a completely working border layout. These parts were just picking up space in the question. – Demnogonis May 04 '12 at 11:27
  • So, where exactly an error is coming from? – sha May 04 '12 at 11:51
  • It is definitively coming from the calendarpanel call. I made a simplistic test app with this only call in my view class and it throws the same error. – Demnogonis May 04 '12 at 12:00
  • Try to break it down. May be create a store beforehand, make sure store exists and then create calendar? – sha May 04 '12 at 12:02
  • Hm... I put the store declaration and its content in a variable. I also registered `Extensible.calendar.CalendarPanel` in the view-list of my controller. Now it loads a huge bunch of classes, but still doesn't display anything... – Demnogonis May 04 '12 at 12:48
  • I just noticed - it should be require_s_ not require. – sha May 04 '12 at 12:52
  • I found the mistake. The xtype was misspelled and caused the error. But now it throws another error from the `AbstractCalendar.js`: `Extensible.log is not a function`... I will google that. Thank you :) – Demnogonis May 04 '12 at 13:06

1 Answers1

1

Extensible.log is defined on the Extensible singleton, so it should always be available if your dependencies and includes are set up correctly. You really should post in the Extensible forums with additonal details (Ext version, Extensible version, script include markup) as this is basically a product support question.

EDIT: By the way, there is no such thing as Extensible.Extensible, which might be part of your problem. Also you cannot use wildcard requires statements for non-Sencha classes. You might try getting a basic example working first before trying to create a complex layout with it.

Brian Moeskau
  • 20,103
  • 8
  • 71
  • 73
  • 1
    Ok, I will explain my problem in your forum in a more detailed way. Thanks for the reply. Only as a stimulus, but could you add another example application to your examples, which shows how to implement the calendar in the ExtJS MVC pattern? I think this would prevent similar issues in the future. – Demnogonis May 07 '12 at 13:23
  • Yes, I will do that when I get a chance. Should be easy enough. – Brian Moeskau May 10 '12 at 20:43
  • Cool, thanks! By the way: I've posted the quesion at the extensible forums now. – Demnogonis May 11 '12 at 07:25