bmcgin
#1
I do not see a dataStore forum, so I hope it is ok to ask here.
What is the proper syntax to create a data store prototype?
something like:
dhtmlXDataStore.prototype.xyz = function() {
// do something
}
This syntax does is working…must be close?
bmcgin
#2
The syntax seems to be ok as an error is not thrown when the page is loaded.
I do get an error when calling:
myDs = new dhtmlXDataStore();
myDs.xyz();
Uncaught TypeError: Object # has no method ‘xyz’
dhtmlXDataStore is an alias, so to add something to prototype, you need to use
dhx.DataCollection.prototype.xyz = function(){}
bmcgin
#4
Great thank you. I have my own .post() prototype for forms and dataStores.