Discussion Group

Syndicate content
Development discussion and project notification for Spark view engine
Updated: 9 min 31 sec ago

Re: SparkViewEngine spontaneous NullReferenceException while rendering view

9 min 31 sec ago
I can't reproduce it when i start a new project with just a simple
master and some dummy childactions / partial views.
If i ever get more time to look at it i will think about stripping
down the project until the exception dissapears, hopefully pinpointing
the exact spot of the problem this way.

Commented Issue: Force CompilerParameters.TreatWarningsAsErrors = false in BatchCompiler.Compile() [3873]

9 min 31 sec ago
I don't think we need warnings in generated classes.
By default TreatWarningsAsErrors = (WarningLevel > 0).
I don't want to touch WarningLevel in my system.codedom section, and <providerOption name="WarnAsError" value="false" /> is taken into account only for Web Forms compilation.
So it will be nice to to set TreatWarningsAsErrors = false in code. Or at least read the provider <providerOption name="WarnAsError" value="false" /> (unfortunately it is internal so read is only possible via reflection).

Commented Issue: Force CompilerParameters.TreatWarningsAsErrors = false in BatchCompiler.Compile() [3873]

9 min 31 sec ago
I don't think we need warnings in generated classes.
By default TreatWarningsAsErrors = (WarningLevel > 0).
I don't want to touch WarningLevel in my system.codedom section, and <providerOption name="WarnAsError" value="false" /> is taken into account only for Web Forms compilation.
So it will be nice to to set TreatWarningsAsErrors = false in code. Or at least read the provider <providerOption name="WarnAsError" value="false" /> (unfortunately it is internal so read is only possible via reflection).

Re: Warning as Error

9 min 31 sec ago
Actually, depending on the warning you may have to drop it lower. Mea
culpa. Easier still is to drop the <system.codedom> section unless
you have need of customizing it.

Re: Warning as Error

9 min 31 sec ago
Note to people getting these errors: Check your web.config
system.codedom section for warningLevel="4", which equates to telling
the compiler to treat all warnings as errors. Drop it down to 3.

Re: Warning as Error

9 min 31 sec ago
Bump. I'm getting the same thing with a section of code I've
temporarily disabled with an <if condition="false"> block.

I'd love to have this be configurable, as my spark compilation
integration tests would benefit greatly from finding warnings as
errors (which they currently don't--with the same web.config section,

Re: Bindings

9 min 31 sec ago
Just to clarify. It seems to be all binding that actually pass data -
as part of a dictionary, as part of viewdata or even the viewdata
model itself.

Is it possilbe I may need to change a setting somewhere?

Cheers

Re: Bindings

9 min 31 sec ago
Hi Guys,

Thanks for the replies and sorry to sound like a bit of a hassle.

I really like the idea of bindings hence perservering with them.
Having tried Louis' lates suggestion I get the error:

error CS1040: Preprocessor directives must appear as the first non-
whitespace character on a line

RE: Bindings

9 min 31 sec ago
The binding might be okay,
<element name="partial">#Html.RenderPar tial("@name", @data)</element>
But I think your usage might need some adjustments around the quoting of attributes...
<partial name="'FeedbackPageTable'" data=Model />
Try:
<partial name="FeedbackPageTable" data="Model" />
-----Original Message-----

Re: Bindings

9 min 31 sec ago
use the viewdata element in your partial:
[link]

Re: Bindings

9 min 31 sec ago
Thanks for the reply. I have not noticed this on the spark docs.

Is there a property for passing a model to the partial?

Re: Bindings

9 min 31 sec ago
Typing this from my iPhone since I'm on vacation without internet so here goes:
Html.RenderPartial (to my knowledge) is the MSMVC helper used when rendering ascx partials. In your case, if your partial is a spark partial, then you don't need Bindings, you can just call it by typing <FeedbackPageTable/>

Bindings

9 min 31 sec ago
First off: I love them!

Secondly: I cannot get them to work correctly in some cases.

I have tried to create a partial binding that renders a partial view
by passing a name and a model:

Binding:
<element name="partial">#Html.RenderPar tial("@name", @data)</element>

Code that I want it to replace in my view:

Commented Issue: SparkSense throws an exception whenever it runs [6846]

9 min 31 sec ago
Whenever I type "${", or "<s:" or just press Ctrl-Space I get the the exception below:

279 ERROR System.ArgumentException: An item with the same key has already been added. at System.ThrowHelper.ThrowArgume ntException(ExceptionResource resource) at System.Collections.Generic.Dic tionary`2.Insert(TKey key, TValue value, Boolean add) at SparkSense.Parsing.ProjectExpl orer.ScanProjectItemForViews(P rojectItem projectItem) at SparkSense.Parsing.ProjectExpl orer.ScanProjectItemForViews(P rojectItem projectItem) at SparkSense.Parsing.ProjectExpl orer.ScanProjectItemForViews(P rojectItem projectItem) at SparkSense.Parsing.ProjectExpl orer.BuildViewMapFromProjectEn vironment() at SparkSense.Parsing.ProjectExpl orer.get_ProjectViewFolder() at SparkSense.Parsing.ProjectExpl orer.GetViewFolder() at SparkSense.Parsing.ViewExplore r.InitCurrentView() at SparkSense.Parsing.ViewExplore r..ctor(IProjectExplorer projectExplorer) at SparkSense.StatementCompletion .CompletionSource..ctor(ITextB uffer textBuffer, IProjectExplorer projectExplorer) at SparkSense.StatementCompletion .CompletionListe

Commented Issue: SparkSense throws an exception whenever it runs [6846]

9 min 31 sec ago
Whenever I type "${", or "<s:" or just press Ctrl-Space I get the the exception below:

279 ERROR System.ArgumentException: An item with the same key has already been added. at System.ThrowHelper.ThrowArgume ntException(ExceptionResource resource) at System.Collections.Generic.Dic tionary`2.Insert(TKey key, TValue value, Boolean add) at SparkSense.Parsing.ProjectExpl orer.ScanProjectItemForViews(P rojectItem projectItem) at SparkSense.Parsing.ProjectExpl orer.ScanProjectItemForViews(P rojectItem projectItem) at SparkSense.Parsing.ProjectExpl orer.ScanProjectItemForViews(P rojectItem projectItem) at SparkSense.Parsing.ProjectExpl orer.BuildViewMapFromProjectEn vironment() at SparkSense.Parsing.ProjectExpl orer.get_ProjectViewFolder() at SparkSense.Parsing.ProjectExpl orer.GetViewFolder() at SparkSense.Parsing.ViewExplore r.InitCurrentView() at SparkSense.Parsing.ViewExplore r..ctor(IProjectExplorer projectExplorer) at SparkSense.StatementCompletion .CompletionSource..ctor(ITextB uffer textBuffer, IProjectExplorer projectExplorer) at SparkSense.StatementCompletion .CompletionListe

An assembly with the same simple name.. side-by-side

Thu, 09/02/2010 - 02:38
Reporting this again as more users of Spark now hopefully.

Happens about 1 in every 3 debugging attempts. Usually a clean,
rebuild, iisreset, rebuild sorts it but its bloody annoying and only
ever happens when using Spark.

I've had this in both .Net 4.0 and .Net 3.5 on two dev machines and
occasionally on server (when not stoppping app pools before copying).

Commented Issue: SparkSense throws an exception whenever it runs [6846]

Tue, 08/31/2010 - 03:36
Whenever I type "${", or "<s:" or just press Ctrl-Space I get the the exception below:

279 ERROR System.ArgumentException: An item with the same key has already been added. at System.ThrowHelper.ThrowArgume ntException(ExceptionResource resource) at System.Collections.Generic.Dic tionary`2.Insert(TKey key, TValue value, Boolean add) at SparkSense.Parsing.ProjectExpl orer.ScanProjectItemForViews(P rojectItem projectItem) at SparkSense.Parsing.ProjectExpl orer.ScanProjectItemForViews(P rojectItem projectItem) at SparkSense.Parsing.ProjectExpl orer.ScanProjectItemForViews(P rojectItem projectItem) at SparkSense.Parsing.ProjectExpl orer.BuildViewMapFromProjectEn vironment() at SparkSense.Parsing.ProjectExpl orer.get_ProjectViewFolder() at SparkSense.Parsing.ProjectExpl orer.GetViewFolder() at SparkSense.Parsing.ViewExplore r.InitCurrentView() at SparkSense.Parsing.ViewExplore r..ctor(IProjectExplorer projectExplorer) at SparkSense.StatementCompletion .CompletionSource..ctor(ITextB uffer textBuffer, IProjectExplorer projectExplorer) at SparkSense.StatementCompletion .CompletionListe

Commented Issue: SparkSense throws an exception whenever it runs [6846]

Tue, 08/31/2010 - 03:36
Whenever I type "${", or "<s:" or just press Ctrl-Space I get the the exception below:

279 ERROR System.ArgumentException: An item with the same key has already been added. at System.ThrowHelper.ThrowArgume ntException(ExceptionResource resource) at System.Collections.Generic.Dic tionary`2.Insert(TKey key, TValue value, Boolean add) at SparkSense.Parsing.ProjectExpl orer.ScanProjectItemForViews(P rojectItem projectItem) at SparkSense.Parsing.ProjectExpl orer.ScanProjectItemForViews(P rojectItem projectItem) at SparkSense.Parsing.ProjectExpl orer.ScanProjectItemForViews(P rojectItem projectItem) at SparkSense.Parsing.ProjectExpl orer.BuildViewMapFromProjectEn vironment() at SparkSense.Parsing.ProjectExpl orer.get_ProjectViewFolder() at SparkSense.Parsing.ProjectExpl orer.GetViewFolder() at SparkSense.Parsing.ViewExplore r.InitCurrentView() at SparkSense.Parsing.ViewExplore r..ctor(IProjectExplorer projectExplorer) at SparkSense.StatementCompletion .CompletionSource..ctor(ITextB uffer textBuffer, IProjectExplorer projectExplorer) at SparkSense.StatementCompletion .CompletionListe

Re: Special node use had no understandable attributes

Tue, 08/31/2010 - 02:48
Some further info,

I've made this really simple now, and copied both the
Application.spark and the view into another project and they work
fine.

So it must be something gone weird with the project. One thing worth
mentioning perhaps, I have two MVC2 projects in the same solution, one
of them is working, the other isn't.

Special node use had no understandable attributes

Tue, 08/31/2010 - 02:32
Hello,

I'm getting this error message: "Special node use had no
understandable attributes"

Which suggests to me that I'm using the use tag with some incorrect
attributes.

However, I've swapped the Application.spark for one from another
simple app that works, and edited the view so it only has one line of