Uh oh!
There was an error while loading. Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork 435
Developer guide: a chapter that was never in the book, and the gates that would have said so#5664
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
Merged
Uh oh!
There was an error while loading. Please reload this page.
Merged
Changes from all commits
Commits
Show all changes
21 commits
Select commit
Hold shift + click to select a range
95d49c4
A chapter that was never in the book, and three gates that would have…
shai-almog 40f7eb0
Derive the site's routes instead of guessing them from filenames
shai-almog 7b98f52
Stop inviting contributions the project no longer accepts
shai-almog 5f3841d
Make the ratchets actually ratchet, and honour wildcard redirects
shai-almog 5dbf826
A redirect destination is not proof that a page exists
shai-almog 9275dec
A directory of assets is not a route, and localhost does not do TLS
shai-almog 43ebb5a
Follow a wildcard redirect to its destination instead of trusting the…
shai-almog 0f9a449
Follow literal redirects too, not just wildcard ones
shai-almog 5025f92
Hold manifest entries to chapter level, not just away from part level
shai-almog 2135841
Compute a manifest entry's effective level instead of exempting offsets
shai-almog b1ec175
Count occurrences, because a file can be wrong about the same thing t…
shai-almog 0e5eda9
Scan container blocks; only literal content is not prose
shai-almog 1f7e69d
Nine of the holes were not holes, and the guide's own routes are enum…
shai-almog 89904a2
Reject a document included twice
shai-almog 5dfb50e
Scope the duplicate-include rule to unconditional manifest entries
shai-almog 7b2b618
A list item is prose, and a conditional entry is still a chapter
shai-almog e7f885e
Accept TOML alias arrays, and do not demand both branches of a condit…
shai-almog 6364bb4
Move the guard scripts to their own change
shai-almog 945164f
Finish the video capture constraints chapter before publishing it
shai-almog e113f04
The JavaScript port honoured a quality request and then reported it u…
shai-almog e68153f
Two support predicates answered before resolving the constraint
shai-almog File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Uh oh!
There was an error while loading. Please reload this page.
Jump to
Jump to file
Failed to load files.
Loading
Uh oh!
There was an error while loading. Please reload this page.
Diff view
Diff view
There are no files selected for viewing
9 changes: 9 additions & 0 deletions
9 CodenameOne/src/com/codename1/capture/VideoCaptureConstraints.java
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
18 changes: 17 additions & 1 deletion
18 ...ort/src/main/java/com/codename1/impl/html5/videojs/JSVideoCaptureConstraintsCompiler.java
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
42 changes: 32 additions & 10 deletions
42 ...va/com/codenameone/developerguide/snippets/generated/ComponentSelectorJava001Snippet.java
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
104 changes: 104 additions & 0 deletions
104 ...va/com/codenameone/developerguide/snippets/generated/ComponentSelectorJava007Snippet.java
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,104 @@ | ||
| /* | ||
| * Copyright (c) 2026, Codename One and/or its affiliates. All rights reserved. | ||
| * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. | ||
| * This code is free software; you can redistribute it and/or modify it | ||
| * under the terms of the GNU General Public License version 2 only, as | ||
| * published by the Free Software Foundation. Codename One designates this | ||
| * particular file as subject to the "Classpath" exception as provided | ||
| * by Oracle in the LICENSE file that accompanied this code. | ||
| * | ||
| * This code is distributed in the hope that it will be useful, but WITHOUT | ||
| * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | ||
| * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License | ||
| * version 2 for more details (a copy is included in the LICENSE file that | ||
| * accompanied this code). | ||
| * | ||
| * You should have received a copy of the GNU General Public License version | ||
| * 2 along with this work; if not, write to the Free Software Foundation, | ||
| * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. | ||
| * | ||
| * Please contact Codename One through http://www.codenameone.com/ if you | ||
| * need additional information or have any questions. | ||
| */ | ||
| package com.codenameone.developerguide.snippets.generated; | ||
| import com.codename1.gpu.*; | ||
| import com.codename1.ui.*; | ||
| import com.codename1.ui.animations.*; | ||
| import com.codename1.ui.events.*; | ||
| import com.codename1.ui.geom.*; | ||
| import com.codename1.ui.layouts.*; | ||
| import com.codename1.ui.list.*; | ||
| import com.codename1.ui.plaf.*; | ||
| import com.codename1.ui.util.*; | ||
| import com.codename1.components.*; | ||
| import com.codename1.charts.models.*; | ||
| import com.codename1.charts.renderers.*; | ||
| import com.codename1.charts.views.*; | ||
| import com.codename1.capture.*; | ||
| import com.codename1.io.*; | ||
| import com.codename1.l10n.*; | ||
| import com.codename1.location.*; | ||
| import com.codename1.maps.*; | ||
| import com.codename1.media.*; | ||
| import com.codename1.messaging.*; | ||
| import com.codename1.payment.*; | ||
| import com.codename1.processing.*; | ||
| import com.codename1.properties.*; | ||
| import com.codename1.push.*; | ||
| import com.codename1.security.*; | ||
| import com.codename1.social.*; | ||
| import com.codename1.ui.spinner.*; | ||
| import java.io.*; | ||
| import java.util.*; | ||
| import static com.codename1.ui.ComponentSelector.$; | ||
| class ComponentSelectorJava007Snippet { | ||
| Object context; | ||
| Object url; | ||
| Object value; | ||
| Object body; | ||
| Object event; | ||
| String apiKey = "test-key"; | ||
| String myHttpsURL = "https://example.com"; | ||
| java.util.List<String> validKeysList = new java.util.ArrayList<>(); | ||
| Image myImage; | ||
| Graphics graphics; | ||
| Graphics g; | ||
| GraphicsDevice device; | ||
| Form form; | ||
| Form hi; | ||
| Container cnt; | ||
| Container myForm; | ||
| Component component; | ||
| Button button; | ||
| MultiButton myMultiButton; | ||
| Label label; | ||
| BrowserComponent browserComponent; | ||
| Resources theme; | ||
| void snippet() throws Exception { | ||
| // tag::component-selector-java-007[] | ||
| Button replace = $(new Button("Replace Fade/Slide")) | ||
| .setIcon(FontImage.MATERIAL_REDEEM) | ||
| .addActionListener(e->{ | ||
| $(e).getParent() | ||
| .find(">*") // <1> | ||
| .replaceAndWait(c->{ // <2> | ||
| return $(new Label("Replacement")) // <3> | ||
| .putClientProperty("origComponent", c) // <4> | ||
| .asComponent(); | ||
| }, CommonTransitions.createFade(1000)) // <5> | ||
| .replaceAndWait(c->{ | ||
| Component orig = (Component)c.getClientProperty("origComponent"); | ||
| if (orig != null) { | ||
| c.putClientProperty("origComponent", null); | ||
| return orig; // <6> | ||
| } | ||
| return c; | ||
| }, CommonTransitions.createCover(CommonTransitions.SLIDE_HORIZONTAL, false, 1000)); // <7> | ||
| }) | ||
| .asComponent(Button.class); | ||
| // end::component-selector-java-007[] | ||
| } | ||
| } |
90 changes: 90 additions & 0 deletions
90 .../codenameone/developerguide/snippets/generated/VideoCaptureConstraintsJava001Snippet.java
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,90 @@ | ||
| /* | ||
| * Copyright (c) 2026, Codename One and/or its affiliates. All rights reserved. | ||
| * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. | ||
| * This code is free software; you can redistribute it and/or modify it | ||
| * under the terms of the GNU General Public License version 2 only, as | ||
| * published by the Free Software Foundation. Codename One designates this | ||
| * particular file as subject to the "Classpath" exception as provided | ||
| * by Oracle in the LICENSE file that accompanied this code. | ||
| * | ||
| * This code is distributed in the hope that it will be useful, but WITHOUT | ||
| * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | ||
| * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License | ||
| * version 2 for more details (a copy is included in the LICENSE file that | ||
| * accompanied this code). | ||
| * | ||
| * You should have received a copy of the GNU General Public License version | ||
| * 2 along with this work; if not, write to the Free Software Foundation, | ||
| * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. | ||
| * | ||
| * Please contact Codename One through http://www.codenameone.com/ if you | ||
| * need additional information or have any questions. | ||
| */ | ||
| package com.codenameone.developerguide.snippets.generated; | ||
| import com.codename1.gpu.*; | ||
| import com.codename1.ui.*; | ||
| import com.codename1.ui.animations.*; | ||
| import com.codename1.ui.events.*; | ||
| import com.codename1.ui.geom.*; | ||
| import com.codename1.ui.layouts.*; | ||
| import com.codename1.ui.list.*; | ||
| import com.codename1.ui.plaf.*; | ||
| import com.codename1.ui.util.*; | ||
| import com.codename1.components.*; | ||
| import com.codename1.charts.models.*; | ||
| import com.codename1.charts.renderers.*; | ||
| import com.codename1.charts.views.*; | ||
| import com.codename1.capture.*; | ||
| import com.codename1.io.*; | ||
| import com.codename1.l10n.*; | ||
| import com.codename1.location.*; | ||
| import com.codename1.maps.*; | ||
| import com.codename1.media.*; | ||
| import com.codename1.messaging.*; | ||
| import com.codename1.payment.*; | ||
| import com.codename1.processing.*; | ||
| import com.codename1.properties.*; | ||
| import com.codename1.push.*; | ||
| import com.codename1.security.*; | ||
| import com.codename1.social.*; | ||
| import com.codename1.ui.spinner.*; | ||
| import java.io.*; | ||
| import java.util.*; | ||
| class VideoCaptureConstraintsJava001Snippet { | ||
| Object context; | ||
| Object url; | ||
| Object value; | ||
| Object body; | ||
| Object event; | ||
| String apiKey = "test-key"; | ||
| String myHttpsURL = "https://example.com"; | ||
| java.util.List<String> validKeysList = new java.util.ArrayList<>(); | ||
| Image myImage; | ||
| Graphics graphics; | ||
| Graphics g; | ||
| GraphicsDevice device; | ||
| Form form; | ||
| Form hi; | ||
| Container cnt; | ||
| Container myForm; | ||
| Component component; | ||
| Button button; | ||
| MultiButton myMultiButton; | ||
| Label label; | ||
| BrowserComponent browserComponent; | ||
| Resources theme; | ||
| void snippet() throws Exception { | ||
| // tag::video-capture-constraints-java-001[] | ||
| // The original wrote "new VideoCaptureConstraint()" -- a class that does | ||
| // not exist. Corrected while restoring it: a snippet that cannot compile is | ||
| // worse than no snippet. | ||
| VideoCaptureConstraints cnst = new VideoCaptureConstraints() | ||
| .preferredQuality(VideoCaptureConstraints.QUALITY_LOW) | ||
| .preferredMaxLength(5); | ||
| // end::video-capture-constraints-java-001[] | ||
| } | ||
| } |
87 changes: 87 additions & 0 deletions
87 .../codenameone/developerguide/snippets/generated/VideoCaptureConstraintsJava002Snippet.java
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,87 @@ | ||
| /* | ||
| * Copyright (c) 2026, Codename One and/or its affiliates. All rights reserved. | ||
| * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. | ||
| * This code is free software; you can redistribute it and/or modify it | ||
| * under the terms of the GNU General Public License version 2 only, as | ||
| * published by the Free Software Foundation. Codename One designates this | ||
| * particular file as subject to the "Classpath" exception as provided | ||
| * by Oracle in the LICENSE file that accompanied this code. | ||
| * | ||
| * This code is distributed in the hope that it will be useful, but WITHOUT | ||
| * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | ||
| * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License | ||
| * version 2 for more details (a copy is included in the LICENSE file that | ||
| * accompanied this code). | ||
| * | ||
| * You should have received a copy of the GNU General Public License version | ||
| * 2 along with this work; if not, write to the Free Software Foundation, | ||
| * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. | ||
| * | ||
| * Please contact Codename One through http://www.codenameone.com/ if you | ||
| * need additional information or have any questions. | ||
| */ | ||
| package com.codenameone.developerguide.snippets.generated; | ||
| import com.codename1.gpu.*; | ||
| import com.codename1.ui.*; | ||
| import com.codename1.ui.animations.*; | ||
| import com.codename1.ui.events.*; | ||
| import com.codename1.ui.geom.*; | ||
| import com.codename1.ui.layouts.*; | ||
| import com.codename1.ui.list.*; | ||
| import com.codename1.ui.plaf.*; | ||
| import com.codename1.ui.util.*; | ||
| import com.codename1.components.*; | ||
| import com.codename1.charts.models.*; | ||
| import com.codename1.charts.renderers.*; | ||
| import com.codename1.charts.views.*; | ||
| import com.codename1.capture.*; | ||
| import com.codename1.io.*; | ||
| import com.codename1.l10n.*; | ||
| import com.codename1.location.*; | ||
| import com.codename1.maps.*; | ||
| import com.codename1.media.*; | ||
| import com.codename1.messaging.*; | ||
| import com.codename1.payment.*; | ||
| import com.codename1.processing.*; | ||
| import com.codename1.properties.*; | ||
| import com.codename1.push.*; | ||
| import com.codename1.security.*; | ||
| import com.codename1.social.*; | ||
| import com.codename1.ui.spinner.*; | ||
| import java.io.*; | ||
| import java.util.*; | ||
| class VideoCaptureConstraintsJava002Snippet { | ||
| Object context; | ||
| Object url; | ||
| Object value; | ||
| Object body; | ||
| Object event; | ||
| String apiKey = "test-key"; | ||
| String myHttpsURL = "https://example.com"; | ||
| java.util.List<String> validKeysList = new java.util.ArrayList<>(); | ||
| Image myImage; | ||
| Graphics graphics; | ||
| Graphics g; | ||
| GraphicsDevice device; | ||
| Form form; | ||
| Form hi; | ||
| Container cnt; | ||
| Container myForm; | ||
| Component component; | ||
| Button button; | ||
| MultiButton myMultiButton; | ||
| Label label; | ||
| BrowserComponent browserComponent; | ||
| Resources theme; | ||
| VideoCaptureConstraints cnst; | ||
| void snippet() throws Exception { | ||
| // tag::video-capture-constraints-java-002[] | ||
| String videoPath = Capture.captureVideo(cnst); | ||
| // end::video-capture-constraints-java-002[] | ||
| } | ||
| } |
Oops, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Oops, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.