From dfe215f34c978a30fb33ec39b8b3c14e97f2c76b Mon Sep 17 00:00:00 2001 From: daboe01 Date: Fri, 19 Jul 2024 06:36:58 +0200 Subject: [PATCH 1/4] fixed: 1xp glitch with CPSegmentedControl in safari --- AppKit/CPSegmentedControl.j | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/AppKit/CPSegmentedControl.j b/AppKit/CPSegmentedControl.j index c2dd3a21f..77968d693 100644 --- a/AppKit/CPSegmentedControl.j +++ b/AppKit/CPSegmentedControl.j @@ -561,10 +561,11 @@ CPSegmentSwitchTrackingMomentary = 2; } else if (aName === "right-segment-bezel") { - return CGRectMake(CGRectGetWidth([self bounds]) - contentInset.right, - bezelInset.top, - contentInset.right, - height); + // we have to FLOOR the coordinates to prevent a 1px glitch in Safari + return CGRectMake(FLOOR(CGRectGetWidth([self bounds]) - contentInset.right), + FLOOR(bezelInset.top), + FLOOR(contentInset.right), + FLOOR(height)); } else if (aName.indexOf("segment-bezel") === 0) { From 4e550a22b003c464952cdc4b6d2daff460b75039 Mon Sep 17 00:00:00 2001 From: daboe01 Date: Sun, 21 Jul 2024 13:30:34 +0200 Subject: [PATCH 2/4] fixed: markdown syntax errors --- README.markdown | 32 +++++++++++++++++--------------- 1 file changed, 17 insertions(+), 15 deletions(-) diff --git a/README.markdown b/README.markdown index ba3540f16..b28c59d87 100644 --- a/README.markdown +++ b/README.markdown @@ -2,11 +2,11 @@ [![Join the chat at https://gitter.im/cappuccino/cappuccino](https://badges.gitter.im/cappuccino/cappuccino.svg)]( https://gitter.im/cappuccino/cappuccino?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) -#Welcome to Cappuccino! +# Welcome to Cappuccino! Cappuccino, a web application framework in Objective-J (*a superset of JavaScript which is transpiled for deployment*), enhances app development by implementing the NeXTSTEP/Apple Cocoa APIs for browsers. Leveraging Cocoa’s well-established architecture, Cappuccino facilitates scalable application development for those usage cases requiring developer productivity, reliability and sophisticated interaction support. Resulting applications are served from any web server and deployed to any modern web browser - without plugins or extensions of any kind. -##Introduction +## Introduction Cappuccino is an open-source framework developed continuously since 2008 and released under the LGPL version 2. It implements as much of the proven NeXTStep/Apple Cocoa API as practical in the modern web browser environment. @@ -37,14 +37,14 @@ For more information, see the Bugs and enhancement requrests can be reported by [creating a Github issue](http://github.com/cappuccino/cappuccino/issues). -##System Requirements +## System Requirements * A minimally HTML5-compliant web browser is the only requirement for running Cappuccino applications. They are served as standard HTML, Javascript, CSS and images from any web server. * Any programmer's editor can be used for coding. * macOS users can use Xcode - which leverages the visual development tools from Apple for creation of complex applications with minimal coding. -##Installation instructions +## Installation instructions To try Cappuccino: 1. Install Node.js and npm from the [Node.js website](https://nodejs.org/download/) or the OS-specific package manager of your choice. Long-term Support (LTS) versions are tested although others will probably work as intended. @@ -117,7 +117,7 @@ To build from source, do: Beware that building and installing Cappuccino from source will overwrite the binaries installed from npm. To undo this, simply run `npm install -g @objj/cappuccino` again. -##FAQs +## FAQs **Q: What is meant by desktop-class apps?** **A:** Desktop-class apps refer to web applications that offer the same level of functionality, complexity, and user experience as traditional desktop applications. These apps leverage advanced user interface components, rich graphics, and responsive interactions. Cappuccino is ideally suited for developing line-of-business applications, which are essential tools used within a company for its operations. Such applications often require robust data handling, complex workflows, and a high degree of reliability. Cappuccino’s comprehensive framework, modeled after the Cocoa APIs, ensures that web applications can match the capabilities and performance of native desktop software. @@ -142,16 +142,18 @@ Here is a summary of the process: 4. **Modify code with no direct equivalent in Objective-J:** The most common is the C language `enum` construct. Javascript and Objective-J provide no direct equivalent - replace with Javascript objects or functions. - **A simple example:** - *Objective-C:* -```NSString *greeting = [NSString stringWithFormat:@"Hello, %@!", name]; -[greeting release];```. - - *Objective-J:* -```let greeting = [CPString stringWithFormat:@"Hello, %@!", name];``` +**A simple example:** - Note: While most of ES2022 is supported, Javascript template literals are not (yet). -Simple concatenation could have been used in the Objective-J example, but conversion would have been less straightforward. `async/await` is supported. +*Objective-C:* +```objc +NSString *greeting = [NSString stringWithFormat:@"Hello, %@!", name]; +[greeting release]; +``` + +*Objective-J:* +```objj +let greeting = [CPString stringWithFormat:@"Hello, %@!", name]; +``` **Q: Can I use Cappuccino on Windows/Linux?** **A:** Yes - while Cappuccino technology is inspired by Apple's Cocoa framework, it is inherently platform-independent. As long as you have a modern web browser and a compatible development environment (An LTS version of Node.js, a text editor, and an http server), Cappuccino applications can be developed on and deployed from other operating systems without any issues. @@ -180,7 +182,7 @@ Simple concatenation could have been used in the Objective-J example, but conver **Q: Does the license permit non-opensource development?** **A:** Yes, Cappuccino is released under the Lesser General Public License (LGPL) version 2. This allows developers to use, modify, and distribute Cappuccino for both open-source and closed-source applications. Commercial and proprietary software can be developed with Cappuccino without the obligation to release source code, provided the terms of the LGPL are adhered to. This means any modifications to the Cappuccino framework itself must be made available under the same LGPL license, but your own application code remains proprietary. -##License +## License This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free From f16b2e82432653af4fae8e2b46aa43b5d6fdb866 Mon Sep 17 00:00:00 2001 From: daboe01 Date: Sun, 21 Jul 2024 13:32:34 +0200 Subject: [PATCH 3/4] Update README.markdown --- README.markdown | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.markdown b/README.markdown index b28c59d87..bfe64f518 100644 --- a/README.markdown +++ b/README.markdown @@ -12,7 +12,7 @@ Cappuccino is an open-source framework developed continuously since 2008 and rel ### Benefits of Cappuccino for Application Development: -- Cross-platform development – any programmer's text editor or IDE is sufficient. The compiler and other parts of the toolchain used to prepare applications for deployment are hosted by Node.js. +* Cross-platform development – any programmer's text editor or IDE is sufficient. The compiler and other parts of the toolchain used to prepare applications for deployment are hosted by Node.js. * Cocoa's rich range of interface controls are abstracted to HTML, CSS, and JavaScript. These go well beyond the functionality provided by current browser standards, and only require minimal HTML5 support. * These design patterns and APIs provide a solid foundation for application development. The APIs have been proven over forty years and provide browser-independent functionality which is a superset of current browser capabilities. * Custom interface controls can reliably build on basic Cocoa controls - when extended or new functionality is required. From 21d4fa5176d920584b54a3e2fee4058cafb0077b Mon Sep 17 00:00:00 2001 From: daboe01 Date: Sun, 21 Jul 2024 13:35:07 +0200 Subject: [PATCH 4/4] Update README.markdown --- README.markdown | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.markdown b/README.markdown index bfe64f518..ce4b02137 100644 --- a/README.markdown +++ b/README.markdown @@ -39,8 +39,8 @@ Bugs and enhancement requrests can be reported by [creating a Github issue](http ## System Requirements -* A minimally HTML5-compliant web browser is the only requirement for running Cappuccino applications. -They are served as standard HTML, Javascript, CSS and images from any web server. +* Any modern web browser can run Cappuccino applications. +* Any web server can serve Cappuccino applications. * Any programmer's editor can be used for coding. * macOS users can use Xcode - which leverages the visual development tools from Apple for creation of complex applications with minimal coding.