mirror of
https://github.com/cappuccino/cappuccino.git
synced 2026-11-21 14:09:22 +00:00
Merge branch 'master' of git@github.com:280north/cappuccino
This commit is contained in:
commit
dad6d613e6
5 files changed
+60
-21
No files matched your search
@@ -49,6 +49,8 @@ CPJavaScriptShadowFeature = 1 << 20;
|
||||
|
||||
CPJavaScriptNegativeMouseWheelValues = 1 << 22;
|
||||
|
||||
CPOpacityRequiresFilterFeature = 1 << 23;
|
||||
|
||||
var USER_AGENT = "";
|
||||
|
||||
PLATFORM_ENGINE = CPUnknownBrowserEngine,
|
||||
@@ -74,6 +76,8 @@ else if (window.attachEvent) // Must follow Opera check.
|
||||
PLATFORM_FEATURES |= CPVMLFeature;
|
||||
PLATFORM_FEATURES |= CPJavascriptRemedialKeySupport;
|
||||
PLATFORM_FEATURES |= CPJavaScriptShadowFeature;
|
||||
|
||||
PLATFORM_FEATURES |= CPOpacityRequiresFilterFeature;
|
||||
}
|
||||
|
||||
// WebKit
|
||||
|
||||
@@ -460,10 +460,15 @@ var _CPTextFieldSquareBezelColor = nil;
|
||||
else if (aValue)
|
||||
displayString += aValue;
|
||||
|
||||
if (CPFeatureIsCompatible(CPJavascriptInnerTextFeature))
|
||||
_DOMTextElement.innerText = displayString;
|
||||
else if (CPFeatureIsCompatible(CPJavascriptTextContentFeature))
|
||||
_DOMTextElement.textContent = displayString;
|
||||
if ([[self window] firstResponder] == self)
|
||||
[[self class] _inputElement].value = displayString;
|
||||
else
|
||||
{
|
||||
if (CPFeatureIsCompatible(CPJavascriptInnerTextFeature))
|
||||
_DOMTextElement.innerText = displayString;
|
||||
else if (CPFeatureIsCompatible(CPJavascriptTextContentFeature))
|
||||
_DOMTextElement.textContent = displayString;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
+9
-4
@@ -934,12 +934,17 @@ var DOMElementPrototype = nil,
|
||||
_opacity = anAlphaValue;
|
||||
|
||||
#if PLATFORM(DOM)
|
||||
_DOMElement.style.opacity = anAlphaValue;
|
||||
|
||||
if (anAlphaValue == 1.0)
|
||||
try { _DOMElement.style.removeAttribute("filter") } catch (anException) { }
|
||||
if (CPFeatureIsCompatible(CPOpacityRequiresFilterFeature))
|
||||
{
|
||||
if (anAlphaValue == 1.0)
|
||||
try { _DOMElement.style.removeAttribute("filter") } catch (anException) { }
|
||||
else
|
||||
_DOMElement.style.filter = "alpha(opacity=" + anAlphaValue * 100 + ")";
|
||||
}
|
||||
else
|
||||
_DOMElement.style.filter = "alpha(opacity=" + anAlphaValue * 100 + ")";
|
||||
_DOMElement.style.opacity = anAlphaValue;
|
||||
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
+26
-3
@@ -366,17 +366,40 @@ var CPStringHashes = new objj_dictionary();
|
||||
}
|
||||
|
||||
/*
|
||||
Returns a new string in which all occurrences of a target string in a specified range of the receiver
|
||||
are replaced by another given string.
|
||||
@param target The string to replace
|
||||
@param replacement the string with which to replace the <pre>target<pre>
|
||||
@param options A mask of options to use when comparing <pre>target<pre> with the receiver. Pass 0 to specify no options
|
||||
@param searchRange The range in the receiver in which to search for <pre>target<pre>.
|
||||
*/
|
||||
|
||||
- (CPString)stringByReplacingOccurrencesOfString:(CPString)target withString:(CPString)replacement options:(int)options range:(CPRange)searchRange
|
||||
{
|
||||
//TODO :Vijay implement the method
|
||||
var start = substring(0, searchRange.location),
|
||||
stringSegmentToSearch = substr(searchRange.location, searchRange.length),
|
||||
end = substring(searchRange.location + searchRange.length, self.length),
|
||||
regExp;
|
||||
|
||||
if (options & CPCaseInsensitiveSearch)
|
||||
regExp = new RegExp(target, "gi");
|
||||
else
|
||||
regExp = new RegExp(target, "g");
|
||||
|
||||
return start + '' + stringSegmentToSearch.replace(regExp, replacement) + '' + end;
|
||||
}
|
||||
|
||||
/*
|
||||
Returns a new string in which the characters in a specified range of the receiver
|
||||
are replaced by a given string.
|
||||
@param range A range of characters in the receiver.
|
||||
@param replacement The string with which to replace the characters in <pre>range</pre>.
|
||||
*/
|
||||
|
||||
- (CPString)stringByReplacingCharactersInRange:(CPRange)range withString:(CPString)replacement
|
||||
{
|
||||
//TODO :Vijay implement the method
|
||||
return '' + substring(0, range.location) + replacement + substring(range.location + range.length, self.length);
|
||||
}
|
||||
*/
|
||||
|
||||
|
||||
// Identifying and comparing strings
|
||||
|
||||
+12
-10
@@ -1,4 +1,3 @@
|
||||
|
||||
***********************************************************************
|
||||
* Working with Text Editors
|
||||
***********************************************************************
|
||||
@@ -41,10 +40,9 @@ This will load the obj-j syntax highlighting when you open files ending in .j
|
||||
***********************************************************************
|
||||
|
||||
1. Navigate to Tools (the directory containing this README).
|
||||
2. Enter "chmod +x install-tools"
|
||||
3. Enter "sudo sh ./install-tools"
|
||||
4. Once installation is complete, you will be presented with a list of
|
||||
options that looks something like this:
|
||||
2. Enter "sudo sh install-tools"
|
||||
3. Once installation is complete, you will be presented with a list of
|
||||
options that looks something like this:
|
||||
|
||||
Installation of the Objective-J tools to /usr/local is almost complete!
|
||||
|
||||
@@ -54,7 +52,7 @@ This will load the obj-j syntax highlighting when you open files ending in .j
|
||||
|
||||
export PATH=$PATH:/usr/local/bin
|
||||
|
||||
(currently: /bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/bin:/Users/tolmasky/Development/Cappuccino/Tools/Scripts/:/usr/local/bin:/opt/local/bin:/opt/bin:/Users/tolmasky/bin)
|
||||
(currently: /bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/bin:/usr/local/bin:/opt/local/bin:/opt/bin:/Users/tolmasky/bin)
|
||||
|
||||
- OBJJ_HOME should be set to /usr/local/share/objj:
|
||||
|
||||
@@ -68,8 +66,8 @@ This will load the obj-j syntax highlighting when you open files ending in .j
|
||||
|
||||
(currently: )
|
||||
|
||||
5. Chances are you can ignore the first two options. If you chose to install everything to the default location, it should work fine without further modification.
|
||||
6. Steam (see below) allows you to specify a global Build directory. If you wish to use it, you must set the STEAM_BUILD environment variable. Building Cappuccino from source requires this for example.
|
||||
4. Chances are you can ignore the first two options. If you chose to install everything to the default location, it should work fine without further modification.
|
||||
5. Steam (see below) allows you to specify a global Build directory. If you wish to use it, you must set the STEAM_BUILD environment variable. Building Cappuccino from source requires this, for example.
|
||||
|
||||
**********************************************************************
|
||||
* objj
|
||||
@@ -81,10 +79,14 @@ objj is a command line Objective-J interpreter and interactive console.
|
||||
* objjc
|
||||
**********************************************************************
|
||||
|
||||
objjc is a static preinterpreter for Objectie-J. It will take Objective-J files and essentially convert them to JavaScript. However, for complex interaction between files, you will probably want to use steam (see below).
|
||||
objjc is a static preinterpreter for Objectie-J. It will take Objective-J files and essentially convert them to JavaScript. However, for complex interaction between files, you will probably want to use steam (see below).
|
||||
|
||||
***********************************************************************
|
||||
* steam
|
||||
***********************************************************************
|
||||
|
||||
Steam is a simple tool for managing Objective-J projects. Among other things, it allows you to statically pre-interpret entire Objective-J applications so that you can deliver it without requiring client-side pre-interpretation.
|
||||
Steam is a simple tool for managing Objective-J projects. Among other things, it allows you to statically pre-interpret entire Objective-J applications so that you can deliver it without requiring client-side pre-interpretation.
|
||||
|
||||
steam create path - This will create a new Cappuccino application at the specified path. The resulting project contains a basic Cappuccino application as well as Objective-J and the preprocessed Cappuccino frameworks.
|
||||
|
||||
steam build [options] - This builds an application or framework.
|
||||
Reference in new issue
Block a user