Comments (11)
At first glance, that doesn't appear to be a Deft issue.
Using a debugger (such as WebKit's Developer Tools) are you able to determine what class is being constructed and what event is being fired at the time that error is being thrown?
from deftjs.
Yeah - its the 'initialize' event fired at the end of the constructor for the activitiesindex class. With latest deft 'options' is null but with previous version 'options' is an empty object.
me.fireEvent('initialize', me);
from deftjs.
listener.options should never be null according to the code below. Is it possible you are overriding the create function somehow?
Ext.define('Ext.event.ListenerStack', {
...
add: function(fn, scope, options, order) {
...
listener = this.create(fn, scope, options, order);
...
listeners.push(listener);
},
create: function(fn, scope, options, order) {
return {
stack: this,
fn: fn,
firingFn: false,
boundFn: false,
isLateBinding: typeof fn == 'string',
scope: scope,
options: options || {},
order: order
};
},
from deftjs.
In the code example you provided, the only thing Deft is doing is intercepting the call to the Activities controller constructor, setting any injected property values into the instance and merging any injected config values into the options passed to the constructor before calling it. Deft doesn't add or override methods in the target class.
If the options value in the ListenerStack you referenced is undefined
, I would suspect that function is being called in the wrong scope. For it to be null
would mean it was explicitly set with that value somewhere. Very odd indeed.
I'm curious if Deft is mangling the config object (where you've defined the control
config) before it gets to your Activities controller's constructor.
Could you temporarily add a constructor to your Activities controller?
constructor: function(config) {
debugger;
return this.callParent(arguments);
}
When paused at that programmatic breakpoint, could you inspect the value of config
to see if / how it differs between those two Deft versions? If possible, could you paste the runtime value of that config
variable here?
Thanks!
from deftjs.
Object
application: Ext.apply.create.Class
_appFolder: "app"
_application: Ext.apply.create.Class
_before: Ext.Object.classify.objectClass
_control: Ext.Object.classify.objectClass
_controllerInstances: Array[0]
_controllers: Array[4]
_history: Ext.apply.create.Class
_launch: function (){
_models: Array[2]
_name: "ParkBeat"
_profileInstances: Array[0]
_profiles: Array[0]
_refs: Ext.Object.classify.objectClass
_requires: Array[1]
_router: Ext.apply.create.Class
_routes: Ext.Object.classify.objectClass
_stores: Array[3]
_views: Array[5]
appFolder: "app"
application: Ext.apply.create.Class
config: Ext.Object.classify.objectClass
configureDevice: function (){
controllers: Array[4]
createDevice: function () {
eventDispatcher: Ext.apply.create.Class
getEventDispatcher: function () {
getId: function () {
getObservableId: function () {
getUniqueId: function () {
id: "ext-app-application-1"
initConfig: function (){}
initialConfig: Object
launch: function (){
loadDevice: function () {
managedListeners: Object
models: Array[2]
name: "ParkBeat"
observableId: "#ext-app-application-1"
registerIdentifier: function ( uuid ){
renderError: function (record, operation) {
renderViews: function () {
requires: Array[1]
stores: Array[3]
usedSelectors: Array[1]
viewport: Object
views: Array[5]
__proto__: TemplateClass
__proto__: Object
from deftjs.
That looks good - the Controller is being instantiated with the application
config populated to reference the application.
I misspoke earlier - Deft JS injects configuration values by intercepting the initConfig()
method and merging the injected values into the configuration options that were originally passed to initConfig()
. If the class is already instantiated when injection is requested, it calls the generated config setter functions instead.
Could you add a similar temporary override for initConfig()
?
initConfig: function(config) {
debugger;
return this.callParent(arguments);
}
What is the value for config
there?
from deftjs.
config is the same as it was in the constructor. However, I notice 'initConfig' gets called twice for the same controller. Is this common?
from deftjs.
I'm really excited to use the new ViewControllers but I can't until this issue is resolved. I created a barebones project at https://github.com/jachenry/DeftJS_Issue3 so you can see the issue first hand.
from deftjs.
Thank you so much for making the barebones example. That will be immensely helpful in diagnosing the problem.
I will look into this today.
from deftjs.
Awesome. I also asked for help on the Sencha Forum. http://www.sencha.com/forum/showthread.php?198388-DeftJS-Bug-Uncaught-TypeError-Cannot-read-property-buffer-of-undefined
from deftjs.
Thanks to your sample project, I've tracked down the cause. I'll be pushing a new build with a fix shortly.
from deftjs.
Related Issues (20)
- DeftJS v0.9 - Promises not working in Internet Explorer 10 HOT 6
- Distribute packages separately. HOT 4
- Update Karma configurations from v0.8 -> v0.10 syntax HOT 1
- Add continuous deployment HOT 10
- Add Ext JS 4.2.2 to the Deft JS Test Suite HOT 2
- Add Sencha Touch 2.3.0 to the Deft JS Test Suite HOT 1
- Update the Test Suite dependencies (Mocha, Chai, Sinon, Promise/A+, etc.)
- Update to Promises/A+ Specification v1.1 and Test Suite v2.0
- Failing to require: the ViewController for a controller: annotation should trigger a warning.
- Sencha Cmd v4.0.0.203 hanging when "requires" : "[email protected]?" added HOT 14
- Migrate back to mixins for Sencha Cmd and Architect compatibility
- Suppress INFO-level log messages when not using the debug build of Sencha Touch HOT 1
- Superclass merging of ViewController 'control:' configurations
- ViewController companions HOT 4
- Touch 2.3.0 coverage report might overwrite 2.2.1 report
- deft.js and deft-debug.js are not in the repo HOT 1
- Sencha cmd 5.0.3 and touch 2.4.1 - build failed HOT 16
- Sencha 2 Routing with Deft JS.. HOT 1
- DeftJS 8.0-9.1Promise/Deferred Memory Usage HOT 5
- Promises catching errors happening in the success method HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from deftjs.