Skip to content

Commit

Permalink
little inspector fix
Browse files Browse the repository at this point in the history
SQUASHED: AUTO-COMMIT-demos-aexp.js,AUTO-COMMIT-src-client-lively.js,AUTO-COMMIT-src-components-tools-lively-inspector.js,
  • Loading branch information
JensLincke committed Nov 20, 2023
1 parent 5b4d9ed commit 48a20f1
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 18 deletions.
1 change: 0 additions & 1 deletion demos/aexp.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ function observeO(object) {
observeO(o)



o.bar = 4


Expand Down
30 changes: 15 additions & 15 deletions src/client/lively.js
Original file line number Diff line number Diff line change
Expand Up @@ -2074,22 +2074,22 @@ export default class Lively {
if (self.lively4isLoading) return // no recompile needed

// #TODO renable retranslation of modules when ae is enabled....
// const brokenModules = ["Connection.js", "triples.js", "knot-view.js"]
// const activeAEModules = Object.values(System.getRegistry()).filter((o) => {
// try{
// return o.metadata.pluginLoad.metadata.enable === "aexpr" && ! brokenModules.some(m => o.key.includes(m));
// } catch (e) {
// return false;
// }
// });
// for(const module of activeAEModules) {
// await lively.unloadModule(module.key);
// }
// for(const module of activeAEModules) {
// await lively.reloadModule(module.key, true, true);
// }
// const brokenModules = ["Connection.js", "triples.js", "knot-view.js"]
// const activeAEModules = Object.values(System.loads).filter((o) => {
// try{
// return o.metadata.pluginLoad.metadata.enable === "aexpr" && ! brokenModules.some(m => o.key.includes(m));
// } catch (e) {
// return false;
// }
// });
// for(const module of activeAEModules) {
// await lively.unloadModule(module.key);
// }
// for(const module of activeAEModules) {
// await lively.reloadModule(module.key, true, true);
// }

// lively.notify("Changed AE debugging: " + debuggingEnabled);
// lively.notify("Changed AE debugging: " + debuggingEnabled);
}

static async onBodyScrollPreference(pos) {
Expand Down
9 changes: 7 additions & 2 deletions src/components/tools/lively-inspector.js
Original file line number Diff line number Diff line change
Expand Up @@ -170,8 +170,13 @@ export default class Inspector extends Morph {
}

displayObject(obj, expand, name) {
if (!(obj instanceof Object)) {
return this.displayValue(obj, expand, name); // even when displaying objects.
if (!(obj instanceof Object)) {

try {
return this.displayValue(obj, expand, name); // even when displaying objects.
} catch(e) {
return this.displayValue("ERROR" + e, false, name); // even when displaying objects.
}
}
// if ((obj instanceof Function)) {
// return this.displayFunction(obj, expand, name); // even when displaying objects.
Expand Down

0 comments on commit 48a20f1

Please sign in to comment.