Commit Graph
19 Commits
Author SHA1 Message Date
daboe01andGitHub 17136d23f9 NEW: for..of iterator for CPDictionary (#3113) 2025-09-25 07:27:17 +02:00
cacaodevandGitHub 462a18930b Revert "New: Support to compile deep structured project in the web browser" 2022-03-17 21:07:16 +01:00
Martin Carlberg 6094d25cfb New: Support to compile deep structured project in the web browser
A Cappuccino project has always needed to have a flat file structure to
be able to compile from source in the web browser.

A new dictionary can be added to the project's Info.plist with the key
'CPFileTranslationDictionary'. It should contain all the path
translations in the project to allow the Browser to find out where in
the file structure the source files are. Check in the AppKit framework
for an example.

Also, a include list can be added in the Info.plist for the key
'CPCompileIncludeFileArray'. The file in the list will be included
by a '#include' statement for each file that is compiled in this project

A last new feature is to add macros in the 'OBJJ_COMPILER_FLAGS' global
variable. It is usually declared in the index.html file. It is done
with the format '-Dmacroname[=macrodefinition]'.

An updated Info.plist file in the AppKit framework will allow the AppKit
to compile from the source in the web browser. The following things is
needed to get this to work:

1. Replace the AppKit folder in your project's Frameworks folder with a
copy of the AppKit folder from the Cappuccino project.
2. Add a copy of the built Aristo2.blend folder to the AppKit's Resource
folder.
3. Add "-DPLATFORM_DOM", "-DPLATFORM_BROWSER" and optionally "-DDEBUG"
to the global variable 'OBJJ_COMPILER_FLAGS' in the project's index.html
file.

The app load time will increase (about 3 seconds on a 2018 MacBook Pro)
as the AppKit framework is compiled from source.

The Foundation framework is not yet tested but it might be working by
adding info about the file structure in the Info.plist file.
2020-12-21 11:14:36 +01:00
Martin CarlbergandGitHub 7dc77ed609 Fixed: Make sure we handle undefined when testing for nil values (#2862) 2020-01-31 13:43:58 +01:00
Alexander Ljungberg 4b7cef637b Refs #1538. Reapply formatting. 2012-05-14 21:21:45 +01:00
Martin Carlberg 0abd9855c2 Moved new description functionallity from CFDictionary to CPDictionary.
Added testcase for both CPDictionary and CPArray. Fixed failing testcase.
Checked all new code with capp_lint for correct formatting.
2012-05-14 10:14:05 +02:00
Martin Carlberg 4af27541d0 Clean-up 2012-05-11 23:33:37 +02:00
Martin Carlberg 70182a0ea2 Description methods in CPArray and CPDictionary will display JavaScript object attributes instead of displaying [Object object]
Don't you hate when your logs of arrays and dictionaries display [Object object] when you have JavaScript objects in them.
Now with this patch all JavaScript objects will be display with all attributes in a nice good looking way. Log CGRect, CGPoint
and other JavaScript objects withour any hassle anymore. For example: console.log([myRect]);
2012-05-11 17:40:11 +02:00
Alexander Ljungberg 20ae47971c Missing semicolons. 2011-12-06 22:43:00 +00:00
Alexander Ljungberg 50e5fa2c8e Fix accidental globals. 2011-03-01 00:02:35 -03:00
Francisco Ryan Tolmasky I fbd23fb2c3 Removed unecessary var.
Reviewed by me.
2010-05-24 15:45:54 -07:00
Paul BaumgartandFrancisco Ryan Tolmasky I 252b258159 fix CFDictionary.containsValue and CFDictionary.countOfValue and add tests to prove it 2010-05-24 15:45:21 -07:00
Francisco Ryan Tolmasky I 961628d8d3 Fix for count global and also cleaned up display names in CFDictionary.
Reviewed by me.
2010-03-07 17:53:44 -08:00
Francisco Ryan Tolmasky I 64a401125d Further performance improvements and better debug values for CFDictionary and CFMutableDictionary.
Reviewed by me.
2010-03-07 12:49:37 -08:00
Francisco Ryan Tolmasky I 20637fc5e0 Added missing licenses and removed a bit of unused code.
Reviewed by me.
2010-02-21 13:52:51 -08:00
Francisco Ryan Tolmasky I 841ed9ea89 Major cleanup of globals and exports. Removed many accidental globals and no more need for eval in the initialization process. Also fixes Theme Showcase.
Reviewed by me.
2010-02-20 01:04:17 -08:00
Francisco Ryan Tolmasky I bc53288fca Fix for failing CPAttributedString test.
Reviewed by me.
2010-02-13 16:14:18 -08:00
Francisco Ryan Tolmasky I 0bcf8a6626 Trailing comma fix.
Reviewed by me.
2010-01-30 01:14:32 -08:00
Francisco Ryan Tolmasky I 4b7310d0cb More consistent naming scheme.
Reviewed by me.
2010-01-29 15:16:22 -08:00