Permalink
Browse files

Number formatting sample code

  • Loading branch information...
1 parent 3d83fb0 commit 18da0efba3185b8d97c470ba62519e7d535b70fc @groue committed Mar 5, 2012
View
@@ -21,18 +21,15 @@ What you get
**Compatibility with previous GRMustache versions**: update GRMustache, enjoy [performance improvements](https://github.com/groue/GRMustacheBenchmark) and bugfixes, and don't change a line of your code. You may get harmless deprecation warnings, though. Check the [release notes](GRMustache/blob/master/RELEASE_NOTES.md).
-**Documentation**: GRMustache online documentation is provided as guides:
+**Documentation**: GRMustache online documentation is provided as guides and sample code:
- [guides/embedding.md](GRMustache/blob/master/guides/embedding.md): how to embed GRMustache in your Xcode projects
- [guides/templates.md](GRMustache/blob/master/guides/templates.md): how to parse and render templates
- [guides/runtime.md](GRMustache/blob/master/guides/runtime.md): how to provide data to templates
- [guides/delegate.md](GRMustache/blob/master/guides/delegate.md): how to hook into template rendering
+- [guides/sample_code.md](GRMustache/blob/master/guides/sample_code.md): because some tasks are easier to do with some guidelines.
- [guides/forking.md](GRMustache/blob/master/guides/forking.md): how GRMustache is organized
-**Sample code**: because some tasks are easier to do with some guidelines.
-
-- [SampleCode/NumberFormatting](GRMustache/blob/master/SampleCode/NumberFormatting): how to use NSNumberFormatter instances to format numbers in sections of your templates.
-
Usage
-----
@@ -1,323 +0,0 @@
-// !$*UTF8*$!
-{
- archiveVersion = 1;
- classes = {
- };
- objectVersion = 46;
- objects = {
-
-/* Begin PBXBuildFile section */
- 56E540BF1503E2B9002F5D6E /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 56E540BE1503E2B9002F5D6E /* Cocoa.framework */; };
- 56E540C91503E2B9002F5D6E /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 56E540C71503E2B9002F5D6E /* InfoPlist.strings */; };
- 56E540CB1503E2BA002F5D6E /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 56E540CA1503E2BA002F5D6E /* main.m */; };
- 56E540CF1503E2BA002F5D6E /* Credits.rtf in Resources */ = {isa = PBXBuildFile; fileRef = 56E540CD1503E2BA002F5D6E /* Credits.rtf */; };
- 56E540D21503E2BA002F5D6E /* GRAppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 56E540D11503E2BA002F5D6E /* GRAppDelegate.m */; };
- 56E540D51503E2BA002F5D6E /* MainMenu.xib in Resources */ = {isa = PBXBuildFile; fileRef = 56E540D31503E2BA002F5D6E /* MainMenu.xib */; };
- 56E540DE1503E36C002F5D6E /* libGRMustache1-macosx10.6.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 56E540DD1503E36C002F5D6E /* libGRMustache1-macosx10.6.a */; };
- 56E540E01503E3D9002F5D6E /* template.mustache in Resources */ = {isa = PBXBuildFile; fileRef = 56E540DF1503E3D9002F5D6E /* template.mustache */; };
-/* End PBXBuildFile section */
-
-/* Begin PBXFileReference section */
- 56E540BA1503E2B9002F5D6E /* NumberFormatting.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = NumberFormatting.app; sourceTree = BUILT_PRODUCTS_DIR; };
- 56E540BE1503E2B9002F5D6E /* Cocoa.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Cocoa.framework; path = System/Library/Frameworks/Cocoa.framework; sourceTree = SDKROOT; };
- 56E540C11503E2B9002F5D6E /* AppKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AppKit.framework; path = System/Library/Frameworks/AppKit.framework; sourceTree = SDKROOT; };
- 56E540C21503E2B9002F5D6E /* CoreData.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreData.framework; path = System/Library/Frameworks/CoreData.framework; sourceTree = SDKROOT; };
- 56E540C31503E2B9002F5D6E /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; };
- 56E540C61503E2B9002F5D6E /* NumberFormatting-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "NumberFormatting-Info.plist"; sourceTree = "<group>"; };
- 56E540C81503E2B9002F5D6E /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = "<group>"; };
- 56E540CA1503E2BA002F5D6E /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = "<group>"; };
- 56E540CC1503E2BA002F5D6E /* NumberFormatting-Prefix.pch */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "NumberFormatting-Prefix.pch"; sourceTree = "<group>"; };
- 56E540CE1503E2BA002F5D6E /* en */ = {isa = PBXFileReference; lastKnownFileType = text.rtf; name = en; path = en.lproj/Credits.rtf; sourceTree = "<group>"; };
- 56E540D01503E2BA002F5D6E /* GRAppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GRAppDelegate.h; sourceTree = "<group>"; };
- 56E540D11503E2BA002F5D6E /* GRAppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = GRAppDelegate.m; sourceTree = "<group>"; };
- 56E540D41503E2BA002F5D6E /* en */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = en; path = en.lproj/MainMenu.xib; sourceTree = "<group>"; };
- 56E540DC1503E36C002F5D6E /* GRMustache.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = GRMustache.h; path = include/GRMustache.h; sourceTree = "<group>"; };
- 56E540DD1503E36C002F5D6E /* libGRMustache1-macosx10.6.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = "libGRMustache1-macosx10.6.a"; path = "lib/libGRMustache1-macosx10.6.a"; sourceTree = "<group>"; };
- 56E540DF1503E3D9002F5D6E /* template.mustache */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = template.mustache; sourceTree = "<group>"; };
-/* End PBXFileReference section */
-
-/* Begin PBXFrameworksBuildPhase section */
- 56E540B71503E2B9002F5D6E /* Frameworks */ = {
- isa = PBXFrameworksBuildPhase;
- buildActionMask = 2147483647;
- files = (
- 56E540BF1503E2B9002F5D6E /* Cocoa.framework in Frameworks */,
- 56E540DE1503E36C002F5D6E /* libGRMustache1-macosx10.6.a in Frameworks */,
- );
- runOnlyForDeploymentPostprocessing = 0;
- };
-/* End PBXFrameworksBuildPhase section */
-
-/* Begin PBXGroup section */
- 56E540AF1503E2B9002F5D6E = {
- isa = PBXGroup;
- children = (
- 56E540DB1503E2D4002F5D6E /* GRMustache */,
- 56E540C41503E2B9002F5D6E /* NumberFormatting */,
- 56E540BD1503E2B9002F5D6E /* Frameworks */,
- 56E540BB1503E2B9002F5D6E /* Products */,
- );
- sourceTree = "<group>";
- };
- 56E540BB1503E2B9002F5D6E /* Products */ = {
- isa = PBXGroup;
- children = (
- 56E540BA1503E2B9002F5D6E /* NumberFormatting.app */,
- );
- name = Products;
- sourceTree = "<group>";
- };
- 56E540BD1503E2B9002F5D6E /* Frameworks */ = {
- isa = PBXGroup;
- children = (
- 56E540BE1503E2B9002F5D6E /* Cocoa.framework */,
- 56E540C01503E2B9002F5D6E /* Other Frameworks */,
- );
- name = Frameworks;
- sourceTree = "<group>";
- };
- 56E540C01503E2B9002F5D6E /* Other Frameworks */ = {
- isa = PBXGroup;
- children = (
- 56E540C11503E2B9002F5D6E /* AppKit.framework */,
- 56E540C21503E2B9002F5D6E /* CoreData.framework */,
- 56E540C31503E2B9002F5D6E /* Foundation.framework */,
- );
- name = "Other Frameworks";
- sourceTree = "<group>";
- };
- 56E540C41503E2B9002F5D6E /* NumberFormatting */ = {
- isa = PBXGroup;
- children = (
- 56E540D01503E2BA002F5D6E /* GRAppDelegate.h */,
- 56E540D11503E2BA002F5D6E /* GRAppDelegate.m */,
- 56E540D31503E2BA002F5D6E /* MainMenu.xib */,
- 56E540DF1503E3D9002F5D6E /* template.mustache */,
- 56E540C51503E2B9002F5D6E /* Supporting Files */,
- );
- path = NumberFormatting;
- sourceTree = "<group>";
- };
- 56E540C51503E2B9002F5D6E /* Supporting Files */ = {
- isa = PBXGroup;
- children = (
- 56E540C61503E2B9002F5D6E /* NumberFormatting-Info.plist */,
- 56E540C71503E2B9002F5D6E /* InfoPlist.strings */,
- 56E540CA1503E2BA002F5D6E /* main.m */,
- 56E540CC1503E2BA002F5D6E /* NumberFormatting-Prefix.pch */,
- 56E540CD1503E2BA002F5D6E /* Credits.rtf */,
- );
- name = "Supporting Files";
- sourceTree = "<group>";
- };
- 56E540DB1503E2D4002F5D6E /* GRMustache */ = {
- isa = PBXGroup;
- children = (
- 56E540DC1503E36C002F5D6E /* GRMustache.h */,
- 56E540DD1503E36C002F5D6E /* libGRMustache1-macosx10.6.a */,
- );
- name = GRMustache;
- path = ../..;
- sourceTree = "<group>";
- };
-/* End PBXGroup section */
-
-/* Begin PBXNativeTarget section */
- 56E540B91503E2B9002F5D6E /* NumberFormatting */ = {
- isa = PBXNativeTarget;
- buildConfigurationList = 56E540D81503E2BA002F5D6E /* Build configuration list for PBXNativeTarget "NumberFormatting" */;
- buildPhases = (
- 56E540B61503E2B9002F5D6E /* Sources */,
- 56E540B71503E2B9002F5D6E /* Frameworks */,
- 56E540B81503E2B9002F5D6E /* Resources */,
- );
- buildRules = (
- );
- dependencies = (
- );
- name = NumberFormatting;
- productName = NumberFormatting;
- productReference = 56E540BA1503E2B9002F5D6E /* NumberFormatting.app */;
- productType = "com.apple.product-type.application";
- };
-/* End PBXNativeTarget section */
-
-/* Begin PBXProject section */
- 56E540B11503E2B9002F5D6E /* Project object */ = {
- isa = PBXProject;
- attributes = {
- CLASSPREFIX = GR;
- LastUpgradeCheck = 0430;
- };
- buildConfigurationList = 56E540B41503E2B9002F5D6E /* Build configuration list for PBXProject "NumberFormatting" */;
- compatibilityVersion = "Xcode 3.2";
- developmentRegion = English;
- hasScannedForEncodings = 0;
- knownRegions = (
- en,
- );
- mainGroup = 56E540AF1503E2B9002F5D6E;
- productRefGroup = 56E540BB1503E2B9002F5D6E /* Products */;
- projectDirPath = "";
- projectRoot = "";
- targets = (
- 56E540B91503E2B9002F5D6E /* NumberFormatting */,
- );
- };
-/* End PBXProject section */
-
-/* Begin PBXResourcesBuildPhase section */
- 56E540B81503E2B9002F5D6E /* Resources */ = {
- isa = PBXResourcesBuildPhase;
- buildActionMask = 2147483647;
- files = (
- 56E540C91503E2B9002F5D6E /* InfoPlist.strings in Resources */,
- 56E540CF1503E2BA002F5D6E /* Credits.rtf in Resources */,
- 56E540D51503E2BA002F5D6E /* MainMenu.xib in Resources */,
- 56E540E01503E3D9002F5D6E /* template.mustache in Resources */,
- );
- runOnlyForDeploymentPostprocessing = 0;
- };
-/* End PBXResourcesBuildPhase section */
-
-/* Begin PBXSourcesBuildPhase section */
- 56E540B61503E2B9002F5D6E /* Sources */ = {
- isa = PBXSourcesBuildPhase;
- buildActionMask = 2147483647;
- files = (
- 56E540CB1503E2BA002F5D6E /* main.m in Sources */,
- 56E540D21503E2BA002F5D6E /* GRAppDelegate.m in Sources */,
- );
- runOnlyForDeploymentPostprocessing = 0;
- };
-/* End PBXSourcesBuildPhase section */
-
-/* Begin PBXVariantGroup section */
- 56E540C71503E2B9002F5D6E /* InfoPlist.strings */ = {
- isa = PBXVariantGroup;
- children = (
- 56E540C81503E2B9002F5D6E /* en */,
- );
- name = InfoPlist.strings;
- sourceTree = "<group>";
- };
- 56E540CD1503E2BA002F5D6E /* Credits.rtf */ = {
- isa = PBXVariantGroup;
- children = (
- 56E540CE1503E2BA002F5D6E /* en */,
- );
- name = Credits.rtf;
- sourceTree = "<group>";
- };
- 56E540D31503E2BA002F5D6E /* MainMenu.xib */ = {
- isa = PBXVariantGroup;
- children = (
- 56E540D41503E2BA002F5D6E /* en */,
- );
- name = MainMenu.xib;
- sourceTree = "<group>";
- };
-/* End PBXVariantGroup section */
-
-/* Begin XCBuildConfiguration section */
- 56E540D61503E2BA002F5D6E /* Debug */ = {
- isa = XCBuildConfiguration;
- buildSettings = {
- ALWAYS_SEARCH_USER_PATHS = NO;
- ARCHS = "$(ARCHS_STANDARD_64_BIT)";
- CLANG_ENABLE_OBJC_ARC = YES;
- COPY_PHASE_STRIP = NO;
- GCC_C_LANGUAGE_STANDARD = gnu99;
- GCC_DYNAMIC_NO_PIC = NO;
- GCC_ENABLE_OBJC_EXCEPTIONS = YES;
- GCC_OPTIMIZATION_LEVEL = 0;
- GCC_PREPROCESSOR_DEFINITIONS = (
- "DEBUG=1",
- "$(inherited)",
- );
- GCC_SYMBOLS_PRIVATE_EXTERN = NO;
- GCC_VERSION = com.apple.compilers.llvm.clang.1_0;
- GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
- GCC_WARN_ABOUT_RETURN_TYPE = YES;
- GCC_WARN_UNINITIALIZED_AUTOS = YES;
- GCC_WARN_UNUSED_VARIABLE = YES;
- MACOSX_DEPLOYMENT_TARGET = 10.7;
- ONLY_ACTIVE_ARCH = YES;
- SDKROOT = macosx;
- };
- name = Debug;
- };
- 56E540D71503E2BA002F5D6E /* Release */ = {
- isa = XCBuildConfiguration;
- buildSettings = {
- ALWAYS_SEARCH_USER_PATHS = NO;
- ARCHS = "$(ARCHS_STANDARD_64_BIT)";
- CLANG_ENABLE_OBJC_ARC = YES;
- COPY_PHASE_STRIP = YES;
- DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
- GCC_C_LANGUAGE_STANDARD = gnu99;
- GCC_ENABLE_OBJC_EXCEPTIONS = YES;
- GCC_VERSION = com.apple.compilers.llvm.clang.1_0;
- GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
- GCC_WARN_ABOUT_RETURN_TYPE = YES;
- GCC_WARN_UNINITIALIZED_AUTOS = YES;
- GCC_WARN_UNUSED_VARIABLE = YES;
- MACOSX_DEPLOYMENT_TARGET = 10.7;
- SDKROOT = macosx;
- };
- name = Release;
- };
- 56E540D91503E2BA002F5D6E /* Debug */ = {
- isa = XCBuildConfiguration;
- buildSettings = {
- GCC_PRECOMPILE_PREFIX_HEADER = YES;
- GCC_PREFIX_HEADER = "NumberFormatting/NumberFormatting-Prefix.pch";
- INFOPLIST_FILE = "NumberFormatting/NumberFormatting-Info.plist";
- LIBRARY_SEARCH_PATHS = (
- "$(inherited)",
- "\"$(SRCROOT)/../../lib\"",
- );
- PRODUCT_NAME = "$(TARGET_NAME)";
- WRAPPER_EXTENSION = app;
- };
- name = Debug;
- };
- 56E540DA1503E2BA002F5D6E /* Release */ = {
- isa = XCBuildConfiguration;
- buildSettings = {
- GCC_PRECOMPILE_PREFIX_HEADER = YES;
- GCC_PREFIX_HEADER = "NumberFormatting/NumberFormatting-Prefix.pch";
- INFOPLIST_FILE = "NumberFormatting/NumberFormatting-Info.plist";
- LIBRARY_SEARCH_PATHS = (
- "$(inherited)",
- "\"$(SRCROOT)/../../lib\"",
- );
- PRODUCT_NAME = "$(TARGET_NAME)";
- WRAPPER_EXTENSION = app;
- };
- name = Release;
- };
-/* End XCBuildConfiguration section */
-
-/* Begin XCConfigurationList section */
- 56E540B41503E2B9002F5D6E /* Build configuration list for PBXProject "NumberFormatting" */ = {
- isa = XCConfigurationList;
- buildConfigurations = (
- 56E540D61503E2BA002F5D6E /* Debug */,
- 56E540D71503E2BA002F5D6E /* Release */,
- );
- defaultConfigurationIsVisible = 0;
- defaultConfigurationName = Release;
- };
- 56E540D81503E2BA002F5D6E /* Build configuration list for PBXNativeTarget "NumberFormatting" */ = {
- isa = XCConfigurationList;
- buildConfigurations = (
- 56E540D91503E2BA002F5D6E /* Debug */,
- 56E540DA1503E2BA002F5D6E /* Release */,
- );
- defaultConfigurationIsVisible = 0;
- };
-/* End XCConfigurationList section */
- };
- rootObject = 56E540B11503E2B9002F5D6E /* Project object */;
-}
@@ -1,29 +0,0 @@
-// The MIT License
-//
-// Copyright (c) 2012 Gwendal Roué
-//
-// Permission is hereby granted, free of charge, to any person obtaining a copy
-// of this software and associated documentation files (the "Software"), to deal
-// in the Software without restriction, including without limitation the rights
-// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-// copies of the Software, and to permit persons to whom the Software is
-// furnished to do so, subject to the following conditions:
-//
-// The above copyright notice and this permission notice shall be included in
-// all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-// THE SOFTWARE.
-
-#import <Cocoa/Cocoa.h>
-
-@interface GRAppDelegate : NSObject <NSApplicationDelegate>
-
-@property (assign) IBOutlet NSWindow *window;
-
-@end
Oops, something went wrong.

0 comments on commit 18da0ef

Please sign in to comment.