Commit Graph
700 Commits
Author SHA1 Message Date
Alexandre Wilhelm acb9931fe6 Fixed: not possible to to synchrone request and set a timeout 2015-08-14 13:28:27 -07:00
Alexandre Wilhelm d4b035ac1a Fixed: style in CPURLConnection.j CPURLRequest.j CFHTTPRequest.js 2015-08-14 12:40:22 -07:00
Alexandre Wilhelm bd0bd2e087 New: added timeout and cache feature in CPURLRequest
This PR adds the possibility to set the timeout and the cache policy of a CPURLRequest.
For that, there are new things in the framework :

- CFHTTPRequest has now the functions setTimeout(), getTimeout() and isTimeoutRequest
- CPURLRequest has now the methods +requestWithURL:cachePolicy:timeoutInterval: and -initWithURL:cachePolicy:timeoutInterval:
- CPURLConnection does not call the delegate didReceiveData: when a request has timed out. I will call the delegate didFailWithError:
- Cache is now possible for a CPURLRequest, only CPURLRequestReturnCacheDataElseLoad, CPURLRequestReturnCacheDataDontLoad and CPURLRequestReloadIgnoringLocalCacheData are supported. By default CPURLRequestReloadIgnoringLocalCacheData.
- Default timeout has been set to 60sec as in cocoa.
- A request is considered as timeout when there isn't any response (text/xml/type) and when the status of the response is 0.
2015-08-13 17:08:59 -07:00
Alexandre Wilhelm d358f0d27b Fixed: xml format now has the key sourcePath instead of path for the command objj and objj2objcskeleton 2015-06-08 10:30:54 -07:00
Alexandre Wilhelm 128a243166 Merge branch 'master' of https://github.com/cappuccino/cappuccino 2015-06-01 13:53:56 -07:00
Alexandre Wilhelm 0e41365020 Fixed: some objj errors were not print in xml when necessary 2015-06-01 13:53:41 -07:00
Alexandre Wilhelm 5bba109873 Merge pull request #2346 from primalmotion/fix-popen
FIXED: Closes all streams after a OS.popen()
2015-05-27 15:25:36 -07:00
Alexandre Wilhelm 5095620005 Fixed: changed --xml-output-format to --xml in objj 2015-05-27 11:46:43 -07:00
Alexandre Wilhelm abcdc0875c Fixed: added option -x for objj and changed xml-output-format to --xml 2015-05-27 11:12:36 -07:00
Alexandre Wilhelm 3102c545ce Fixed: used url path (/Users/..) instead of absoluth path (file://Users/..) in the xml output format of objj 2015-05-25 13:26:37 -07:00
Alexandre Wilhelm f232b327c0 Fixed: issue with options --objj-include-paths and --multifiles. Long options were not taken 2015-05-25 11:38:16 -07:00
Alexandre Wilhelm 204ed1f257 New: added the option --xml-output-format for the command objj
Previously, it was not possible to specify the desired output format of the command objj.
Now we can have either the default format or a xml format if --xml-output-format is added.
2015-05-25 11:20:55 -07:00
Antoine Mercadal c603326e58 Use try/finally to ensure popen streams are always closed 2015-05-09 10:22:13 -07:00
Antoine Mercadal bcb1630f20 FIXED: Closes all streams after a OS.popen()
Previously, when popen was called, the 3 streams (stdin, stderr and stdourt) where never closed. This was the reason of the having an impossible number of open files.

This patch ensure all streams are closed after using them. This means that the ulimit trick is no more necessary
2015-04-23 16:46:01 -07:00
Martin Carlberg a924fd0e7e Fixed: Generate compiler error when ivar is already declared in superclass 2015-03-03 11:32:18 +01:00
Antoine Mercadal eb883bc51e Merge pull request #2272 from ahankinson/new-fixed-with-credentials-cpurl
Rework of withCredentials, CPURLRequest, and CPURLConnection
2015-01-14 11:51:14 -08:00
Antoine Mercadal d3490f6a2e Merge pull request #2243 from ahankinson/new-CFError-CPError
New: CFError and Updated CPError
2015-01-08 17:33:31 -08:00
Andrew Hankinson d1917db47e Fixed: Reworked withCredentials for XMLHTTPRequests
Previously, the withCredentials parameter was accessed primarily through the CPURLConnection, which gave limited access to changing the request before it was sent off.

This commit removes withCredentials from CPURLConnection and places it on CPURLRequest so that it may be more easily modified prior to sending the request. This also simplifies the logic in CPURLConnection for creating and establishing connections with credentials.

In this commit, all CFHTTPRequests are assumed to not use withCredentials unless they are explicitly set. Setting [aURLRequest withCredentials] will set the withCredentials property on the underlying XMLHTTPRequest prior to the connection being opened.
2014-12-04 15:29:52 -05:00
Andrew Hankinson 526e0725d8 Merge branch 'new-CFError-CPError' of github.com:ahankinson/cappuccino into new-CFError-CPError 2014-12-02 12:51:25 -05:00
Andrew Hankinson 7e4e0567ef Merge branch 'refs/heads/master' into new-CFError-CPError 2014-12-02 12:51:14 -05:00
Martin Carlberg ee13978115 Fixed: @ref did not generate self.x for an ivar x 2014-12-02 13:54:02 +01:00
Alexander Ljungberg b2557c38dd Merge pull request #2266 from zittix/patch-2
Docs: fixed bootstrap.sh URL due to github URL change
2014-11-28 23:20:59 +00:00
Antoine Mercadal 31afae71d1 Typos 2014-11-26 11:52:25 -08:00
Alexander Ljungberg 81e6c5c2fa Merge branch 'master' of github.com:cappuccino/cappuccino 2014-11-26 11:07:57 +00:00
Alexander Ljungberg e9f73cbb45 Minor formatting. 2014-11-26 11:07:48 +00:00
Andrew Hankinson b1d56924e6 Fixed: Formatting 2014-11-25 17:56:04 -05:00
Andrew Hankinson 85d80e7ca0 Merge branch 'refs/heads/master' into new-CFError-CPError 2014-11-25 17:51:41 -05:00
Antoine Mercadal 37b9895878 Add check to ensure a @class declaration is not already defined as a type 2014-11-20 11:44:32 -08:00
Antoine Mercadal 9e66c699e1 FIXED: prevent to declare a type that is already declared as a class and vice-versa 2014-11-19 14:35:33 -08:00
Andrew Hankinson 3c092f36cb Merge branch 'refs/heads/master' into new-CFError-CPError 2014-11-06 14:34:30 -05:00
Antoine Mercadal 8ee443a43c NEW: @typedef and ivar type warning
Previously, ObjJ was ignoring unknow ivar type. This patch adds some check to ensure the type is either a known class, the current class
itself, a global, a basic JS type or a declared custom type.

In order to declare custom types, this patch introduces the @typedef keyword.

For instance, this will throw a warning:

```objj
@import <Foundation/Foundation.j>

@implementation MyClass: CPObject
{
    NUSuppaType mode;
}
@end
```

This will not:

```objj
@import <Foundation/Foundation.j>

@typedef NUSuppaType

@implementation NUMyClass: CPObject
{
     NUSuppaType mode;
}
@end
```

Declared types are shared accross all application, one type can only be declared once.
2014-11-06 10:10:05 -08:00
Antoine Mercadal b028e62731 Merge pull request #2248 from Dogild/OBJJEnhancement
New: new options for the command objj
2014-11-05 19:03:36 -08:00
Alexandre Wilhelm 97a65059e5 Fixed: when using the option -m, objj doesn't process every files in a error is raised, now it does 2014-11-05 11:12:17 -08:00
Alexandre Wilhelm ad82b0064a Fixed: added options -m for objj. This option allows you to make objj on several files 2014-11-04 13:23:54 -08:00
Alexandre Wilhelm 4d77e7dd6b Fixed: fixed issue with press, capp and nib2cib with the new command objj 2014-11-03 19:54:35 -08:00
Alexandre Wilhelm 5678fe3b83 Fixed: change option -p in objj by bash concept -- 2014-11-03 18:12:47 -08:00
Alexandre Wilhelm f74888419c Fixed: part of the code missing after the previous commit refs #f21dcb8265d78683f984aa70014e1fb91a191ae7 2014-11-03 15:33:37 -08:00
Alexandre Wilhelm f21dcb8265 New: Added option --parser/-p to the command objj
Previously it wasn't possible to specify a custom parser for the command objj. This is needed for xCodeCapp
2014-11-03 15:25:47 -08:00
Alexandre Wilhelm 5bd07716eb New: new options for the command objj
This pull requests adds the following feature for the command objj:

- Option -h or --help to get the help of the command
- Option -I or --objj-include-paths to specify the frameworks to be used
- Possibility to pass several files to the command, for example objj AppController.j Test.j
2014-11-03 14:49:25 -08:00
Andrew Hankinson 0038eab6ab Add CFError and CFNetworkErrors to the Includes list 2014-11-01 08:59:35 -04:00
Andrew Hankinson a34e8fbc9a Fixed method calls for global CFError methods 2014-11-01 08:59:10 -04:00
Antoine Mercadal 64a15db791 NEW: Environment variable to disable CommonJS environement building
This patch allows user to disable the commonJS build phase by setting the system environement variable IGNORE_ENV_COMMONJS.

For instance `export IGNORE_ENV_COMMONJS=1`
2014-10-31 18:39:55 -07:00
Andrew Hankinson 49cb446f8b New: Initial commit of CFNetworkErrors file
This commit adds constants for CFURL Errors to enable cross-compatibility with the Cocoa CF and CPURL error reporting functions
2014-10-31 17:15:52 -04:00
Andrew Hankinson 82c32d7dee New: Implementation of the CoreFoundation CFError
This commit adds an implementation of the CoreFoundation CFError classes and functions.
2014-10-31 17:14:55 -04:00
Antoine Mercadal 73a2823d0b Merge pull request #2213 from mrcarlberg/error_cannot_find_protocol_declaration
Fixed: When the compiler can't find a protocol in a class declaration
2014-09-30 16:56:36 -07:00
Martin Carlberg 2f7681f881 Fixed: No line information was provided for compiler errors on the first line of a file 2014-09-26 13:28:44 +02:00
Martin Carlberg 13fe318110 Fixed: When the compiler can't find a protocol in a class declaration it now gives an understandable error.
This fixes #2212
2014-09-16 20:13:42 +02:00
Antoine Mercadal a5e39d1db3 Revert "Merge pull request #2158 from mrbannon/master"
This reverts commit 228a95f776, reversing
changes made to cf93b72edd.
2014-09-04 18:17:15 -07:00
Antoine Mercadal 371b660b33 Merge pull request #2072 from mrcarlberg/fix_accessors_in_categories_fails
Fixed: Ivars with accessors in a Category failed with duplicate ivar error
2014-09-04 14:02:53 -07:00
Ryan Bannon d629a13499 Fix: https://github.com/cappuccino/cappuccino/issues/2157
Possible bug in XMLHTTPRequest.  Thanks to hmsimmonds for locating the following:

http://connect.microsoft.com/IE/feedback/details/795580/ie11-xmlhttprequest-incorrectly-throws-invalidstateerror-when-setting-responsetype

https://github.com/enyo/dropzone/issues/179

In short, setting the "withCredentials" flag must be done after open().
2014-07-23 16:58:02 -04:00