uQuery.GetNodesByType and umbraco.NodeFactory.Node
Hello,
I have a problem with uQuery.GetNodesByType :
When I use : List<Node> listNodes = uQuery.GetNodesByType("myDocType");
I cannot use "using umbraco.NodeFactory;" otherwize I have the error :
"Cannot implicitly convert type 'System.Collections.Generic.List<umbraco.presentation.nodeFactory.Node>' to 'System.Collections.Generic.List<umbraco.NodeFactory.Node>'"
And if I put "using umbraco.presentation.nodeFactory;" instead of "using umbraco.NodeFactory;" I have a warning :
umbraco.presentation.nodeFactory.Node' is obsolete: 'This class is obsolete; use class umbraco.NodeFactory.Node instead'
Does anybody have the same problem ?
How can I use uQuery.GetNodesByType with umbraco.NodeFactory.Node ?
I'm guessing this is to do with the namespace of the Node object moving from umbraco.presentation.nodeFactory to umbraco.NodeFactory in Umbraco 4.7 - does it work when you declare the using umbraco.presentation.nodeFactory ? if so then you should be fine using it with that.
Would be good to update uQuery so that it's compatable with all versions of Umbraco, but if this isn't possible then perhaps for the next release of uComponents it should be compiled against the umbraco.NodeFactory namespace ?
It's working fine with umbraco.presentation.nodeFactory but I'd like to use umbraco.NodeFactory as the other one is deprecated. I guess there is nothing to do for now, maybe the next version will solve the problem...
This issue applies to all packages that use the (now deprecated) nodeFactory API. Your code will still work, the only issue is that Visual Studio will bug you about using it.
@Hendy: The new umbraco.NodeFactory namespace does use a different object (implements the new INode interface) - as far as I'm aware, its not compatible with the (other) nodeFactory objects.
As of uComponents v3.0, we will be compiling against the Umbraco 4.7 assemblies (this also means .NET 4.0 only too). For the current v2.x branch, we must maintain backwards compatibility with Umbraco 4.5.x
uQuery.GetNodesByType and umbraco.NodeFactory.Node
Hello,
I have a problem with uQuery.GetNodesByType :
When I use : List<Node> listNodes = uQuery.GetNodesByType("myDocType");
I cannot use "using umbraco.NodeFactory;" otherwize I have the error :
"Cannot implicitly convert type 'System.Collections.Generic.List<umbraco.presentation.nodeFactory.Node>' to 'System.Collections.Generic.List<umbraco.NodeFactory.Node>'"
And if I put "using umbraco.presentation.nodeFactory;" instead of "using umbraco.NodeFactory;" I have a warning :
umbraco.presentation.nodeFactory.Node' is obsolete: 'This class is obsolete; use class umbraco.NodeFactory.Node instead'
Does anybody have the same problem ?
How can I use uQuery.GetNodesByType with umbraco.NodeFactory.Node ?
Thanks
Hi Fabrice,
I'm guessing this is to do with the namespace of the Node object moving from umbraco.presentation.nodeFactory to umbraco.NodeFactory in Umbraco 4.7 - does it work when you declare the using umbraco.presentation.nodeFactory ? if so then you should be fine using it with that.
Would be good to update uQuery so that it's compatable with all versions of Umbraco, but if this isn't possible then perhaps for the next release of uComponents it should be compiled against the umbraco.NodeFactory namespace ?
Cheers,
Hendy
That's my exactly my problem :)
It's working fine with umbraco.presentation.nodeFactory but I'd like to use umbraco.NodeFactory as the other one is deprecated. I guess there is nothing to do for now, maybe the next version will solve the problem...
Thanks.
Good to know it's working :)
I heard the Node object has moved namespaces, but I don't think it's changed at all - can anyone confirm that ?
This issue applies to all packages that use the (now deprecated) nodeFactory API. Your code will still work, the only issue is that Visual Studio will bug you about using it.
@Hendy: The new umbraco.NodeFactory namespace does use a different object (implements the new INode interface) - as far as I'm aware, its not compatible with the (other) nodeFactory objects.
As of uComponents v3.0, we will be compiling against the Umbraco 4.7 assemblies (this also means .NET 4.0 only too). For the current v2.x branch, we must maintain backwards compatibility with Umbraco 4.5.x
Cheers, Lee.
Great many thanks for the reply !
is working on a reply...