Skip to content

Commit ceabb30

Browse files
authored
Merge pull request #25 from dewiweb/develop
Develop
2 parents 0dc2852 + d84d4ce commit ceabb30

6 files changed

Lines changed: 486 additions & 182 deletions

File tree

β€ŽCHANGELOG.mdβ€Ž

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,20 @@
22

33
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
44

5+
## [2.2.0-alpha.10](https://github.com/dewiweb/MCxOSCnext/compare/v2.2.0-alpha.9...v2.2.0-alpha.10) (2023-04-25)
6+
7+
8+
### Features
9+
10+
* :sparkles: first step for functions ([a0a9c71](https://github.com/dewiweb/MCxOSCnext/commit/a0a9c713d7d5e65ad7facfd170ae258aa6886b35))
11+
* :sparkles: matrix setconnection ([a5f7a0f](https://github.com/dewiweb/MCxOSCnext/commit/a5f7a0ff6b083e6ec33b5718a95ef19d1ad22ab5))
12+
* :tada: matrix view ([198cf34](https://github.com/dewiweb/MCxOSCnext/commit/198cf34358c41dac312c123f16b3d4aa327ffd93))
13+
14+
15+
### Bug Fixes
16+
17+
* :bug: riedel vs lawo / parent.number vs parent.path ([2c3c56a](https://github.com/dewiweb/MCxOSCnext/commit/2c3c56a4f38e0009f9ebd70b426f6501966757b9))
18+
519
## [2.2.0-alpha.9](https://github.com/dewiweb/MCxOSCnext/compare/v2.2.0-alpha.8...v2.2.0-alpha.9) (2023-04-22)
620

721

β€Žpackage.jsonβ€Ž

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "mcxoscnext",
33
"productName": "mcxoscnext",
4-
"version": "2.2.0-alpha.9",
4+
"version": "2.2.0-alpha.10",
55
"description": "A bridge between emberplus and OSC protocols",
66
"main": "src/main.js",
77
"scripts": {

β€Žsrc/index.htmlβ€Ž

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,19 @@
132132
</div>
133133
<div id="CS_content">
134134
<div id="tree"></div>
135-
<br />
135+
<div
136+
id="central_view"
137+
style="
138+
top: 10px;
139+
font-size: x-small;
140+
overflow: auto;
141+
margin: auto;
142+
max-height: 230px;
143+
max-width: 95%;
144+
visibility: hidden;
145+
width: 0%;
146+
"
147+
></div>
136148
<div id="test">
137149
<pre
138150
id="expandedElement"

β€Žsrc/main.jsβ€Ž

Lines changed: 74 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ function createWindow() {
6666
win.setMenu(null);
6767
win.loadFile("src/index.html");
6868
win.on("ready-to-show", () => {
69-
// win.webContents.openDevTools({ mode: "detach" });
69+
win.webContents.openDevTools({ mode: "detach" });
7070
win.webContents.send("ready");
7171
});
7272
ipcMain.on("sendAutoSave", function (event, content) {
@@ -716,6 +716,25 @@ function createWindow() {
716716
win.webContents.send("errorOnEditedPath", myRow);
717717
} else if (contents_type == "FUNCTION") {
718718
let fct_description = initialReq.contents.description;
719+
if (!initialReq.contents.args) {
720+
let function_cb = await (
721+
await eGet.invoke(initialReq)
722+
).response;
723+
// console.log(
724+
// "πŸš€ : file: main.js:727 : main : function_cb.result[0]:",
725+
// function_cb
726+
// );
727+
win.webContents.send(
728+
"loginfo",
729+
"πŸš€ : file: main.js:724 : main : function_cb:" +
730+
JSON.stringify(function_cb.result)
731+
);
732+
} else {
733+
// console.log(
734+
// "πŸš€ : file: main.js:720 : main : initialReq.contents.args:",
735+
// initialReq.contents.args
736+
// );
737+
}
719738
win.webContents.send(
720739
"loginfo",
721740
"WARNING! : You're trying to connect to a FUNCTION ( " +
@@ -967,6 +986,15 @@ function createWindow() {
967986
}
968987
);
969988

989+
ipcMain.on("mtx_connect", async (event, mtx_path, check_t, check_s) => {
990+
// console.log(
991+
// "πŸš€ : file: main.js:990 : ipcMain.on : mtx_path:",
992+
// mtx_path
993+
// );
994+
let mtx = await eGet.getElementByPath(mtx_path);
995+
await eGet.matrixSetConnection(mtx, check_t, check_s);
996+
});
997+
970998
ipcMain.on(
971999
"deleteConnection",
9721000
async (event, ePath, oAddr, myRow, eVarType, sFactor) => {
@@ -1101,40 +1129,66 @@ function createWindow() {
11011129
);
11021130

11031131
ipcMain.on("expandNode", async (event, parentPath, currOpt_class) => {
1104-
console.log("πŸš€ : file: main.js:1173 : parentPath,:", parentPath);
1105-
console.log(
1106-
"πŸš€ : file: main.js:1173 : currOpt_class:",
1107-
currOpt_class
1108-
);
1132+
// console.log("πŸš€ : file: main.js:1173 : parentPath,:", parentPath);
1133+
// console.log(
1134+
// "πŸš€ : file: main.js:1173 : currOpt_class:",
1135+
// currOpt_class
1136+
// );
11091137
if (currOpt_class == "NODE") {
11101138
let childrenArray = [];
11111139
let expandReq = await eGet.getElementByPath(parentPath.toString());
1112-
console.log("πŸš€ : file: main.js:1178 : == : expandReq:", expandReq);
1140+
// console.log("πŸš€ : file: main.js:1178 : == : expandReq:", expandReq);
11131141
let getDir = await eGet.getDirectory(expandReq);
11141142
try {
11151143
let getDirResponse = await getDir.response;
11161144
} catch (error) {
1117-
// console.log("πŸš€ : file: main.js:1183 : == : error:", error)
1145+
// console.log("πŸš€ : file: main.js:1183 : == : error:", error);
11181146
}
11191147
let nodeChildren = Object.keys(expandReq.children);
1120-
// console.log("πŸš€ : file: main.js:1187 : == : nodeChildren:", nodeChildren)
1148+
// console.log(
1149+
// "πŸš€ : file: main.js:1187 : == : nodeChildren:",
1150+
// nodeChildren
1151+
// );
1152+
11211153
for (i = 0; i < nodeChildren.length; i++) {
1122-
let newChild = await eGet.getElementByPath(
1123-
parentPath + "." + nodeChildren[i]
1124-
);
1125-
console.log(
1126-
"πŸš€ : file: main.js:1113 : == : ipcMain.on : newChild:",
1127-
newChild
1128-
);
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
1164+
// );
1165+
let newChild = await eGet.getElementByPath(path_of_child);
1166+
// console.log(
1167+
// "πŸš€ : file: main.js:1113 : == : ipcMain.on : newChild:",
1168+
// newChild
1169+
// );
11291170
contents = newChild.contents;
1130-
// console.log("πŸš€ : file: main.js:1193 : == : newChild.contents:", newChild.contents)
1171+
// console.log(
1172+
// "πŸš€ : file: main.js:1193 : == : newChild.contents:",
1173+
// newChild.contents
1174+
// );
11311175
number = newChild.number;
1132-
parentPath = newChild.parent.path;
1133-
// 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+
// );
11341185
base_path = { contents, number, parentPath };
11351186
childrenArray.push(base_path);
11361187
}
1137-
// console.log("πŸš€ : file: main.js:1204 : == : childrenArray:", childrenArray)
1188+
// console.log(
1189+
// "πŸš€ : file: main.js:1204 : == : childrenArray:",
1190+
// childrenArray
1191+
// );
11381192
win.webContents.send("expandedNode", parentPath, childrenArray);
11391193
win.webContents.send("expandedElement", expandReq, false);
11401194
} else if (currOpt_class == "MATRIX") {

0 commit comments

Comments
Β (0)