mirror of
https://github.com/esiur/esiur-js.git
synced 2025-05-06 04:22:58 +00:00
fix
This commit is contained in:
parent
90a67b66a3
commit
4aa71458bc
@ -352,10 +352,10 @@ export default class DataSerializer {
|
||||
|
||||
static recordComposer(
|
||||
value, connection) {
|
||||
var rt = BinaryList();
|
||||
let rt = new BinaryList();
|
||||
|
||||
|
||||
var template = Warehouse.getTemplateByType(value.constructor);
|
||||
let template = Warehouse.getTemplateByType(value.constructor);
|
||||
|
||||
if (template == null)
|
||||
return new DataSerializerComposeResults(
|
||||
@ -363,10 +363,8 @@ export default class DataSerializer {
|
||||
|
||||
rt.addDC(DC.guidToBytes(template.classId));
|
||||
|
||||
var recordData = value.serialize();
|
||||
|
||||
for (var pt in template.properties) {
|
||||
var propValue = recordData[pt.name];
|
||||
for (let pt of template.properties) {
|
||||
let propValue = value[pt.name];
|
||||
rt.addDC(Codec.compose(propValue, connection));
|
||||
}
|
||||
|
||||
|
@ -3117,7 +3117,7 @@ export default class DistributedConnection extends IStore {
|
||||
|
||||
|
||||
this._sendParams()
|
||||
.addUint8(0x40 | IIPPacket.IIPPacketAction.StaticCall)
|
||||
.addUint8(0x40 | IIPPacketAction.StaticCall)
|
||||
.addUint32(c)
|
||||
.addGuid(classId)
|
||||
.addUint8(index)
|
||||
|
@ -442,7 +442,7 @@ export default class TemplateGenerator {
|
||||
//rt += `var rt = new AsyncReply<${rtTypeName}>();\r\n`;
|
||||
rt += `\t\tvar rt = new Esiur.Core.AsyncReply();\r\n`;
|
||||
if (f.isStatic) {
|
||||
rt += `\t\tconnection.staticCall(Guid.parse('${template.classId.toString()}'), ${f.index}, args)\r\n`;
|
||||
rt += `\t\tconnection.staticCall(Esiur.Data.Guid.parse('${template.classId.toString()}'), ${f.index}, args)\r\n`;
|
||||
} else {
|
||||
rt += `\t\tthis._invoke(${f.index}, args)\r\n`;
|
||||
}
|
||||
|
@ -129,7 +129,7 @@ const namespace = {
|
||||
define: function(target, type, className) {
|
||||
let sc = className.split('.');
|
||||
|
||||
for(let i = 0; i < sc.length; i++) {
|
||||
for(let i = 0; i < sc.length - 1; i++) {
|
||||
if (target[sc[i]] == undefined)
|
||||
target[sc[i]] = {};
|
||||
target = target[sc[i]];
|
||||
|
Loading…
x
Reference in New Issue
Block a user