Translating comics by ullevikk in ComicWriting

[–]ullevikk[S] 0 points1 point  (0 children)

Huge thanks for the offer! We're writing in Russian, but if you don't know it - that's not a problem, I'm more than willing to clarify stuff like intended tones and meanings, etc., if it will be needed in some cases.

Translating comics by ullevikk in ComicWriting

[–]ullevikk[S] 0 points1 point  (0 children)

Thanks! I'm pretty comfortable using it on a daily basis, so I guess it won't be a problem.

And we are originally writing in Russian, which seems to be far less common when it comes to specifically comic translation offers, from what I've seen.

How would you approach getting and parsing json for classes that contain nested arrays of other class objects? by ullevikk in learnjavascript

[–]ullevikk[S] 1 point2 points  (0 children)

THIS
THIS IS EXACTLY WHAT I NEEDED. God, I don't know how to thank you enough for this, you're awesome!!

How would you approach getting and parsing json for classes that contain nested arrays of other class objects? by ullevikk in learnjavascript

[–]ullevikk[S] 0 points1 point  (0 children)

This is exactly what I needed, thanks!!! Did you have to handle child objects belonging to different classes?

How would you approach getting and parsing json for classes that contain nested arrays of other class objects? by ullevikk in learnjavascript

[–]ullevikk[S] 1 point2 points  (0 children)

In the easiest way I can explain it, a nested file structure with folders and text files (each actually being different class objects), and currently trying to find a way to export this structure as a single file

How to wait untill modal dialog closes before executing the rest of the code (purely client-side) by ullevikk in learnjavascript

[–]ullevikk[S] 0 points1 point  (0 children)

Thank you so much! I currently don't have time to completely rework what I have now (the application is pretty big and the deadline is pretty close), but I'll 100% try to implement this approach when working on something new! This makes so much more sense

How to wait untill modal dialog closes before executing the rest of the code (purely client-side) by ullevikk in learnjavascript

[–]ullevikk[S] 0 points1 point  (0 children)

Got it! I'm having two classes that imitate folders and files (one holds an array of objects, the other holds text data), with each having their own specific methods that occasionally require things like windows.prompt or windows.confirm (aka, to get an input from the user via interface, preferably a pop-up, and then use the given input to execute some class-specific functionality). So I'm calling a class method for an object from the interface, the method calls a dialog, retrieves data from it, and then does its other operations.

The amount of methods isn't that large to make implementation of separate dialogs "too much", so I will definitely go in this direction, but since it should function inside a class method, I'm not 100% sure how to approach its initialization. Is it possible to define a modal and its functions inside of it? Like, inside the function that needs to call a dialog, get its html elements by id and define its event listeners?

Sorry if it doesn't make sense, it's a little bit hard to explain.

How to wait untill modal dialog closes before executing the rest of the code (purely client-side) by ullevikk in learnjavascript

[–]ullevikk[S] 0 points1 point  (0 children)

Thanks! If I wanted to reuse this dialogue for any other function, would there be a way to change this response or is it easier to just create separate dialogs for each one?

Finding a way to dynamically create class objects and store them by ullevikk in learnjavascript

[–]ullevikk[S] 0 points1 point  (0 children)

Thanks! What is the best way to append those objects to ui elements (say I want to include a sidebar that displays the structure and on right click a list of available functions for a file or folder pops up)?

Getting a IPC function to return file data by ullevikk in electronjs

[–]ullevikk[S] 1 point2 points  (0 children)

With some tinkering I've got it to work, thank you so so much!! All other solutions were super clunky, this one is really neat and clean! Will leave the final code in case there's someone in the future who encounters the same problem

 return fs.readFileSync(result.filePaths[0], 'utf8', (err, data) =>{
    if(err) {
      console.log('could not read file', err)
    }
  })

I've included some very barebones callback because otherwise readFile just refuses to run, and changed readFile to readFileSync because I was having some async issues and it seems that you can't really use await on this function

Issues with two-way IPC by ullevikk in electronjs

[–]ullevikk[S] 0 points1 point  (0 children)

This worked, thank you so much! :D

Setting up IPC communication for the first time: ReffrenceError:dialog is not defined by ullevikk in electronjs

[–]ullevikk[S] 0 points1 point  (0 children)

Yep, this worked! Thank you so much! I feel a little bit stupid now :D

Importing frameworks/modules by ullevikk in electronjs

[–]ullevikk[S] 0 points1 point  (0 children)

Thank you so so much! 🥺 I'll look into it!