Add a cib-based application generated by capp gen as the foundation for a document-based test application and tutorial, MIT licensed.
* The application is a starting point for new applications, so a permissive license lets developers copy its code into their own work without obligations beyond keeping the notice.
* AppController.j, main.j, Jakefile, index.html, index-debug.html: Replace the template header with an MIT header naming the author as copyright holder.
* main.j: Correct the file name in the header.
* Info.plist, Jakefile: Replace the template author placeholder with the author.
* LICENSE: Add the MIT License text.
* Resources/MainMenu.xib, Resources/MainMenu.cib: Add the template main menu.
Executable.setCode failed when the compiler produced no code after a compile
error. This adopts that fix and the other general changes from the runtime
published to npm as @objj/runtime, without its Node-specific changes.
- CFDictionary.js: Add toJSObject, which returns the contents as a plain object
- Executable.js: Return early from setCode when no code was produced
- CPLog.js: Return early from CPLogPrint when CPLogDisable is set
- Bootstrap.js: Accept SourceMapIncludeSource in OBJJ_COMPILER_FLAGS
The source tree had no description of the frameworks package capp-build builds from its root.
* Info.plist: Declare the CPKG package with its runtime, member frameworks in build order, themes and version.
CPAlert's documentation described the return code as the button index, which is only its default tag.
* CPAlert: Document the alert return code as the clicked button's tag, which is its index unless changed.
CPScrollView's frame and content size calculations sized the vertical scroller with scrollerWidthForControlSize:, passing a scroller style, so it always took the legacy width.
* CPScrollView: Use scrollerWidthInStyle: for the vertical scroller in +contentSizeForFrameSize:… and +frameSizeForContentSize:….
* CPScrollViewTest: Add tests for both methods with a scroller whose widths differ by style.
CPDecimalAdd tested for underflow twice when reporting overflow of two negative operands, so the overflow was never swapped to underflow.
* CPDecimal: Swap CPCalculationOverflow to CPCalculationUnderflow for a negative result, matching CPDecimalSubtract.
* CPDecimalTest: Add a test that the overflow of two negative operands is reported as underflow.
Manual tests could only be provisioned with the legacy framework builds.
* Manual/Jakefile: Add configure-modern, which links every manual test's Frameworks and Frameworks/Debug to the capp-build package in Build/modern/Frameworks; share the provisioning with configure through provisionFrameworks.
Several functions and methods referenced identifiers that were never declared or defined.
* CGColor: Compare color spaces by identity in CGColorEqualToColor, replacing a call to the undefined CGColorSpaceEqualToColorSpace whose test was inverted.
* CGContextCanvas: Declare abs_cos and abs_sin in scale_rotate and rotate_scale.
* CGContextText: Call CGPointMakeZero in CGContextGetTextPosition instead of the removed _CGPointMakeZero.
* CPColor: Compare pattern orientation with CPColorPatternIsVertical instead of BlendKit's PatternIsVertical.
* CPMenu: Declare _CPMenuBarImage with the file's other menu bar variables.
* CPScrollView: Test horizontalScrollerClass and verticalScrollerClass in +frameSizeForContentSize:horizontalScrollerClass:verticalScrollerClass:borderType:controlSize:scrollerStyle: instead of the undefined hFlag and vFlag.
References to undeclared variables created implicit globals, and an Internet Explorer code path referenced the now unsupported ActiveXObject.
* CPDecimal: Declare adderror in CPDecimalAdd and error1 in _SimpleDivide and _SimpleMultiply.
* CPFunctionOperation: Declare functionOp in +functionOperationWithFunction:.
* CPRunLoop: Declare CPMainRunLoop at file level instead of creating it as an implicit global in +initialize.
* CPWebDAVManager: Remove the ActiveXObject path from XMLDocumentFromString.
- Add missing index-debug.html entry point to SmartFoldersDemo.
- Update Tests/Manual/Jakefile configure and clobber tasks to link Release and Debug framework variants (Objective-J, Foundation, AppKit, BlendKit) across all manual tests.
- Safeguard symlink replacement logic to correctly handle existing links while protecting physical asset directories.
CPDOMAvailable was read during load before it was assigned.
* CPCompatibility: Move the CPDOMAvailable assignment ahead of the engine detection, whose AppleWebKit case calls +[CPPlatform isBrowser], which reads it.
* CPCompatibilityTest: Add a test that re-executes CPCompatibility.j with an AppleWebKit user agent and CPDOMAvailable unset, failing on any exception.
Record that the standard key binding table is not platform-aware.
* CPKeyBinding: Add TODO noting that CPStandardKeyBindings applies macOS bindings on every platform.
The modifier-key conflicts on Windows and Linux are now documented at the source.
- the promotion commit captured the consumer imports and the test
update but missed the new source file itself and the deletion of
the force-included header it replaces
- without the .j, the display-server functions are absent from the
compiled frameworks; with the .h still present, the legacy build
force-includes the old macro definitions alongside the new
functions
- follow-up to the display-server promotion commit
- the 11 display-server primitives become plain functions in
Platform/DOM/CPDOMDisplayServer.j; bodies verbatim from the macro
definitions; the header was force-included into every AppKit
compilation by the legacy build and invisible to capp-build
- CPView.j, CPImageView.j, _CPDisplayServer.j import the new file;
this was the last header in either framework
- CPDOMDisplayServerTest: the raw #include replaced by the
framework-qualified import
- the six GET_LEVEL_INDICATOR_SEGMENT call sites become direct
layoutEphemeralSubviewNamed: messages; the macro was fully
parameterized with no ambient state
- the segment index is the literal 0 at every site, so the
concatenation folds to a constant string
- the warning comment about direct ephemeral-subview access is
retained
- the seven UIAssert call sites become direct
[self markTest:_cmd didPass:...] messages, matching the direct
calls already used elsewhere in the file
- the macro expanded to the same expression using the enclosing
method's _cmd, which the completion closures capture identically;
behavior unchanged
- the commented directive predated the isNumeric modernization that
replaced it with the CPIsNumeric() function
- cosmetic: with it gone, AppKit and Foundation sources contain no
preprocessor directive text of any kind, active or commented
- CoreGraphics/CGContextCanvas.j (635 lines) inlined into CGContext.j
at the former #include site inside the CPHTMLCanvasFeature branch
- the 11 one-line canvas delegation macros become plain functions;
their macro form was a 2008-era call-overhead optimization that
modern JITs make unnecessary
- the compatibility tables, hasPath path-semantics helper, backend
implementations and CGBitmapGraphicsContextCreate pass through
verbatim
- capp-build's compiled AppKit gains the canvas backend for the first
time: the deferred include previously omitted it entirely
- zero #define, #include or #pragma directives remain in AppKit or
Foundation sources
- CoreGraphics/CGContextVML.j removed; it implemented the CGContext
function family against Internet Explorer's VML, irrelevant in the
supported browser landscape for over a decade
- its self-replacing CGBitmapGraphicsContextCreate wrapper called
document.namespaces.add, an IE-only API — a latent crash on modern
browsers had the branch ever been selected
- CGContext.j: the CPVMLFeature branch of the load-time backend
selection removed; CPCompatibility.j: the CPVMLFeature constant and
its feature-table entry removed
- Tests/AppKit/CGContextTest.j: the vacuous VML-incompatibility
assertion removed
- the canvas backend and the no-canvas stubs are unchanged
- the spaced "# pragma mark -" form escaped the earlier MARK
conversion pass and the directive censuses; it is dead text
- this was the last pragma directive in either framework
- the seven chained macros (_CPRealFontSize, _CPFontNormalizedNames,
_CPCachedFont, _CPUserFont, _CPSystemFontCacheKey,
_CPCachedSystemFont, _CPSystemFont) become plain functions with
verbatim bodies
- all 25 call sites unchanged; all arguments at call sites are pure
expressions, so evaluation semantics are identical
- file-internal only: no other source file references these names
- _CGColorSpaceCreateWithModel becomes a function returning the
model record
- STANDARDIZE, whose body contains a return from the enclosing
function, is inlined verbatim at its two call sites (alpha
standardization and the RGB/CMYK component loop)
- CPScrollView _shouldShowCornerView, CPSplitView
_maybePostWillResizeNotification/_maybePostDidResizeNotification/
_didSuppressResizeNotifications/_setResizeNotificationsSuppressed:,
CPTableView _numberOfColumns/_updateColumnRangesIfNecessary/
_fullRowHeight/_rowBottomOfHeightInfo:/_hasVariableRowHeights,
CPMenuItem _decodeValueForKey:defaultValue:coder:/
_encodeValue:forKey:ifNotEqualTo:coder:, CALayer
_adjustContentsZIndexForLayer: and DOM: macros that referenced
ivars, self or the enclosing method's coder become private instance
methods; call sites rewritten from macro form to message form
- CABackingStore PIXEL, CPDragServer DRAGGING_WINDOW,
CPOutlineView SELECTION_SHOULD_CHANGE and SHOULD_SELECT_ITEM
become plain functions; call syntax is unchanged at all sites
- these macros reference only their parameters, so no ambient state
is involved
- the variable was omitted from the method's var declaration list
when xib deployment-target handling was added (2024); its
assignment created an implicit global, flagged by the compiler as
"creating global variable inside function or method"
- no functional change; the variable is used only within the method
- AppKit/Platform/Platform.h deleted; it defined only the
PLATFORM(FEATURE) macro, which no source file uses since the
AppKit preprocessor-removal work completed
- Foundation/Jakefile: the historical --include of that header into
every Foundation compilation is removed
- Jake/environment.js and the Objective-J subproject's copy: the
-DPLATFORM_COMMONJS/-DPLATFORM_BROWSER/-DPLATFORM_DOM flags are
removed; they defined symbols read only by the deleted macro
- no functional change; capp-build is unaffected (it consumes neither
the header nor the flags)
- CPPasteboard.j and Platform/DOM/CPPlatformPasteboard.j: the
PLATFORM(DOM) gates removed; _CPDOMDataTransferPasteboard and
CPPlatformPasteboard now exist under both targets
- the SUPPRESS_CAPPUCCINO_CUT/PASTE one-statement macros inlined at
their four call sites; the defines are deleted
- no #if PLATFORM gate remains anywhere in AppKit; the browser/
CommonJS distinction is now expressed entirely through runtime
CPDOMAvailable guards
- work-in-progress towards complete removal of CPP directives
- CPPlatform.j and CPPlatformString.j: the PLATFORM(DOM) gates and
CommonJS #else subclasses removed; one implementation serves both
targets
- CPPlatform: isBrowser and supportsDragAndDrop return NO when no DOM
is present, preserving the CommonJS results exactly; the NativeHost
distinction (window.cpIsDesktop) is unchanged
- CPPlatformString: createDOMElements, charPositionOfString,
sizeOfString and metricsOfFont return the former CommonJS-branch
values (no-op / zero / zero size / zero metrics) when no DOM is
present
- work-in-progress towards complete removal of CPP directives
- Update clean and clobber targets in Tests/Manual/Jakefile to enforce -mindepth 2 -maxdepth 2 traversal. This accurately purges subsidiary Build directories and Frameworks symlinks without triggering subjake dependency cycles.
- Inject explicit clean and clobber overrides into all 150+ subsidiary application Jakefiles. This forces local execution to wipe the top-level Build directory, bypassing applicationtask's default behavior of only targeting configuration-specific intermediate paths.
- Harmonizes artifact sweeping across both root-level orchestration and local leaf-level execution.
- Consolidate dual root `build` tasks into a unified target that initializes the build environment and spawns the orchestration pipeline cleanly.
- Replace individual test symlink creation in root `Jakefile` with an `assemble-frameworks` task that constructs a complete, portable `Build/Frameworks` directory.
- Update `Tests/Manual/Jakefile` `configure` task to target project root `Build/Frameworks` directly and streamline `clobber` operations.
Caveat: Tests/Manual subsidiary applications do not have functioning ‘clean’ and ‘clobber’ targets.
- Consolidate dual root `build` tasks into a unified target that initializes the build environment and spawns the orchestration pipeline cleanly.
- Replace individual test symlink creation in root `Jakefile` with an `assemble-frameworks` task that constructs a complete, portable `Build/Frameworks` directory.
- Update `Tests/Manual/Jakefile` `configure` task to target project root `Build/Frameworks` directly and streamline `clobber` operations
- Caveat: Jakefile in each subsidiary application does not include ‘clean’ and ‘clobber’ targets.
- CPWindow.j: the PLATFORM(BROWSER) import gate removed; the
CPPlatformWindow (DOM) category now loads under both targets
- category _init restructured: DOM setup (window capture, pasteboard,
registration) behind CPDOMAvailable; CommonJS branch initializes the
same state as the base class
- SCROLLWHEEL_LINE_PIXELS converted from #define to a file-scope
variable; its only uses are within this file
- load-time audit: file-scope statements are DOM-free; the single
typeof-guarded document reference takes its no-DOM branch under Node
- work-in-progress towards complete removal of CPP directives