The Author Online Book Forums are Moving

The Author Online Book Forums will soon redirect to Manning's liveBook and liveVideo. All book forum content will migrate to liveBook's discussion forum and all video forum content will migrate to liveVideo. Log in to liveBook or liveVideo with your Manning credentials to join the discussion!

Thank you for your engagement in the AoF over the years! We look forward to offering you a more enhanced forum experience.

TLCinAction (32) [Avatar] Offline
#1
I am at a loss. I have been over the sample code and my code with a fine tooth comb.

I get this error when I hit SAVE on the EmployeeEditorWindow

The data represented in the JSON is exactly the same as the JSON returned from the example on app.extjsinaction.com

Any thoughts? In debug, when it goes to the store.add function (line 32933 in ext-all-debug.js)

add : function(records){
records = [].concat(records);
if(records.length < 1){
return;
}
for(var i = 0, len = records.length; i < len; i++){
records[i].join(this);
33000 }

debugging when it does the records=[].concat

my debug look like
records
0
field1
field 2


Jay's looks like this in debig

record
data
0
field1
field2


Benn hammering on it for 3 days.......The data inserts into mySql perfectly, but then gets this and hangs, updating the grid on the Department Manager
jesus.garcia (463) [Avatar] Offline
#2
Re: records[i].join is not a function : Ch16 app example; Populating grid
Again, It's hard for me to know what's going on when I have no view into your code. smilie
TLCinAction (32) [Avatar] Offline
#3
Re: records[i].join is not a function : Ch16 app example; Populating grid
The problem is which piece of code to post without posting my whole app. The data is inserting into the database fine but choking on an internal EXT function in the store.add process.

I gather it must be because you are sending the data back from CI a little different even though my JSON looks just like yours.

I am currently as we speak loading your demo app onto my server so I can use FirePHP or replicate the result on my server with your exact app code and not my modified code.

Will report back.
TLCinAction (32) [Avatar] Offline
#4
Re: records[i].join is not a function : Ch16 app example; Populating grid
As well, I did run all my modified code through JSLint. Came clean.
jesus.garcia (463) [Avatar] Offline
#5
Re: records[i].join is not a function : Ch16 app example; Populating grid
I would start by figuring out which part of the workflow fails. What screen? What step?

Use Extpaste.com to post code that I and others can read.
jesus.garcia (463) [Avatar] Offline
#6
Re: records[i].join is not a function : Ch16 app example; Populating grid
Btw, what browser are you using?
TLCinAction (32) [Avatar] Offline
#7
Re: records[i].join is not a function : Ch16 app example; Populating grid
I troubleshoot with FF and Firebug.....after a week of staring at the same code, I missed variable in JSLint. I think it came from the old codeset that I didn't get changed over. On the employeegridpanel

else if (Ext.isObject(rec) && ! (rec instanceof Ext.data.Record)) {
rec = new this.store.recordType(rec);

I had

r = new this.store.recordType(rec);

Been living my app for so long i was bugeyed. I have some new questions now. Will start new thread.