Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Contributed examples do not display in the Examples window #3420

Closed
joelmoniz opened this issue Jun 22, 2015 · 9 comments
Closed

Contributed examples do not display in the Examples window #3420

joelmoniz opened this issue Jun 22, 2015 · 9 comments
Assignees

Comments

@joelmoniz
Copy link
Member

@joelmoniz joelmoniz commented Jun 22, 2015

At present, contributed examples do not seem to be displaying in the Examples window:

image

@benfry
Copy link
Member

@benfry benfry commented Jun 22, 2015

And you're sure about this—are there any legitimate examples packages to even test against?

@joelmoniz
Copy link
Member Author

@joelmoniz joelmoniz commented Jun 22, 2015

Yeah. When I was testing out the Examples Manager for bugs, I'd created an examples package here that consisted of code stolen, ummm... I mean borrowed, from the G4P library. It even contains a fake contributions.txt that I used to use to ensure that the Examples Manager unpacked, installed, displayed, updated downloaded examples properly. This package does not display. I traced this to the removal of a method when the Examples window was being redesigned, that I'd initially added in to display the contributed examples in this window.

@shiffman
Copy link
Member

@shiffman shiffman commented Jul 24, 2015

I'm re-opening this issue. In 0239, I have the nature of code examples package installed, but I do not see them in the examples window. The files are in the examples folder inside my sketchbook.

screen shot 2015-07-24 at 2 00 47 pm

@shiffman shiffman reopened this Jul 24, 2015
@joelmoniz
Copy link
Member Author

@joelmoniz joelmoniz commented Jul 24, 2015

I can confirm that the error isn't fixed yet. 2 changes will need to be made:

  1. The default value for modes is set to "null" if the field isn't present in the examples.properties file. The problem is, "null" is read as a string, not as null. @prisonerjohn could you please change this so that either nothing is added if the modes property is absent, or the modes property is written like the paragraph property (modes=) if nothing is specified in the properties file?
  2. In case nothing is added, then this issue should be fixed. Otherwise, in case it is written in the form modes=, I'll file a PR if it is preferable to write the default as modes= as soon as the changes are made.
@scotthmurray
Copy link
Member

@scotthmurray scotthmurray commented Jul 24, 2015

Thanks @shiffman and @joelmoniz. @Akarshit can you look into this as well?

@Akarshit
Copy link
Member

@Akarshit Akarshit commented Jul 24, 2015

Ya sure, but i think first @prisonerjohn should take a look into what @joelmoniz has suggested.

@prisonerjohn
Copy link
Member

@prisonerjohn prisonerjohn commented Jul 24, 2015

@joelmoniz What exactly do you mean when you say "nothing is added if the modes property is absent"? Where is something added that shouldn't be added?

FWIW, paragraph= is not added by default when the key is not present. I think we're seeing it often because it's part of the template and example .properties files.

@joelmoniz
Copy link
Member Author

@joelmoniz joelmoniz commented Jul 24, 2015

@prisonerjohn Oops. Sorry. My bad.This issue arises because the Contributions Manager adds in the extra line here without a null check.

@benfry
Copy link
Member

@benfry benfry commented Aug 9, 2015

Fixed this for 3.0 beta 2.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

6 participants
You can’t perform that action at this time.