Issue 61 in nhaml: Fluent method chain with lambdas causes compilation error

0 views
Skip to first unread message

codesite...@google.com

unread,
Jul 29, 2009, 1:54:54 PM7/29/09
to nhaml...@googlegroups.com
Status: Accepted
Owner: ----
Labels: Type-Defect Priority-Medium

New issue 61 by andrew.john.peters: Fluent method chain with lambdas causes
compilation error
http://code.google.com/p/nhaml/issues/detail?id=61

- Html.jQuery().Accordion().Name("navigation").Items() (parent) =>
- parent.Add().Text("Accordion").Content() () =>
%ul
%li= Html.ActionLink("Basic example", "Basic", "Accordion")
- .Render()

Results in:

// Haml: - Html.jQuery().Accordion().Name("navigation").Items() (parent) =>
Html.jQuery().Accordion().Name("navigation").Items((parent) => {;
// Haml: - parent.Add().Text("Accordion").Content() () =>
Output.Depth = 1;
parent.Add().Text("Accordion").Content(() => {;
textWriter.Write(" <ul");
textWriter.WriteLine(">");
textWriter.Write(" <li");
textWriter.WriteLine(">");
textWriter.Write(" ");
textWriter.WriteLine(Convert.ToString(Html.ActionLink("Basic
example", "Basic", "Accordion")));
textWriter.WriteLine(" </li>");
textWriter.WriteLine(" </ul>");
});
Output.Depth = 0;
});
// Haml: - .Render()
.Render();

The last Render call is orphaned.


--
You received this message because you are listed in the owner
or CC fields of this issue, or because you starred this issue.
You may adjust your issue notification preferences at:
http://code.google.com/hosting/settings

codesite...@google.com

unread,
Aug 2, 2009, 6:37:14 AM8/2/09
to nhaml...@googlegroups.com

Comment #1 on issue 61 by simon.cropp: Fluent method chain with lambdas

workaround

- Html.jQuery().Accordion().Name("navigation").Items() (parent) =>
- parent.Add().Text("Accordion").Content() () =>
%ul

%li= Html.ActionLink("Basic example", "Basic", "Accordion").Render()

codesite...@google.com

unread,
Aug 2, 2009, 6:45:15 AM8/2/09
to nhaml...@googlegroups.com

Comment #2 on issue 61 by simon.cropp: Fluent method chain with lambdas

Andrew

Knowing the codebase as well as you do... do u have any suggestions for how
fix this?

Reply all
Reply to author
Forward
0 new messages