Giter VIP home page Giter VIP logo

cappuccino / cappuccino Goto Github PK

View Code? Open in Web Editor NEW
2.2K 71.0 333.0 54.62 MB

Web Application Framework in JavaScript and Objective-J

Home Page: https://cappuccino.dev/

License: GNU Lesser General Public License v2.1

Objective-J 64.07% JavaScript 12.38% C 0.04% HTML 19.36% Ruby 0.24% Objective-C 1.87% Shell 0.20% Python 0.93% Emacs Lisp 0.09% PHP 0.01% Roff 0.48% Gherkin 0.01% Dockerfile 0.01% Rich Text Format 0.01% CSS 0.01% Vim Script 0.29%

cappuccino's Introduction

Build Status Node build status Join the chat at https://gitter.im/cappuccino/cappuccino

Welcome to Cappuccino!

Introduction

Cappuccino is an open source framework that makes it easy to build desktop-caliber applications that run in a web browser.

With Cappuccino, you don't concern yourself with HTML, CSS, or the DOM. You write applications with the APIs from Apple's Cocoa frameworks and the Objective-J language.

Check out a live demo of the widgets in Cappuccino

Check out some tutorials

For more information, see the

Follow @cappuccino on Twitter for updates on the project.

If you discover any bugs, please file a ticket.

System Requirements

To run Cappuccino applications, all you need is a HTML5 compliant web browser.

You can develop Cappuccino applications with only a simple text editor on any platform.

If you are on a Mac, our integration with Xcode leverages the world-class visual development tools from Apple to create complex applications with minimal coding.

Getting Started

To write you first application, download the starter package.

To try our new Node (alpha) version of the Cappuccino framework, check the Node installation instructions

To contribute to Cappuccino, please read here: Getting and Building the Source.

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 Software Foundation; either version 2.1 of the License, or (at your option) any later version.

This library 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 Lesser General Public License for more details.

You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA

cappuccino's People

Contributors

ahankinson avatar aljungberg avatar aparajita avatar appden avatar bedalton avatar blairduncan avatar cacaodev avatar chris-serafin avatar daboe01 avatar didierkorthoudt avatar dogild avatar enquora avatar eventualbuddha avatar ggsato avatar hammerdr avatar kentzo avatar klaaspieter avatar luddep avatar mcf avatar mrcarlberg avatar nickjs avatar paulbaumgart avatar primalmotion avatar stevegeek avatar stewa avatar tbalthazar avatar thewalkingtoast avatar tolmasky avatar vonbirdie avatar walisser avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

cappuccino's Issues

rake test silently fails on syntax errors in tests

In this test

@@@ objj

  • (void) testCanSerializeJSONWithNulls
    {
    [self assert:"null" equals:[CPString JSONFromObject: null ] message:"1"];
    [self assert:null same:[[CPString JSONFromObject: null ] objectFromJSON] message:"2"];
    [self fail:[[CPString JSONFromObject: [ null ] ]];
    [self fail:"[[CPString JSONFromObject: [null] ]"];
    [self assertFalse:true];
    [self assert: [null] same:[[CPString JSONFromObject: [null] ] objectFromJSON] message:"3"];
    [self assert: {foo:null} same:[[CPString JSONFromObject: {foo:null} ] objectFromJSON] message:"4"];
    }
    @@@

the line [self fail:[[CPString JSONFromObject: [ null ] ]]; makes the parser barf and the tests just don’t execute - but no error is shown.

original LH ticket

This ticket has 0 attachment(s).

CPSecureTextField Background is not set

I created a CPSecureTextField and set the backgroundcolor to darkGray

@@@
var passwordText = [[CPSecureTextField alloc]
initWithFrame:CGRectMake(120,40,170,22)];

[passwordText setTextColor:[CPColor blackColor]];
[passwordText setBackgroundColor:[CPColor darkGrayColor]]; 
[passwordText setEditable:YES]; 
[passwordText setTarget:self];

[panelContentView addSubview:passwordText];

@@@

the textfield is not fully painted in darkGray but has a white
center. I used the latest git-release with Safari and Firefox (MacOS Leopard)

original LH ticket

This ticket has 1 attachment(s).

Can't serialize correct JSON

Hi there,

I tried serializing this json

@@@ javascript
var json = {
"basic_properties": [{"rendered": 1, "name": "id", "value": 1, "label": "id"},
{"rendered": "Some summary", "name": "summary", "value": "Some summary", "label": "summary"},
{"rendered": "dwt", "name": "reporter", "value": "dwt", "label": "reporter"},
{"rendered": "dwt", "name": "owner", "value": "dwt", "label": "owner"},
{"rendered": "Some description\r\n\r\n * With formatted list\r\n * of two items\r\n\r\nand a #2 link", "name": "description", "value": "Some description\r\n\r\n * With formatted list\r\n * of two items\r\n\r\nand a #2 link", "label": "description"},
{"rendered": "requirement", "name": "type", "value": "requirement", "label": "type"},
{"rendered": "new", "name": "status", "value": "new", "label": "status"},
{"rendered": "fixed", "name": "resolution", "value": "fixed", "label": "resolution"}],
"calculated_properties": [{"rendered": "2.0", "name": "total_story_points", "value": 2.0, "label": "Total Story Points"},
{"rendered": "n.a.", "name": "roif", "value": null, "label": "Roif"},
{"rendered": "n.a.", "name": "mandatory_story_points", "value": null, "label": "Mandatory Story Points"}],
"type_properties": [{"rendered": "milestone1", "name": "milestone", "value": "milestone1", "label": "milestone"},
{"rendered": "asdf", "name": "keywords", "value": "asdf", "label": "keywords"},
{"rendered": "3000", "name": "businessvalue", "value": "3000", "label": "businessvalue"}],
"in_links": [],
"out_links": [{"id": 2}]
};
// FIXME: somehow the json conversion bombs - not sure why.
[CPString JSONFromObject:json];
@@@

It dies on trying to serialize the _null_ values.

Please fix it. :)

Martin

original LH ticket

This ticket has 2 attachment(s).

steam build failed on macos leopard 10.5.6

hi guys !

after installing 0.6 default version of tools

steam create toto

toto project is created ok

steam build

get an error :

Setting up Rhino utilties
Exception in thread "main" org.mozilla.javascript.JavaScriptException: No project file specified or found. (/Users/tolmasky/Development/Build/steam.build/Release/steam.js#3273)
at steam._c222(Unknown Source)
at steam.call(Unknown Source)
at org.mozilla.javascript.ScriptRuntime.applyOrCall(ScriptRuntime.java:2346)
at org.mozilla.javascript.BaseFunction.execIdCall(BaseFunction.java:282)
at org.mozilla.javascript.IdFunctionObject.call(IdFunctionObject.java:129)
at org.mozilla.javascript.optimizer.OptRuntime.call2(OptRuntime.java:76)
at steam._c219(Unknown Source)
at steam.call(Unknown Source)
at org.mozilla.javascript.ScriptRuntime.applyOrCall(ScriptRuntime.java:2346)
at org.mozilla.javascript.BaseFunction.execIdCall(BaseFunction.java:282)
at org.mozilla.javascript.IdFunctionObject.call(IdFunctionObject.java:129)
at org.mozilla.javascript.optimizer.OptRuntime.call2(OptRuntime.java:76)
at steam._c0(Unknown Source)
at steam.call(Unknown Source)
at org.mozilla.javascript.ContextFactory.doTopCall(ContextFactory.java:401)
at org.mozilla.javascript.ScriptRuntime.doTopCall(ScriptRuntime.java:3003)
at steam.call(Unknown Source)
at steam.exec(Unknown Source)
at org.mozilla.javascript.optimizer.OptRuntime$1.run(OptRuntime.java:252)
at org.mozilla.javascript.Context.call(Context.java:499)
at org.mozilla.javascript.ContextFactory.call(ContextFactory.java:511)
at org.mozilla.javascript.optimizer.OptRuntime.main(OptRuntime.java:240)
at steam.main(Unknown Source)

i checked the tickets but found nothing.

original LH ticket

This ticket has 0 attachment(s).

Certain regular expressions break the parser

Hi there,

I am trying to use Douglas Crockfords javascript json implementation at http://www.JSON.org/json2.js

(I am trying to reproduce another bug in the json component of cappuccino)

The problem is, that when @import this file with @import "json2.js" my unittests fail with this error message

json2.js
*** Expected ’]’ - Unterminated message send or array.
OBJJ EXCEPTION: *** Expected ’]’ - Unterminated message send or array.
Name: OBJJParseException
Message: undefined
File: undefined
Line: undefined

I haven’t yet reduced this to why it fails - but I suspect some of the more complex Regexes in there might be the source of the problem.

Please fix it!

Regards,
Martin

original LH ticket

This ticket has 0 attachment(s).

nib2cib blows up on NSSecureTextFields

If an empty NSSecureTextField is in a nib file nib2cib blows up on that and doesn't generate a good output.

A workaround for this seems to be to enter something as a placeholder in the NSSecureTextField - then nib2cib works.

Changes needed in "Learning Objective-J" web page

On the tutorial page "Learning Objective-J" http://cappuccino.org/learn/tutorials/objective-j-tutorial.php). I suggest the following three changes. Line numbers given below are from a "view-source" of the page in Firefox 3.0.9

  1. line 108:
    "To end a class declaration, add they keyword @EnD." should read "To end a class declaration, add the keyword @EnD".

  2. line 138:
    "In Objective-J, method name’s are split" should read "In Objective-J, method names are split".

  3. line 148:
    "Since method’s aren’t first" should read "Since methods aren’t first".

--Bill

original LH ticket

This ticket has 0 attachment(s).

Missing link to tutorial image

Within part 1 of the scrapbook tutorial (http://cappuccino.org/learn/tutorials/scrapbook-tutorial-1/), the following text block:

For now we are just going to use a default image for our pane, which
you can download here and put into a folder called "Resources".

doesn’t actually link to the image in question, which can be found at:
http://cappuccino.org/learn/tutorials/scrapbook-tutorial-1/Scrapbook/Resources/sample.jpg

original LH ticket

This ticket has 0 attachment(s).

CPURLConnection and CPWebView seem to collide

In my app I use CPURLConnection to load XML data from the server. When I then display a CPWebView for some file, the next time I use CPURLConnection fails and send the following to the console: "TypeError: Result of expression ’aReceiver.isa’ [undefined] is not an object."

original LH ticket

This ticket has 0 attachment(s).

CPTextField's 'controlTextDidChange:' delegate doesn't work

Looks like providing controlTextDidChange: method by CPTextField’s delegate doesn’t work as expected as delegation is not being sent at all.

It is caused by CPTextField not updating the current value (stringValue) while editing. Once fixed (see attachment) it started working but required another fix as then the control’s static text were shown under the input field.

I’ve proposed a solution to this (hiding static text field while editing) but somebody may come up with a better approach.

original LH ticket

This ticket has 2 attachment(s).

CPSplitView doesn't honor splitView:constrainMinCoordinate:ofSubviewAt: when resizing window

If I have the following method in a CPSplitView delegate:

@@@

  • (int)splitView:(CPSplitView)splitView constrainMinCoordinate:(int)minCoord ofSubviewAt:(int)index
    {
    if (index == 0) {
    return 200;
    }
    else {
    return minCoord;
    }
    }
    @@@

it correctly keeps the subview at index 0 from ever being less than 200 pixels wide when moving the splitter around.

But if I resize the window and make the window smaller, the subview does get resized with a width less than 200 pixels...

I added a log message to the above method to check whether it ever gets called. When resizing the window, the method never gets called. It gets called plenty when moving the splitter.

original LH ticket

This ticket has 1 attachment(s).

capp only copies frameworks

This will become a problem as soon as a new version of the framework doesn’t contain files it used to contain.

So if you update a project with capp -f to the new framework version it will contain junk.

Not sure what the best way to achieve this would be, but it would need to be some sort of sync (that leaves .svn directories intact of course where needed).

Regards,
Martin

original LH ticket

This ticket has 0 attachment(s).

Exception for CPSecureTextField set to isEditable: YES

When I create a CPSecureTextField with setEditable: YES (so it acceptsFirstResponder), Safari 3.2.1 and WebKit 5525.27.1 will throw a "NO_MODIFICATION_ALLOWED_ERR: DOM Exception 7" the moment onblur is called.

onblur is defined in CPTextField’s becomeFirstResponder method. In the onblur function definition, setObjectValue is being called.

setObjectValue tries to set _DOMTextElement.innerText to displayString, if CPFeatureIsCompatible(CPJavascriptInnerTextFeature) returns true. It does, and the setting of innerText then throws the exception.

Since this only happens for input elements with type set to password (CPSecureTextField, that is) and I haven’t checked with other browsers, I’m not sure what to do. A quick fix would be to check for _DOMTextElement.type != "password", ANDing it with the CPFeatureIsCompatible(CPJavascriptInnerTextFeature) check.

But I doubt that would be clean. Since I’m not familiar with CPCompatibility, someone more knowledgable in this regard should look into how to fix this.

What I want to do is have the password field call an action on a target to process a login when hitting the return key. I couldn’t get this to work without setEditable set to YES.

original LH ticket

This ticket has 1 attachment(s).

two bugs in cib loading

It does not conform closely to the mac os x specification

a. -initWithCibNamed:bundle: doesn’t allow names without .cib (it should auto add that) and it doesn’t use the bundle to look the file up

b. -instantiateCibWithOwner:topLevelObjects: doesn’t create a name table from the inputs and is thus quite unusable.

Patch included.

Regards,
Martin

original LH ticket

This ticket has 1 attachment(s).

typo in CPTableView.j

In method:-

  • (void)removeTableColumn:(CPTableColumn)aTableColumn

it says:-
[_tabelColumnViews removeObjectAtIndex:index];

’tabel’ instead of ’table’

original LH ticket

This ticket has 0 attachment(s).

Press broken in 0.7b

Like the title says: running press in 0.7b results in an app that will "churn" in the browser until you get a "slow script" error. Errors are reported in the shell when running the command, but they don’t provide any useful info:

press /Users/johnfox/Dev/Test/MemoryMiner/Web-Sandbox/AIRTest2 /Users/johnfox/Dev/Test/MemoryMiner/Web-Sandbox/AIRTest2-C --flatten
2009-03-20 14:51:15.217 Cappuccino [info]: Application root: /Users/johnfox/Dev/Test/MemoryMiner/Web-Sandbox/AIRTest2
2009-03-20 14:51:15.225 Cappuccino [info]: Output directory: /Users/johnfox/Dev/Test/MemoryMiner/Web-Sandbox/AIRTest2-C
2009-03-20 14:51:15.236 Cappuccino [info]: Main file: /Users/johnfox/Dev/Test/MemoryMiner/Web-Sandbox/AIRTest2/main.j
2009-03-20 14:51:15.238 Cappuccino [info]: Frameworks: /Users/johnfox/Dev/Test/MemoryMiner/Web-Sandbox/AIRTest2/Frameworks
2009-03-20 14:51:15.458 Cappuccino [error]: PHASE 1: Loading application...
2009-03-20 14:51:18.901 Cappuccino [error]: PHASE 2: Walk dependency tree...

2009-03-20 14:51:37.300 Cappuccino [error]: PHASE 3a: Flattening...

2009-03-20 14:51:37.512 Cappuccino [error]: PHASE 4: copy to output

original LH ticket

This ticket has 0 attachment(s).

CPSecureTextField erasing content in FireFox 3.0.6

CPSecureTextField erases the content a user has entered in FireFox 3.0.6.

To reproduce:

  1. Select the secure textfield but do not move the mouse after the selection!
  2. Enter text.
  3. Move the mouse.

The content in the DOM element for the text field will then be erased. Upon calling resignFirstResponder the error will propogate to the CPSecureTextField’s object/string value.

Appears to be a problem with certain selectors not being performed, as a hackish solution forcing [[CPRunLoop currentRunLoop] performSelectors] at the end of CPTextField’s becomeFirstResponder method alleviates the problem.

original LH ticket

This ticket has 0 attachment(s).

Floating panels unmovable

How do you move - or even close - a floating panel when you have made a fool of yourself and positioned it as I have in the attached picture?

I am no (good anyway) programmer, but in my mind there are two possible user friendly solutions:

  1. Make all unused canvas area for a floating panel draggable
  2. Make the floating panel bump back to Y-axis zero position when placed in a negative Y-axis value position...If that I just wrote makes any sense, I don’t know...

This was probably the worst. Ticket. Ever. If so - my apologies.

original LH ticket

This ticket has 1 attachment(s).

index-debug.html raises 404

The problem occurs while looking for Objective-J.js in the debug directory. Full output below:

No file exists at the address
“/Volumes/Local/Source/Staff/aburkhalter/experimental/capapp/trunk/OmniFocus/Frameworks/Debug/Objective-J/Objective-J.js”.

To reproduce:

$ capp blah; cd blah; open index-debug.html

While I haven’t read much documentation steering the cappuccino developer to use index-debug.html, as I did, I think it’s natural for someone getting going to use this (e.g. debug = good). The template in question is found in:
/path/to/cappuccino/checkout/Tools/capp/Templates/Application

I’d propose a patch, but don’t have a solid enough understanding of what’s envisioned with and how that might change in 0.7b.

original LH ticket

This ticket has 0 attachment(s).

CPTextField focus doesn't work through different windows

The new focus rings are great. But, if you have a text field in one window (for example, the menu bar), and another text field in another window, there is an issue. Focus the first text field in the menu bar. Then, while it is still focused, focus the second text field in the other window. Both of them will now be "focused", with focus rings, and neither (sometimes one) will allow input.

original LH ticket

This ticket has 1 attachment(s).

CPToolbaritems don't alternate their icon when pressing label

The ’normal’ behavior of a Cocoa/Mac toolbar when clicking a toolbar item on it’s label is to alternate the corresponding icon/image, giving feedback to the user. This does not happen yet in Cappuccino.

I have quickly glanced over the code of CPToolbarItem and saw that both the view (the image) and the label are both set to the same target and action. Resulting in the image not ’seeing’ the label being pushed.

a strategy could be to wrap the target and action call and within the wrapper make sure to also ’press’ the image when only the label is clicked.

original LH ticket

This ticket has 0 attachment(s).

longer than 100 characters.

When running ant on the last git revision I have BUILD SUCCESSFUL but with this message for a bunch of files.

[tar] Entry: objj/lib/Frameworks/AppKit/Resources/CPScroller/CPScrollerIncrementArrowVerticalSmallHighlighted.png longer than 100 characters.

Unsure if it’s important so I prefer to report it.

original LH ticket

This ticket has 0 attachment(s).

-hash is broken on CPArray

It breaks the contract that two arrays which are -isEqual: also need to report the same -hash value.

Patch and tests included

It’s also the same way that GnuStep and Cocotron implement this - I was quite surprised how simple they implemented it.

:)

original LH ticket

This ticket has 1 attachment(s).

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.