Antoine Chalons Posted August 19, 2011 Report Share Posted August 19, 2011 One could assume that if the lower snippet works the upper one would do too, no? I was about to post an idea on the idea exchange to have the "cluster to array" primitive improved, but since i'm in LV8.6 I thought I would ask here if the upper snippet would have a broken wire in LV2011, anyone? Quote Link to comment
Antoine Chalons Posted August 19, 2011 Author Report Share Posted August 19, 2011 ok, thanks. I shall post an idea then. Quote Link to comment
Saverio Posted August 19, 2011 Report Share Posted August 19, 2011 Technically, it's not broken behavior. The cluster contains two references, but they're different kinds of references. Hence, the Cluster to Array is complaining, since it only works when the cluster contains elements of the same datatype. You can see in the Build Array that there's data coercion on both so that they are being "downcast" to the common datatype of a "lowly" "Control Refnum". You could make the case that the Cluster to Array should be "smarter", but that's a different question, and I think posting it as an idea is a ... good idea. Quote Link to comment
Antoine Chalons Posted August 19, 2011 Author Report Share Posted August 19, 2011 The cluster contains two references, but they're different kinds of references. Hence, the Cluster to Array is complaining, since it only works when the cluster contains elements of the same datatype. You can see in the Build Array that there's data coercion on both so that they are being "downcast" to the common datatype of a "lowly" "Control Refnum". I understand that. And yes, what I'd like is a smater "cluster to array", by the way here's my use case : I'm lazy and I'd like to have the best of both worlds - so to speak. A smarter "cluster to array" is one step, the second step would be for the property/invoke node to accept arrays of references. I think there is already an idea for that (not sure though). Quote Link to comment
Saverio Posted August 19, 2011 Report Share Posted August 19, 2011 Don't get me wrong - I completely agree with you. I was actually responding more to Neil's comment about it still being "broken" in 2011. I was just pointing out that technically it's not broken (at least in my opinion). I agree that you can make an argument here that although you have 2 different classes, you're fundamentally dealing with references, so perhaps the Cluster to Array could be made to take that into account. Either way, the Idea Exchange is a good place to post this as well as here. (I did kudo your idea. ) Quote Link to comment
jgcode Posted August 19, 2011 Report Share Posted August 19, 2011 I understand that. And yes, what I'd like is a smater "cluster to array", by the way here's my use case : I'm lazy and I'd like to have the best of both worlds - so to speak. A smarter "cluster to array" is one step, the second step would be for the property/invoke node to accept arrays of references. I think there is already an idea for that (not sure though). OpenG to the rescue? <!-- copy and paste. Modify height and width if desired. --> <object id="scPlayer" width="1288" height="638" type="application/x-shockwave-flash" data="http://content.screencast.com/users/jgcode/folders/LabVIEW%202011/media/08629e27-bbc8-4451-a4c4-560ee04ec845/jingswfplayer.swf" > <param name="movie" value="http://content.screencast.com/users/jgcode/folders/LabVIEW%202011/media/08629e27-bbc8-4451-a4c4-560ee04ec845/jingswfplayer.swf" /> <param name="quality" value="high" /> <param name="bgcolor" value="#FFFFFF" /> <param name="flashVars" value="thumb=http://content.screencast.com/users/jgcode/folders/LabVIEW%202011/media/08629e27-bbc8-4451-a4c4-560ee04ec845/FirstFrame.jpg&containerwidth=1288&containerheight=638&content=http://content.screencast.com/users/jgcode/folders/LabVIEW%202011/media/08629e27-bbc8-4451-a4c4-560ee04ec845/OpenG%20Cluster%20to%20V%20Array.swf&blurover=false" /> <param name="allowFullScreen" value="true" /> <param name="scale" value="showall" /> <param name="allowScriptAccess" value="always" /> <param name="base" value="http://content.screencast.com/users/jgcode/folders/LabVIEW%202011/media/08629e27-bbc8-4451-a4c4-560ee04ec845/" /> Unable to display content. Adobe Flash is required. </object> Quote Link to comment
Mark Balla Posted August 20, 2011 Report Share Posted August 20, 2011 I would agree that this would be a good feature. This idea does work with LVOOP child classes in a cluster casting them to an array of parents. We use this technique in the Msg routing framework. Please post a link here of you make a suggestion to LVIE Quote Link to comment
crelf Posted August 20, 2011 Report Share Posted August 20, 2011 I was actually responding more to Neil's comment about it still being "broken" in 2011. Neil was replying to the question if the wire was still broken, not the feature. Quote Link to comment
Antoine Chalons Posted August 22, 2011 Author Report Share Posted August 22, 2011 for those who wish to support this idea, here it is. Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.