### Objective-J Setup and Debugging Configuration Source: https://github.com/argosoz/cappuccino-testbook/blob/master/Resources/ViewBased/index-debug.html This snippet shows how to define the main file, include paths, and configure various debugging and logging options for Objective-J. It includes commented-out lines for enabling backtraces, suppressing exceptions, runtime type checking, and custom logging. ```objective-j OBJJ_MAIN_FILE = "main.j"; OBJJ_INCLUDE_PATHS = ["Frameworks/Debug", "Frameworks", "SomethingElse"]; objj_msgSend_reset(); // DEBUG OPTIONS: // Uncomment to enable printing of backtraces on exceptions: //objj_msgSend_decorate(objj_backtrace_decorator); // Uncomment to supress exceptions that take place inside a message //objj_msgSend_decorate(objj_supress_exceptions_decorator) // Uncomment to enable runtime type checking: //objj_msgSend_decorate(objj_typecheck_decorator); // Uncomment (along with both above) to print backtraces on type check errors: //objj_typecheck_prints_backtrace = true; // Uncomment to disable the default logger (CPLogConsole if window.console exists, CPLogPopup otherwise): //CPLogUnregister(CPLogDefault); // Uncomment to enable a specific logger: //CPLogRegister(CPLogConsole); //CPLogRegister(CPLogPopup); ``` -------------------------------- ### Objective-J Setup and Debug Options Source: https://github.com/argosoz/cappuccino-testbook/blob/master/Resources/performKeyEquivalentTest/index-debug.html This snippet shows the initial setup for an Objective-J file, defining include paths and message sending functions. It also includes commented-out lines for enabling various debugging features like backtraces, exception suppression, and type checking. ```Objective-J OBJJ_MAIN_FILE = "main.j"; OBJJ_INCLUDE_PATHS = ["Frameworks/Debug", "Frameworks", "SomethingElse"]; objj_msgSend_reset(); // DEBUG OPTIONS: // Uncomment to enable printing of backtraces on exceptions: //objj_msgSend_decorate(objj_backtrace_decorator); // Uncomment to supress exceptions that take place inside a message //objj_msgSend_decorate(objj_supress_exceptions_decorator) // Uncomment to enable runtime type checking: //objj_msgSend_decorate(objj_typecheck_decorator); // Uncomment (along with both above) to print backtraces on type check errors: //objj_typecheck_prints_backtrace = true; // Uncomment to disable the default logger (CPLogConsole if window.console exists, CPLogPopup otherwise): //CPLogUnregister(CPLogDefault); // Uncomment to enable a specific logger: //CPLogRegister(CPLogConsole); //CPLogRegister(CPLogPopup); ``` -------------------------------- ### Browser Upgrade Recommendations Source: https://github.com/argosoz/cappuccino-testbook/blob/master/Resources/ChildWindows/index.html Suggests users upgrade their browser if it's outdated and provides links to download popular modern browsers. ```html You may want to upgrade to a newer browser while you're at it: * [Safari](http://www.apple.com/safari/download/) * [Firefox](http://www.mozilla.com/en-US/firefox/) * [Chrome](http://www.google.com/chrome/) * [Opera](http://www.opera.com/download/) * [Internet Explorer](http://www.microsoft.com/windows/downloads/ie/getitnow.mspx) ``` -------------------------------- ### Objective-J Application Setup Source: https://github.com/argosoz/cappuccino-testbook/blob/master/Resources/UndoRedoWithMenuUpdate/index.html Defines the include paths and main file for an Objective-J application, typically used in Cappuccino projects. ```objective-j iApplication OBJJ_INCLUDE_PATHS = ["../../Frameworks"]; OBJJ_MAIN_FILE = "main.j"; ``` -------------------------------- ### Cappuccino Project Configuration Source: https://github.com/argosoz/cappuccino-testbook/blob/master/Resources/KeyEquivalents/index.html Defines include paths and the main file for a Cappuccino project. This setup is crucial for organizing project resources and execution flow. ```objective-j cappuccino-keyequivalents OBJJ_INCLUDE_PATHS = ["../../Frameworks"]; OBJJ_MAIN_FILE = "main.j"; ``` -------------------------------- ### Objective-J Initialization for NibApp Source: https://github.com/argosoz/cappuccino-testbook/blob/master/Resources/NibAppRemixed/index.html Initializes the NibApp with include paths and sets the main file. This is a core setup step for Cappuccino applications. ```objective-j NibApp.new OBJJ_INCLUDE_PATHS = ["../../Frameworks"]; OBJJ_MAIN_FILE = "main.j"; ``` -------------------------------- ### Cappuccino Configuration and Debugging Source: https://github.com/argosoz/cappuccino-testbook/blob/master/Resources/NewTextFieldBezel/index-debug.html Sets up the main file, include paths, and provides commented-out options for debugging message sending and logging within a Cappuccino application. ```Objective-J OBJJ_MAIN_FILE = "main.j"; OBJJ_INCLUDE_PATHS = ["Frameworks/Debug", "Frameworks", "SomethingElse"]; objj_msgSend_reset(); // DEBUG OPTIONS: // Uncomment to enable printing of backtraces on exceptions: //objj_msgSend_decorate(objj_backtrace_decorator); // Uncomment to supress exceptions that take place inside a message //objj_msgSend_decorate(objj_supress_exceptions_decorator) // Uncomment to enable runtime type checking: //objj_msgSend_decorate(objj_typecheck_decorator); // Uncomment (along with both above) to print backtraces on type check errors: //objj_typecheck_prints_backtrace = true; // Uncomment to disable the default logger (CPLogConsole if window.console exists, CPLogPopup otherwise): //CPLogUnregister(CPLogDefault); // Uncomment to enable a specific logger: //CPLogRegister(CPLogConsole); //CPLogRegister(CPLogPopup); ``` -------------------------------- ### Objective-J Setup for Font Metrics Explorer Source: https://github.com/argosoz/cappuccino-testbook/blob/master/Resources/FontMetricsExplorer/index.html Configures the build environment for the Font Metrics Explorer project using Objective-J. Sets the include paths for frameworks and specifies the main entry point file. ```objective-j OBJJ_INCLUDE_PATHS = ["../../Frameworks"]; OBJJ_MAIN_FILE = "main.j"; ``` -------------------------------- ### Project Configuration: OBJJ_INCLUDE_PATHS and OBJJ_MAIN_FILE Source: https://github.com/argosoz/cappuccino-testbook/blob/master/Resources/EditingControls/index.html This snippet shows how to define include paths and the main file for a project. OBJJ_INCLUDE_PATHS specifies directories to include, and OBJJ_MAIN_FILE sets the entry point of the application. These are common configurations in build systems. ```objective-j OBJJ_INCLUDE_PATHS = ["../../Frameworks"]; OBJJ_MAIN_FILE = "main.j"; ``` -------------------------------- ### Cappuccino Application Setup and Loading Indicator Source: https://github.com/argosoz/cappuccino-testbook/blob/master/Resources/CPUserNotificationTest/index-debug.html Configures application-specific settings like main file and include paths. It also defines a callback function to update a progress bar's width based on a percentage and injects HTML for a loading indicator with a progress bar into the document. This setup is common for applications that display a loading state. ```javascript CPUserNotificationTest OBJJ_MAIN_FILE = "main.j"; OBJJ_INCLUDE_PATHS = ["Frameworks/Debug", "Frameworks"]; var progressBar = null; OBJJ_PROGRESS_CALLBACK = function(percent, appSize, path) { percent = percent * 100; if (!progressBar) progressBar = document.getElementById("progress-bar"); if (progressBar) progressBar.style.width = Math.min(percent, 100) + "%" } var loadingHTML = '
' + '
Loading...
' + '
' + ' ' + '
' + '
'; objj_msgSend_reset(); // DEBUG OPTIONS: // Uncomment to enable printing of backtraces on exceptions: //objj_msgSend_decorate(objj_backtrace_decorator); // Uncomment to supress exceptions that take place inside a message //objj_msgSend_decorate(objj_supress_exceptions_decorator) // Uncomment to enable runtime type checking: //objj_msgSend_decorate(objj_typecheck_decorator); // Uncomment (along with both above) to print backtraces on type check errors: //objj_typecheck_prints_backtrace = true; // Uncomment to disable the default logger (CPLogConsole if window.console exists, CPLogPopup otherwise): //CPLogUnregister(CPLogDefault); // Uncomment to enable a specific logger: //CPLogRegister(CPLogConsole); //CPLogRegister(CPLogPopup); // Tag view DOM elements with a "data-cappuccino-view" attribute that contains // the class name of the view that created them. Comment this or set to false to disable. appkit_tag_dom_elements = true; document.write(loadingHTML); ``` -------------------------------- ### Cappuccino Application Setup Source: https://github.com/argosoz/cappuccino-testbook/blob/master/Resources/CPFlashviewTest/index-debug.html Defines the main file and include paths for the Cappuccino application. Also includes commented-out options for enabling various debug decorators for message sending. ```Objective-J CPFlashviewTest OBJJ_MAIN_FILE = "main.j"; OBJJ_INCLUDE_PATHS = ["Frameworks/Debug", "Frameworks", "SomethingElse"]; objj_msgSend_reset(); // DEBUG OPTIONS: // Uncomment to enable printing of backtraces on exceptions: //objj_msgSend_decorate(objj_backtrace_decorator); // Uncomment to supress exceptions that take place inside a message //objj_msgSend_decorate(objj_supress_exceptions_decorator) // Uncomment to enable runtime type checking: //objj_msgSend_decorate(objj_typecheck_decorator); // Uncomment (along with both above) to print backtraces on type check errors: //objj_typecheck_prints_backtrace = true; // Uncomment to disable the default logger (CPLogConsole if window.console exists, CPLogPopup otherwise): //CPLogUnregister(CPLogDefault); // Uncomment to enable a specific logger: //CPLogRegister(CPLogConsole); //CPLogRegister(CPLogPopup); // Tag view DOM elements with a "data-cappuccino-view" attribute that contains // the class name of the view that created them. Comment this or set to false to disable. appkit_tag_dom_elements = true; ``` -------------------------------- ### Objective-J Configuration Source: https://github.com/argosoz/cappuccino-testbook/blob/master/Resources/sizeToFitFix/index.html Configuration settings for Objective-J, specifying include paths and the main file for the project. This is a common setup for Objective-J projects. ```objective-j OBJJ_INCLUDE_PATHS = ["../../Frameworks"]; OBJJ_MAIN_FILE = "main.j"; ``` -------------------------------- ### CSS Styling for Layout Source: https://github.com/argosoz/cappuccino-testbook/blob/master/Resources/CPColorWellBindings/index-debug.html Provides basic CSS rules to style the page layout, including positioning of container elements and text alignment for content. ```css body{margin:0; padding:0;} #container {position: absolute; top:50%; left:50%;} #content {width:800px; text-align:center; margin-left: -400px; height:50px; margin-top:-25px; line-height: 50px;} #content {font-family: "Helvetica", "Arial", sans-serif; font-size: 18px; color: black; text-shadow: 0px 1px 0px white; } ``` -------------------------------- ### Cappuccino Configuration and HTML Structure Source: https://github.com/argosoz/cappuccino-testbook/blob/master/Resources/ChildWindows/index.html Defines include paths, the main file for a Cappuccino project, and basic CSS for layout. It then uses JavaScript to dynamically write HTML content, including a loading spinner, to the page. ```objective-c ChildWindows OBJJ_INCLUDE_PATHS = ["../../Frameworks"]; OBJJ_MAIN_FILE = "main.j"; ``` ```css body{margin:0; padding:0;} #container {position: absolute; top:50%; left:50%;} #content {width:800px; text-align:center; margin-left: -400px; height:50px; margin-top:-25px; line-height: 50px;} #content {font-family: "Helvetica", "Arial", sans-serif; font-size: 18px; color: black; text-shadow: 0px 1px 0px white; } ``` ```javascript document.write("

" + " " + "Loading ChildWindows...

"); ``` -------------------------------- ### DataView Configuration and HTML Loading Message (Objective-J) Source: https://github.com/argosoz/cappuccino-testbook/blob/master/Resources/DataView/index.html This snippet configures DataView include paths and the main file, then writes HTML to the document to display a loading message with a spinner image. It requires a 'main.j' file and a 'Resources/spinner.gif'. ```objective-j OBJJ_INCLUDE_PATHS = ["../../Frameworks"]; OBJJ_MAIN_FILE = "main.j"; ``` ```html document.write("

" + " " + "Loading DataView...

"); ``` -------------------------------- ### Project Configuration and Debug Options (Objective-J) Source: https://github.com/argosoz/cappuccino-testbook/blob/master/Resources/CPColorWellBindings/index-debug.html Defines the main file, include paths, and provides commented-out options for enabling various debugging features like backtraces, exception suppression, and runtime type checking. It also shows how to manage logging. ```Objective-J CPColorWellBindings OBJJ_MAIN_FILE = "main.j"; OBJJ_INCLUDE_PATHS = ["Frameworks/Debug", "Frameworks", "SomethingElse"]; objj_msgSend_reset(); // DEBUG OPTIONS: // Uncomment to enable printing of backtraces on exceptions: //objj_msgSend_decorate(objj_backtrace_decorator); // Uncomment to supress exceptions that take place inside a message //objj_msgSend_decorate(objj_supress_exceptions_decorator) // Uncomment to enable runtime type checking: //objj_msgSend_decorate(objj_typecheck_decorator); // Uncomment (along with both above) to print backtraces on type check errors: //objj_typecheck_prints_backtrace = true; // Uncomment to disable the default logger (CPLogConsole if window.console exists, CPLogPopup otherwise): //CPLogUnregister(CPLogDefault); // Uncomment to enable a specific logger: //CPLogRegister(CPLogConsole); //CPLogRegister(CPLogPopup); ``` -------------------------------- ### Objective-J Setup for Theme Browser Source: https://github.com/argosoz/cappuccino-testbook/blob/master/Resources/ThemeBrowser/index-debug.html Configures include paths and resets message sending for the Theme Browser in Objective-J. Defines the main file and several framework directories. ```objective-j OBJJ_MAIN_FILE = "main.j"; OBJJ_INCLUDE_PATHS = ["Frameworks/Debug", "Frameworks", "SomethingElse"]; objj_msgSend_reset(); ``` -------------------------------- ### Setup and Progress Callback in JavaScript Source: https://github.com/argosoz/cappuccino-testbook/blob/master/Resources/CPVisualEffectViewTest/index-debug.html Configures project build settings, including the main file and include paths. It defines a JavaScript function to update a progress bar's visual width based on a provided percentage, likely used during application loading. ```JavaScript CPVisualEffectViewTest OBJJ_MAIN_FILE = "main.j"; OBJJ_INCLUDE_PATHS = ["Frameworks/Debug", "Frameworks"]; var progressBar = null; OBJJ_PROGRESS_CALLBACK = function(percent, appSize, path) { percent = percent * 100; if (!progressBar) progressBar = document.getElementById("progress-bar"); if (progressBar) progressBar.style.width = Math.min(percent, 100) + "%" } ``` -------------------------------- ### Loading Indicator and JavaScript Fallback (HTML/JavaScript) Source: https://github.com/argosoz/cappuccino-testbook/blob/master/Resources/CPColorWellBindings/index-debug.html This snippet displays a loading message with a spinner image and provides a fallback message for browsers that do not support or have JavaScript disabled. It includes links to instructions for enabling JavaScript and upgrading browsers. ```html document.write("

" + " " + "Loading CPColorWellBindings...

"); ``` ```html JavaScript is required for this site to work correctly but is either disabled or not supported by your browser. [Show me how to enable JavaScript](http://cappuccino-project.org/noscript) You may want to upgrade to a newer browser while you're at it: * [Safari](http://www.apple.com/safari/download/) * [Firefox](http://www.mozilla.com/en-US/firefox/) * [Chrome](http://www.google.com/chrome/) * [Opera](http://www.opera.com/download/) * [Internet Explorer](http://www.microsoft.com/windows/downloads/ie/getitnow.mspx) ``` -------------------------------- ### Cappuccino Bindings Initialization (Objective-J) Source: https://github.com/argosoz/cappuccino-testbook/blob/master/Resources/Bindings/index-debug.html Initializes main bindings and include paths for the Cappuccino application. It also shows commented-out examples for various debugging decorators and logger configurations. ```Objective-J Bindings OBJJ_MAIN_FILE = "main.j"; OBJJ_INCLUDE_PATHS = ["Frameworks/Debug", "Frameworks", "SomethingElse"]; objj_msgSend_reset(); // DEBUG OPTIONS: // Uncomment to enable printing of backtraces on exceptions: //objj_msgSend_decorate(objj_backtrace_decorator); // Uncomment to supress exceptions that take place inside a message //objj_msgSend_decorate(objj_supress_exceptions_decorator) // Uncomment to enable runtime type checking: //objj_msgSend_decorate(objj_typecheck_decorator); // Uncomment (along with both above) to print backtraces on type check errors: //objj_typecheck_prints_backtrace = true; // Uncomment to disable the default logger (CPLogConsole if window.console exists, CPLogPopup otherwise): //CPLogUnregister(CPLogDefault); // Uncomment to enable a specific logger: //CPLogRegister(CPLogConsole); //CPLogRegister(CPLogPopup); ``` -------------------------------- ### Cappuccino Setup and Progress Callback Source: https://github.com/argosoz/cappuccino-testbook/blob/master/Resources/CPTextFieldMovementsTest/index.html Configures Cappuccino project settings including include paths and the main file. It also defines a progress callback function that updates a visual progress bar based on the loading percentage. ```Objective-J CPTextFieldMovementsTest OBJJ_INCLUDE_PATHS = ["../../Frameworks"]; OBJJ_MAIN_FILE = "main.j"; var progressBar = null; OBJJ_PROGRESS_CALLBACK = function(percent, appSize, path) { percent = percent * 100; if (!progressBar) progressBar = document.getElementById("progress-bar"); if (progressBar) progressBar.style.width = Math.min(percent, 100) + "%" } ``` -------------------------------- ### Basic CSS for Page Layout and Styling Source: https://github.com/argosoz/cappuccino-testbook/blob/master/Resources/DataView/index.html This CSS defines styles for the page body, container, and content elements to center content and apply specific fonts, sizes, and text shadows for the loading message. ```css body{margin:0; padding:0;} #container {position: absolute; top:50%;left:50%;} #content {width:800px; text-align:center; margin-left: -400px; height:50px; margin-top:-25px; line-height: 50px;} #content {font-family: "Helvetica", "Arial", sans-serif; font-size: 18px; color: black; text-shadow: 0px 1px 0px white; } ``` -------------------------------- ### Cappuccino Initialization and Debugging Source: https://github.com/argosoz/cappuccino-testbook/blob/master/Resources/DragAndDrop/index-debug.html Initializes DragAndDrop functionality in Cappuccino by setting main file and include paths. It also provides commented-out options for enabling various debugging features like backtraces, exception suppression, and type checking. ```objective-j OBJJ_MAIN_FILE = "main.j"; OBJJ_INCLUDE_PATHS = ["Frameworks/Debug", "Frameworks", "SomethingElse"]; objj_msgSend_reset(); // DEBUG OPTIONS: // Uncomment to enable printing of backtraces on exceptions: //objj_msgSend_decorate(objj_backtrace_decorator); // Uncomment to supress exceptions that take place inside a message //objj_msgSend_decorate(objj_supress_exceptions_decorator) // Uncomment to enable runtime type checking: //objj_msgSend_decorate(objj_typecheck_decorator); // Uncomment (along with both above) to print backtraces on type check errors: //objj_typecheck_prints_backtrace = true; // Uncomment to disable the default logger (CPLogConsole if window.console exists, CPLogPopup otherwise): //CPLogUnregister(CPLogDefault); // Uncomment to enable a specific logger: //CPLogRegister(CPLogConsole); //CPLogRegister(CPLogPopup); ``` -------------------------------- ### Create Test Case Structure Source: https://github.com/argosoz/cappuccino-testbook/blob/master/Resources/CompilationTests/README.md Defines the required format for creating a new test case file. It includes a specific comment for expected output and a block comment for console output, with a placeholder for file paths. ```objective-j // Expected output: [OBJJ_STATUS_CODE] /* START_EXPECTED [CONSOLE_OUTPUT_OF_OBJJ] END_EXPECTED */ @import @implementation MyCall : CPObject { CPString property1; } @end ``` -------------------------------- ### Python `while` Loop Example Source: https://github.com/argosoz/cappuccino-testbook/blob/master/Browser.environment/MHTMLData.txt This Python code uses a `while` loop to print numbers starting from 0 as long as the number is less than 5. The loop increments the number in each iteration. ```python counter = 0 while counter < 5: print(counter) counter += 1 ``` -------------------------------- ### Start CORS Server (Python) Source: https://github.com/argosoz/cappuccino-testbook/blob/master/Resources/CrossOriginTest/README.md Starts a custom Python script named 'cors-server.py' on port 8001, likely designed to handle CORS-specific requests and logging. ```bash $> python cors-server.py ``` -------------------------------- ### HTML Structure for a Simple Web Page Source: https://github.com/argosoz/cappuccino-testbook/blob/master/Browser.environment/MHTMLData.txt This HTML code provides the basic structure for a simple web page. It includes a header, a main content area, and a footer. This is a foundational example for understanding HTML document structure. ```html Simple Web Page

Welcome to My Page

This is the main content of the page.

``` -------------------------------- ### Start Simple HTTP Server (Python) Source: https://github.com/argosoz/cappuccino-testbook/blob/master/Resources/CrossOriginTest/README.md Starts a basic HTTP server on port 8000 using Python's built-in module. This server is used to host test files. ```bash $> python -m SimpleHTTPServer ``` -------------------------------- ### Define CPRadioBindings Build Paths and Main File Source: https://github.com/argosoz/cappuccino-testbook/blob/master/Resources/CPRadioBindings/index.html This snippet defines the include paths and the main file for the CPRadioBindings project. It specifies that the 'Frameworks' directory should be included in the build process and 'main.j' is the entry point. ```Objective-J CPRadioBindings OBJJ_INCLUDE_PATHS = ["../../Frameworks"]; CPRadioBindings OBJJ_MAIN_FILE = "main.j"; ``` -------------------------------- ### Project Configuration: CPStepperBindings (Objective-J) Source: https://github.com/argosoz/cappuccino-testbook/blob/master/Resources/CPStepperBindings/index.html This snippet shows the Objective-J include paths and main file for the CPStepperBindings project. It specifies the framework directories and the entry point for the application. ```objective-j CPStepperBindings OBJJ_INCLUDE_PATHS = ["../../Frameworks"]; OBJJ_MAIN_FILE = "main.j"; ``` -------------------------------- ### JavaScript Requirement Message Source: https://github.com/argosoz/cappuccino-testbook/blob/master/Resources/ChildWindows/index.html Informs the user that JavaScript is required for the site to function correctly and provides a link to instructions on how to enable it. ```html JavaScript is required for this site to work correctly but is either disabled or not supported by your browser. [Show me how to enable JavaScript](http://cappuccino.org/noscript) ``` -------------------------------- ### CSS Styling for Layout Source: https://github.com/argosoz/cappuccino-testbook/blob/master/Resources/NewTextFieldBezel/index.html Applies basic styling and layout rules for the page elements, including positioning, sizing, and text properties. ```css body{margin:0; padding:0;} #container {position: absolute; top:50%; left:50%;} #content {width:800px; text-align:center; margin-left: -400px; height:50px; margin-top:-25px; line-height: 50px;} #content {font-family: "Helvetica", "Arial", sans-serif; font-size: 18px; color: black; text-shadow: 0px 1px 0px white; } ``` -------------------------------- ### CPColorWellBindings Build Configuration Source: https://github.com/argosoz/cappuccino-testbook/blob/master/Resources/CPColorWellBindings/index.html Defines the include paths and main file for the CPColorWellBindings project. OBJJ_INCLUDE_PATHS specifies directories for Objective-J/JavaScript pre-processing, and OBJJ_MAIN_FILE points to the entry point of the application. ```Objective-J CPColorWellBindings OBJJ_INCLUDE_PATHS = ["../../Frameworks"]; OBJJ_MAIN_FILE = "main.j"; ``` -------------------------------- ### Java `if` Statement Example Source: https://github.com/argosoz/cappuccino-testbook/blob/master/Browser.environment/MHTMLData.txt This Java code shows a simple `if` statement that checks if a boolean variable `isLoggedIn` is true. If it is, a login success message is printed. ```java public class LoginStatus { public static void main(String[] args) { boolean isLoggedIn = true; if (isLoggedIn) { System.out.println("User is logged in."); } } } ``` -------------------------------- ### Objective-J Configuration for SmartFoldersDemo Source: https://github.com/argosoz/cappuccino-testbook/blob/master/Resources/SmartFoldersDemo/index.html Defines include paths and the main file for the SmartFoldersDemo project using Objective-J syntax. OBJJ_INCLUDE_PATHS specifies directories to include, and OBJJ_MAIN_FILE sets the entry point. ```Objective-J OBJJ_INCLUDE_PATHS = ["../../Frameworks"]; OBJJ_MAIN_FILE = "main.j"; ``` -------------------------------- ### Project Configuration and JavaScript Loading Source: https://github.com/argosoz/cappuccino-testbook/blob/master/Resources/CPURLConnectionAsyncTest/index.html Defines project include paths and the main file, then uses JavaScript to display a loading message with a spinner image. It also includes fallback text for browsers with JavaScript disabled. ```Objective-J CPURLConnectionAsyncTest OBJJ_INCLUDE_PATHS = ["../../Frameworks"]; OBJJ_MAIN_FILE = "main.j"; ``` ```CSS body{margin:0; padding:0;} #container {position: absolute; top:50%; left:50%;} #content {width:800px; text-align:center; margin-left: -400px; height:50px; margin-top:-25px; line-height: 50px;} #content {font-family: "Helvetica", "Arial", sans-serif; font-size: 18px; color: black; text-shadow: 0px 1px 0px white; } ``` ```JavaScript document.write("

" + " " + "Loading CPURLConnectionAsyncTest...

"); ``` -------------------------------- ### Objective-J Configuration for CappDoc Source: https://github.com/argosoz/cappuccino-testbook/blob/master/Resources/CPDocumentControllerTestwithNib/index.html Configures include paths and the main file for the CappDoc tool within an Objective-J project. This setup helps in organizing project files and dependencies. ```objective-j OBJJ_INCLUDE_PATHS = ["../../Frameworks"]; OBJJ_MAIN_FILE = "main.j"; ``` -------------------------------- ### PlatformWindows Configuration in Objective-J Source: https://github.com/argosoz/cappuccino-testbook/blob/master/Resources/PlatformWindows/index-debug.html Defines the main file and include paths for the PlatformWindows environment. OBJJ_MAIN_FILE specifies the entry point, while OBJJ_INCLUDE_PATHS lists directories to search for required modules. ```Objective-J PlatformWindows OBJJ_MAIN_FILE = "main.j"; OBJJ_INCLUDE_PATHS = ["Frameworks/Debug", "Frameworks", "SomethingElse"]; ``` -------------------------------- ### CPOutlineViewCibTest Build Settings Source: https://github.com/argosoz/cappuccino-testbook/blob/master/Resources/CPOutlineViewCibTest/index.html Defines include paths and the main file for the CPOutlineViewCibTest project. This configuration is essential for the project's build process. ```objective-j CPOutlineViewCibTest OBJJ_INCLUDE_PATHS = ["../../Frameworks"]; CPOutlineViewCibTest OBJJ_MAIN_FILE = "main.j"; ``` -------------------------------- ### Objective-J Project Configuration and Debugging Options Source: https://github.com/argosoz/cappuccino-testbook/blob/master/Resources/CPSoundTest/index-debug.html This snippet shows the Objective-J code for setting up the main file and include paths for the CPSoundTest project. It also demonstrates how to configure debugging options by decorating message sending with various decorators like exception suppression and type checking. ```Objective-J CPSoundTest OBJJ_MAIN_FILE = "main.j"; OBJJ_INCLUDE_PATHS = ["Frameworks/Debug", "Frameworks", "SomethingElse"]; objj_msgSend_reset(); // DEBUG OPTIONS: // Uncomment to enable printing of backtraces on exceptions: //objj_msgSend_decorate(objj_backtrace_decorator); // Uncomment to supress exceptions that take place inside a message //objj_msgSend_decorate(objj_supress_exceptions_decorator) // Uncomment to enable runtime type checking: //objj_msgSend_decorate(objj_typecheck_decorator); // Uncomment (along with both above) to print backtraces on type check errors: //objj_typecheck_prints_backtrace = true; // Uncomment to disable the default logger (CPLogConsole if window.console exists, CPLogPopup otherwise): //CPLogUnregister(CPLogDefault); // Uncomment to enable a specific logger: //CPLogRegister(CPLogConsole); //CPLogRegister(CPLogPopup); ``` -------------------------------- ### JavaScript for Loading Message Source: https://github.com/argosoz/cappuccino-testbook/blob/master/Resources/NewTextFieldBezel/index.html Generates HTML content dynamically to display a loading message with a spinner image using JavaScript. It requires JavaScript to be enabled in the browser. ```javascript document.write("

" + " " + "Loading NewTextField...

"); ``` -------------------------------- ### Display Loading Message with JavaScript Source: https://github.com/argosoz/cappuccino-testbook/blob/master/Resources/CPTableViewGroupRows/index.html This JavaScript code writes HTML content to the document to display a loading message with a spinner image. It is designed to inform the user about the loading process. ```javascript document.write("

" + " " + "Loading CPTableViewGroupRows...

"); ``` -------------------------------- ### Java `while` Loop Example Source: https://github.com/argosoz/cappuccino-testbook/blob/master/Browser.environment/MHTMLData.txt This Java code snippet illustrates the use of a `while` loop. It counts down from 5 to 1, printing each number before the loop terminates. This shows a condition-controlled loop. ```java public class WhileLoop { public static void main(String[] args) { int count = 5; while (count > 0) { System.out.println(count); count--; } } } ``` -------------------------------- ### Run Tests with run.py Source: https://github.com/argosoz/cappuccino-testbook/blob/master/Resources/CompilationTests/README.md Execute all tests in the project using the provided Python script. No specific inputs or outputs are detailed, but it's the primary method for test execution. ```shell ./run.py ``` -------------------------------- ### Objective-J Configuration for Cappuccino Testbook Source: https://github.com/argosoz/cappuccino-testbook/blob/master/Resources/predicateWithFormat/index.html This snippet defines the include paths and the main file for the Cappuccino testbook project. It specifies the directory for framework files and the entry point for the application. ```objective-j test OBJJ_INCLUDE_PATHS = ["../../Frameworks"]; OBJJ_MAIN_FILE = "main.j"; ``` -------------------------------- ### Cappuccino Main File and Progress Callback Setup (Objective-J) Source: https://github.com/argosoz/cappuccino-testbook/blob/master/Resources/ThemeKitchenSink/index-debug.html Defines the main file, include paths, and a progress callback function for a Cappuccino application. The callback visually updates a progress bar during the loading process and includes commented-out debug options. ```Objective-J OBJJ_MAIN_FILE = "main.j"; OBJJ_INCLUDE_PATHS = ["Frameworks/Debug", "Frameworks"]; var progressBar = null; OBJJ_PROGRESS_CALLBACK = function(percent, appSize, path) { percent = percent * 100; if (!progressBar) progressBar = document.getElementById("progress-bar"); if (progressBar) progressBar.style.width = Math.min(percent, 100) + "%" } ``` -------------------------------- ### CSS Styling for Loading Message Source: https://github.com/argosoz/cappuccino-testbook/blob/master/Resources/CPTimeZone/index-debug.html Provides basic CSS rules to style the loading message container and content, centering them on the page and applying specific fonts and text effects. ```CSS body{margin:0; padding:0;} #container {position: absolute; top:50%; left:50%;} #content {width:800px; text-align:center; margin-left: -400px; height:50px; margin-top:-25px; line-height: 50px;} #content {font-family: "Helvetica", "Arial", sans-serif; font-size: 18px; color: black; text-shadow: 0px 1px 0px white; } ``` -------------------------------- ### Objective-J Test Setup and Debugging Options Source: https://github.com/argosoz/cappuccino-testbook/blob/master/Resources/CPFormatterTest/index-debug.html This Objective-J code snippet defines main file paths, include paths, and provides commented-out options for decorating message sending with decorators like backtrace, suppressing exceptions, or enabling runtime type checking. It also shows how to manage logging. ```objective-j CPFormatterTest OBJJ_MAIN_FILE = "main.j"; OBJJ_INCLUDE_PATHS = ["Frameworks/Debug", "Frameworks"]; objj_msgSend_reset(); // DEBUG OPTIONS: // Uncomment to enable printing of backtraces on exceptions: //objj_msgSend_decorate(objj_backtrace_decorator); // Uncomment to supress exceptions that take place inside a message //objj_msgSend_decorate(objj_supress_exceptions_decorator) // Uncomment to enable runtime type checking: //objj_msgSend_decorate(objj_typecheck_decorator); // Uncomment (along with both above) to print backtraces on type check errors: //objj_typecheck_prints_backtrace = true; // Uncomment to disable the default logger (CPLogConsole if window.console exists, CPLogPopup otherwise): //CPLogUnregister(CPLogDefault); // Uncomment to enable a specific logger: //CPLogRegister(CPLogConsole); //CPLogRegister(CPLogPopup); ``` -------------------------------- ### Display Loading Message Source: https://github.com/argosoz/cappuccino-testbook/blob/master/Resources/CPTimeZone/index-debug.html Writes HTML to the document to display a 'Loading CPTimeZone...' message with a spinner image. This is typically used to provide user feedback during application initialization. ```JavaScript document.write("

" + " " + "Loading CPTimeZone...

"); ``` -------------------------------- ### Cappuccino Debugging Options Setup Source: https://github.com/argosoz/cappuccino-testbook/blob/master/Resources/ArrayControllerRemovingFirstTest/index-debug.html Configures various debugging and logging options for the Cappuccino framework. This includes enabling backtraces, suppressing exceptions, runtime type checking, and managing loggers. ```Objective-C OBJJ_MAIN_FILE = "main.j"; OBJJ_INCLUDE_PATHS = ["Frameworks/Debug", "Frameworks", "SomethingElse"]; objj_msgSend_reset(); // DEBUG OPTIONS: // Uncomment to enable printing of backtraces on exceptions: //objj_msgSend_decorate(objj_backtrace_decorator); // Uncomment to supress exceptions that take place inside a message //objj_msgSend_decorate(objj_supress_exceptions_decorator) // Uncomment to enable runtime type checking: //objj_msgSend_decorate(objj_typecheck_decorator); // Uncomment (along with both above) to print backtraces on type check errors: //objj_typecheck_prints_backtrace = true; // Uncomment to disable the default logger (CPLogConsole if window.console exists, CPLogPopup otherwise): //CPLogUnregister(CPLogDefault); // Uncomment to enable a specific logger: //CPLogRegister(CPLogConsole); //CPLogRegister(CPLogPopup); // Tag view DOM elements with a "data-cappuccino-view" attribute that contains // the class name of the view that created them. Comment this or set to false to disable. appkit_tag_dom_elements = true; ``` -------------------------------- ### Cappuccino Project Configuration and Progress Callback Source: https://github.com/argosoz/cappuccino-testbook/blob/master/Resources/CrossOriginTest/index.html Defines project-level configurations like include paths and the main file, along with a JavaScript callback function to update a progress bar based on download percentage. This function interacts with the DOM to visually represent loading progress. ```javascript CrossOriginTest OBJJ_INCLUDE_PATHS = ["../../Frameworks"]; OBJJ_MAIN_FILE = "main.j"; var progressBar = null; OBJJ_PROGRESS_CALLBACK = function(percent, appSize, path) { percent = percent * 100; if (!progressBar) progressBar = document.getElementById("progress-bar"); if (progressBar) progressBar.style.width = Math.min(percent, 100) + "%" } ``` -------------------------------- ### SmartFoldersDemo Initialization and Debugging Options (Objective-J) Source: https://github.com/argosoz/cappuccino-testbook/blob/master/Resources/SmartFoldersDemo/index-debug.html Sets the main file and include paths for the SmartFoldersDemo project. It also includes commented-out code for various debugging configurations such as enabling backtraces, suppressing exceptions, and runtime type checking. Dependencies include the Objective-J runtime and specific decorators. ```objective-j OBJJ_MAIN_FILE = "main.j"; OBJJ_INCLUDE_PATHS = ["Frameworks/Debug", "Frameworks", "SomethingElse"]; objj_msgSend_reset(); // DEBUG OPTIONS: // Uncomment to enable printing of backtraces on exceptions: //objj_msgSend_decorate(objj_backtrace_decorator); // Uncomment to supress exceptions that take place inside a message //objj_msgSend_decorate(objj_supress_exceptions_decorator) // Uncomment to enable runtime type checking: //objj_msgSend_decorate(objj_typecheck_decorator); // Uncomment (along with both above) to print backtraces on type check errors: //objj_typecheck_prints_backtrace = true; // Uncomment to disable the default logger (CPLogConsole if window.console exists, CPLogPopup otherwise): //CPLogUnregister(CPLogDefault); // Uncomment to enable a specific logger: //CPLogRegister(CPLogConsole); //CPLogRegister(CPLogPopup); ``` -------------------------------- ### JavaScript Loading Indicator Source: https://github.com/argosoz/cappuccino-testbook/blob/master/Resources/ViewBased/index-debug.html This JavaScript code dynamically creates and injects HTML elements to display a loading message with a spinner image. It's intended to be shown while the CPTableViewViewBased component loads. ```javascript document.write("

" + " " + "Loading CPTableViewViewBased...

"); ``` -------------------------------- ### CSS Styling for Loading Indicator Container Source: https://github.com/argosoz/cappuccino-testbook/blob/master/Resources/CPProgressIndicator/index.html This CSS defines the styling for the loading indicator container, setting its position, dimensions, and text alignment. It ensures the loading message is centered on the page. ```css body{margin:0; padding:0;} #container {position: absolute; top:50%; left:50%;} #content {width:800px; text-align:center; margin-left: -400px; height:50px; margin-top:-25px; line-height: 50px;} #content {font-family: "Helvetica", "Arial", sans-serif; font-size: 18px; color: black; text-shadow: 0px 1px 0px white; } ``` -------------------------------- ### Cappuccino: Main File and Include Paths Configuration Source: https://github.com/argosoz/cappuccino-testbook/blob/master/Resources/VariableRows/index-debug.html Defines the main file and include paths for the Cappuccino project. OBJJ_MAIN_FILE specifies the entry point, while OBJJ_INCLUDE_PATHS lists directories to search for included files. This setup is crucial for project compilation and execution. ```Objective-C VariableRows OBJJ_MAIN_FILE = "main.j"; OBJJ_INCLUDE_PATHS = ["Frameworks/Debug", "Frameworks", "SomethingElse"]; ``` -------------------------------- ### C++ `for` Loop Example Source: https://github.com/argosoz/cappuccino-testbook/blob/master/Browser.environment/MHTMLData.txt This C++ code demonstrates a basic `for` loop that iterates from 0 to 4 and prints each number to the console. It's a fundamental control flow structure in C++. ```cpp #include int main() { for (int i = 0; i < 5; ++i) { std::cout << i << " "; } std::cout << std::endl; return 0; } ``` -------------------------------- ### Basic C# Console Output Source: https://github.com/argosoz/cappuccino-testbook/blob/master/Browser.environment/MHTMLData.txt This C# code demonstrates how to print text to the console using `Console.WriteLine()`. It's a fundamental example for any C# application that needs to display output. ```csharp using System; public class HelloWorld { public static void Main(string[] args) { Console.WriteLine("Hello, C# World!"); } } ``` -------------------------------- ### Objective-J Configuration - CPImageViewScaling Source: https://github.com/argosoz/cappuccino-testbook/blob/master/Resources/CPImageViewAlignmentScaling/index.html This snippet shows the Objective-J include paths and main file configuration for CPImageViewScaling. It specifies the directory for included frameworks and the entry point for the application. ```Objective-J CPImageViewScaling OBJJ_INCLUDE_PATHS = ["../../Frameworks"]; OBJJ_MAIN_FILE = "main.j"; ``` -------------------------------- ### Cappuccino Project Configuration Source: https://github.com/argosoz/cappuccino-testbook/blob/master/Resources/AttachedSheet/index.html Defines the include paths and the main file for a Cappuccino project. OBJJ_INCLUDE_PATHS specifies directories to include, and OBJJ_MAIN_FILE points to the entry point of the application. ```Unknown OBJJ_INCLUDE_PATHS = ["../../Frameworks"]; OBJJ_MAIN_FILE = "main.j"; ``` -------------------------------- ### CSS for Loading Indicator Layout Source: https://github.com/argosoz/cappuccino-testbook/blob/master/Resources/CPSoundTest/index-debug.html This CSS snippet defines the styling for the loading indicator's layout, including absolute positioning, centering, text alignment, and font properties. ```CSS body{margin:0; padding:0;} #container {position: absolute; top:50%; left:50%;} #content {width:800px; text-align:center; margin-left: -400px; height:50px; margin-top:-25px; line-height: 50px;} #content {font-family: "Helvetica", "Arial", sans-serif; font-size: 18px; color: black; text-shadow: 0px 1px 0px white; } ``` -------------------------------- ### CPPanelTest Configuration and Progress Callback (Objective-J) Source: https://github.com/argosoz/cappuccino-testbook/blob/master/Resources/CPPanelTest/index-debug.html Sets up the main file, include paths, and a callback function for progress updates in the CPPanelTest project. The progress callback updates a visual progress bar based on the provided percentage. ```objective-j CPPanelTest OBJJ_MAIN_FILE = "main.j"; OBJJ_INCLUDE_PATHS = ["Frameworks/Debug", "Frameworks"]; var progressBar = null; OBJJ_PROGRESS_CALLBACK = function(percent, appSize, path) { percent = percent * 100; if (!progressBar) progressBar = document.getElementById("progress-bar"); if (progressBar) progressBar.style.width = Math.min(percent, 100) + "%" } ``` -------------------------------- ### Configure Objective-J Project and Debugging Options Source: https://github.com/argosoz/cappuccino-testbook/blob/master/Resources/CPOutlineViewTest/index-debug.html Sets up the main file, include paths, and configures message sending decorators for debugging in Objective-J. This code is essential for project setup and error handling during development. ```Objective-J OBJJ_MAIN_FILE = "main.j"; OBJJ_INCLUDE_PATHS = ["Frameworks/Debug", "Frameworks", "SomethingElse"]; objj_msgSend_reset(); // DEBUG OPTIONS: // Uncomment to enable printing of backtraces on exceptions: // objj_msgSend_decorate(objj_backtrace_decorator); // Uncomment to enable runtime type checking: // objj_msgSend_decorate(objj_typecheck_decorator); // Uncomment (along with both above) to print backtraces on type check errors: //objj_msgSend_prints_backtrace = true; ``` -------------------------------- ### Display Loading Message (JavaScript) Source: https://github.com/argosoz/cappuccino-testbook/blob/master/Resources/CPMenuKeyEquivalents/index.html This JavaScript code dynamically creates and inserts HTML elements to display a loading message with a spinner image. It requires a browser with JavaScript enabled. ```javascript document.write("

" + " " + "Loading menu-keyequivs...

"); ``` -------------------------------- ### CSS Styling for Loading Indicator Source: https://github.com/argosoz/cappuccino-testbook/blob/master/Resources/ViewBasedCib/index.html This CSS defines the styling for the loading container, content, and spinner. It centers the content and sets font properties. The styles are crucial for the visual presentation of the loading message. ```css body{margin:0; padding:0;} #container {position: absolute; top:50%; left:50%;} #content {width:800px; text-align:center; margin-left: -400px; height:50px; margin-top:-25px; line-height: 50px;} #content {font-family: "Helvetica", "Arial", sans-serif; font-size: 18px; color: black; text-shadow: 0px 1px 0px white; } #loadgraphic {margin-right: 0.2em; margin-bottom:-2px;} ```