Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

v1.12.1

  • Loading branch information...
commit 71638db4cd509f5a3cd7c22194eab5bfab99c7a9 1 parent caea2e3
@groue authored
View
9 Guides/delegate.md
@@ -33,6 +33,7 @@ You can read the following properties of the *invocation* argument:
- `id returnValue`: the return value of the invocation.
- `NSString *key`: the key that did provide this value.
+- `NSString *description`: a string that helps you locate the corresponding Mustache tag.
Note that those methods do not allow you to build a complete "stack trace" of GRMustache rendering. They are not called for each accessed key. They are called for each tag rendering, which is quite different.
@@ -51,11 +52,17 @@ You may, for instance, locate keys that could not find any data:
if (invocation.returnValue == nil) {
// Log the missing key
- NSLog(@"GRMustache missing key: %@", invocation.key);
+ NSLog(@"GRMustache missing key: `%@` for %@", invocation.key, invocation.description);
}
}
```
+You'll get something like:
+
+```
+GRMustache missing key: `items` for <GRMustacheInvocation: {{#items}} at line 23 in template .../foobar.mustache>
+```
+
Alter the template rendering
----------------------------
View
4 RELEASE_NOTES.md
@@ -3,6 +3,10 @@ GRMustache Release Notes
You can compare the performances of GRMustache version at https://github.com/groue/GRMustacheBenchmark.
+## v1.12.1
+
+Easier template debugging with `[GRMustacheInvocation description]`
+
## v1.12
- **GRMustacheTemplateDelegate protocol**
View
1  include/GRMustacheInvocation.h
@@ -26,6 +26,7 @@
@interface GRMustacheInvocation : NSObject {
@private
id _returnValue;
+ NSString *_description;
}
@property (nonatomic, readonly) NSString *key AVAILABLE_GRMUSTACHE_VERSION_1_12_AND_LATER;
@property (nonatomic, retain) id returnValue AVAILABLE_GRMUSTACHE_VERSION_1_12_AND_LATER;
View
2  include/GRMustacheVersion.h
@@ -40,5 +40,5 @@
@since v1.0
*/
-#define GRMUSTACHE_PATCH_VERSION 0
+#define GRMUSTACHE_PATCH_VERSION 1
View
BIN  lib/libGRMustache1-ios3.a
Binary file not shown
View
BIN  lib/libGRMustache1-ios4.a
Binary file not shown
View
BIN  lib/libGRMustache1-macosx10.6.a
Binary file not shown
Please sign in to comment.
Something went wrong with that request. Please try again.