Jump to content

question about "cluster to array" primitive


Recommended Posts

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.

Link to comment

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 :

post-7452-0-50123800-1313768373_thumb.pn

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).

Link to comment

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. :) )

Link to comment

I understand that.

And yes, what I'd like is a smater "cluster to array", by the way here's my use case :

post-7452-0-50123800-1313768373_thumb.pn

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? :P

<!-- 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>

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.