@@ -438,11 +438,11 @@ function createWindow() {
438438 ) ;
439439 } ) ;
440440 eGet . on ( "connected" , ( ) => {
441- // console.log(
442- // "π : file: main.js:495 : eGet.on : eServerPort:",
443- // eServerPort
444- // );
445- // console.log("π : file: main.js:495 : eGet.on : eServerIP:", eServerIP);
441+ console . log (
442+ "π : file: main.js:495 : eGet.on : eServerPort:" ,
443+ eServerPort
444+ ) ;
445+ console . log ( "π : file: main.js:495 : eGet.on : eServerIP:" , eServerIP ) ;
446446 // win.webContents.on('did-finish-load', () => {
447447 win . webContents . send ( "eServerOK" , eAddress ) ;
448448 win . webContents . send (
@@ -470,7 +470,7 @@ function createWindow() {
470470
471471 function oscListening ( ) {
472472 oUDPport = preferences . value ( "network_settings.osc_receiver_port" ) ;
473- // console.log("π : file: main.js:523 : oscListening : oUDPport:", oUDPport);
473+ console . log ( "π : file: main.js:523 : oscListening : oUDPport:" , oUDPport ) ;
474474 // win.webContents.on('did-finish-load', () => {
475475 win . webContents . send ( "loginfo" , "Port de reception OSC:" + oUDPport ) ;
476476 // })
@@ -632,10 +632,10 @@ function createWindow() {
632632
633633 sFactor = Number ( sFactor ) ;
634634 let initialReq = await eGet . getElementByPath ( ePath ) ;
635- // console.log(
636- // "π : file: main.js:783 : main : initialReq:",
637- // initialReq
638- // );
635+ console . log (
636+ "π : file: main.js:783 : main : initialReq:" ,
637+ initialReq
638+ ) ;
639639 let parameter_type = initialReq . contents . parameterType ;
640640 let contents_type = initialReq . contents . type ;
641641 let contents = initialReq . contents ;
@@ -697,7 +697,7 @@ function createWindow() {
697697 } else if ( contents_type == "NODE" ) {
698698 let node_description = initialReq . contents . description ;
699699 let getDir = await ( await eGet . getDirectory ( initialReq ) ) . response ;
700- // console.log("π : file: main.js:864 : main : getDir:", getDir);
700+ console . log ( "π : file: main.js:864 : main : getDir:" , getDir ) ;
701701 nodeChildren = Object . keys ( initialReq . children ) ;
702702 for ( i = 0 ; i < nodeChildren . length ; i ++ ) {
703703 newreq = await eGet . getElementByPath (
@@ -980,7 +980,7 @@ function createWindow() {
980980 win . webContents . send ( "noError" , myRow ) ;
981981 } catch ( error ) {
982982 msg = error . message ;
983- // console.log("π : file: main.js:1058 : main : msg:", msg);
983+ console . log ( "π : file: main.js:1058 : main : msg:" , msg ) ;
984984 win . webContents . send ( "loginfo" , msg ) ;
985985 }
986986 }
@@ -1142,27 +1142,53 @@ function createWindow() {
11421142 try {
11431143 let getDirResponse = await getDir . response ;
11441144 } catch ( error ) {
1145- // console.log("π : file: main.js:1183 : == : error:", error)
1145+ console . log ( "π : file: main.js:1183 : == : error:" , error ) ;
11461146 }
11471147 let nodeChildren = Object . keys ( expandReq . children ) ;
1148- // console.log("π : file: main.js:1187 : == : nodeChildren:", nodeChildren)
1148+ console . log (
1149+ "π : file: main.js:1187 : == : nodeChildren:" ,
1150+ nodeChildren
1151+ ) ;
1152+
11491153 for ( i = 0 ; i < nodeChildren . length ; i ++ ) {
1150- let newChild = await eGet . getElementByPath (
1151- parentPath + "." + nodeChildren [ i ]
1154+ let numb_of_child = nodeChildren [ i ] ;
1155+ console . log (
1156+ "π : file: main.js:1154 : == : ipcMain.on : numb_of_child:" ,
1157+ numb_of_child
1158+ ) ;
1159+ let path_of_child =
1160+ parentPath . toString ( ) + "." + numb_of_child . toString ( ) ;
1161+ console . log (
1162+ "π : file: main.js:1154 : == : ipcMain.on : path_of_child:" ,
1163+ path_of_child
11521164 ) ;
1165+ let newChild = await eGet . getElementByPath ( path_of_child ) ;
11531166 console . log (
11541167 "π : file: main.js:1113 : == : ipcMain.on : newChild:" ,
11551168 newChild
11561169 ) ;
11571170 contents = newChild . contents ;
1158- // console.log("π : file: main.js:1193 : == : newChild.contents:", newChild.contents)
1171+ console . log (
1172+ "π : file: main.js:1193 : == : newChild.contents:" ,
1173+ newChild . contents
1174+ ) ;
11591175 number = newChild . number ;
1160- parentPath = newChild . parent . path ;
1161- // console.log("π : file: main.js:1195 : == : newChild.number:", newChild.number)
1176+ if ( newChild . parent . path ) {
1177+ parentPath = newChild . parent . path ;
1178+ } else if ( newChild . parent . number ) {
1179+ parentPath = newChild . parent . number . toString ( ) ;
1180+ }
1181+ console . log (
1182+ "π : file: main.js:1195 : == : newChild.number:" ,
1183+ newChild . number
1184+ ) ;
11621185 base_path = { contents, number, parentPath } ;
11631186 childrenArray . push ( base_path ) ;
11641187 }
1165- // console.log("π : file: main.js:1204 : == : childrenArray:", childrenArray)
1188+ console . log (
1189+ "π : file: main.js:1204 : == : childrenArray:" ,
1190+ childrenArray
1191+ ) ;
11661192 win . webContents . send ( "expandedNode" , parentPath , childrenArray ) ;
11671193 win . webContents . send ( "expandedElement" , expandReq , false ) ;
11681194 } else if ( currOpt_class == "MATRIX" ) {
@@ -1191,7 +1217,7 @@ function createWindow() {
11911217 } ) ;
11921218 } catch ( error ) {
11931219 msg = error . message ;
1194- // console.log("π : file: main.js:1423 : main : msg:", msg);
1220+ console . log ( "π : file: main.js:1423 : main : msg:" , msg ) ;
11951221 throw Error ( error ) ;
11961222 }
11971223 }
0 commit comments