Suggestion: A button for refreshing addons (directory listing)
Suggestion: A button for refreshing addons (directory listing) without reopening projectGenerator Thanks!
Hey, thanks for the suggestion. This feature used to be there but it seems like it got stripped out. (see #60 ) We've also some discussions about a folder watcher which would automatically refresh it, maybe that's why it got stripped out.
edit: it's still there but the CSS is set to display:none;. I guess we left it out so the GUI is simpler, later on we'll watch the addons folder.
As a workaround for now, you can click the gear for the settings tab, click inside the text input for the OF path, and then click back to the create/update tab. Kind of cumbersome, but slightly less so than restarting the app :sweat_smile:
Indeed it works thank you :)
Hey @dimitre, I actually ran into this myself today. It looks like the fix @Daandelange mentioned actually has been incorporated. Are you using the pg from 0.9.0 or github? My guess would be the fix happened after 0.9.0 was released?
Here's what I see after cloning an addon:

And then after clicking the rescan button, it picks it up correctly:

Thanks for pointing that out! We worked on so many alternatives, it's hard to remind what we kept.
So this dialog pops up when you have a missing addon for an existing project (imported), but it only appears when a project contains an addon you don't have.
You cannot enter an empty addon to make the rescan dialog appear, so this issue is about improving this:
- either the folder watch solution
- or allow entering a missing addon so the rescan message appears
I remember Kyle or Zach saying the watchfolder solution is better for keeping the gui simple & clean.
For the reference, here's the original discussion about this: https://github.com/ofZach/pgElectron/issues/12
I've been working on the addons folder watcher. Finally, if it works, no external module is needed.
It would be nice if somebody could test this on Linux and Windows because the documentation states:
The fs.watch API is not 100% consistent across platforms, and is unavailable in some situations.
Shall I PR anyways ?
Hey @Daandelange, this looks nice! I'm seeing a bit of weird behavior though. The file watcher is logging updates to the console immediately, but I only see the gui contents change under specific situations:
- I have to click into either the project name or project path fields. If I click a different field, or click on the background so no field has focus, nothing happens
- With the cursor in the project name or path field, the update only happens once I defocus the window (which means I have bring the pg to the front first, then switch to a different app).
So the watcher part looks like it's working fine, but maybe some other call needs to happen? I tested this on OS X 10.11.2 with node 0.10, 0.12, and 5.3
(sorry for the crappy 8 bit gif color..trying to figure out a better work flow for screencast gifs!)
Hey Matt, thanks for your feedback and your gifs are awesome! :) It indeed needed an extra callback, it should work fine now. https://github.com/Daandelange/projectGenerator/commit/b72126e72f01f8a3f50a4c1a2b0f07764f5b402d
This is solved in v67 - Refresh button in Settings -
- Click ofPath (Refresh) rmaybe better name but this will refresh the addon list
- It will auto refresh ofPath retrieved from the CMD C++