Skip to content

Commit a6d602e

Browse files
committed
looking into why Python Mode for 3.x was loading
1 parent 71e31bc commit a6d602e

File tree

3 files changed

+12
-9
lines changed

3 files changed

+12
-9
lines changed

app/src/processing/app/Base.java

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -773,10 +773,8 @@ void rebuildContribModes() {
773773
contribModes = new ArrayList<>();
774774
}
775775
File modesFolder = getSketchbookModesFolder();
776-
List<ModeContribution> knownList = getContribModes();
777-
778776
Map<File, ModeContribution> known = new HashMap<>();
779-
for (ModeContribution contrib : knownList) {
777+
for (ModeContribution contrib : getContribModes()) {
780778
known.put(contrib.getFolder(), contrib);
781779
}
782780
File[] potential = ContributionType.MODE.listCandidates(modesFolder);

app/src/processing/app/contrib/ContributionType.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -136,6 +136,10 @@ public boolean isCandidate(File potential) {
136136

137137
/**
138138
* Whether this contrib is compatible with this revision of Processing.
139+
* Unfortunately, this requires the author to properly set this value.
140+
* For instance, with “Python Mode for Processing 3” the max revision
141+
* is set to 0 in mode.properties (meaning all newer Processing versions),
142+
* even though it properly maxes out with 3.x in contribs.txt.
139143
*/
140144
private boolean isCompatible(File contribFolder) {
141145
StringDict properties = loadProperties(contribFolder);

todo.txt

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -84,17 +84,17 @@ X updateDetail() call in StatusPanel.updateTheme()
8484
o move to ListPanel.updateTheme() (why wasn't it there?)
8585
X ugh, it's called twice, right nearby each other; yikes
8686
X fix the double call, but just need to get rid of progress bars anyway
87-
87+
X if Python Mode for 3.x is installed, it's allowed to be used and loaded
88+
o shouldn't be loading it on startup if it's not compatible
89+
o does this apply to other libraries as well?
90+
X added checks for compatibility to ContributionType.isCandidate()
91+
X but with Python Mode for 3.x, the problem is maxRevision is set to 0
92+
X filed an issue https://github.com/jdf/processing.py/issues/406
8893

8994
_ Update All with several entries is really locking things up
9095
_ not clear if it's work being done on the EDT
9196
_ or that all the threads are running immediately (rather than sequentially)
9297

93-
94-
_ if Python Mode for 3.x is installed, it's allowed to be used and loaded
95-
_ shouldn't be loading it on startup if it's not compatible
96-
_ does this apply to other libraries as well?
97-
9898
_ rip out JProgressBar from StatusPanel/StatusDetail
9999
_ show progress in the list instead
100100
_ also make possible to start install by clicking the list
@@ -109,6 +109,7 @@ _ (was this for the contrib listing? or an actual contrib?)
109109
_ Base.setUpdatesAvailable() is called from half a dozen places!?
110110
_ how to handle contrib manager download/retry/etc and showing progress
111111

112+
112113
_ make note in docs that .properties file *must* be utf-8 (usually iso8859-1)
113114
_ if not it'll make things gross (andre sier flob library)
114115

0 commit comments

Comments
 (0)