mje Posted October 28, 2011 Report Share Posted October 28, 2011 I have an application I'm updating and it looks like I must deprecate a property in a complex class I've created. When dealing with normal VIs (be they class methods or just plain VIs) I usually color the icon differently to give a visual cue to say something to the effect of, "Hey, I'm different, you had better look at the documentation if you plan on using me." However when dealing with class properties, you don't exactly see the icon. I know internally LabVIEW will color code property/invoke nodes if they call "super-secret" or deprecated interfaces, is this functionality exported in any way that we can take advantage of it in classes? Quote Link to comment
asbo Posted October 28, 2011 Report Share Posted October 28, 2011 Just have the property start returning random values. Developers will realize it's unreliable and just stop using it. 1 Quote Link to comment
Aristos Queue Posted October 28, 2011 Report Share Posted October 28, 2011 > is this functionality exported in any way that we can take advantage of it in classes? Not currently. Those are marks on properties of C++ classes. The LV classes have no such designation. Not a bad suggestion. I'm guessing this would be a property you would set on the Property Folder, not on the VIs themselves. It would be up to you to still recolor the icons of the VIs if they were being used somewhere directly instead of through the property node. We could do it on the VIs, I suppose, but at that point, I'd want a much broader feature for deprecating VIs generally that had nothing to do with classes. Hmm... would you ever want to deprecate only the read or only the write half of a property? If that's a use case, it might be better to be on the VIs themselves. Anyway, think about it, and then throw it on the Idea Exchange. It's a worthy suggestion but not one I've contemplated before. I'll ping Mr. Mike on this topic... he is the member of my team that owns the property node interfaces. 2 Quote Link to comment
mje Posted October 28, 2011 Author Report Share Posted October 28, 2011 Cool, thanks for the quick reply. Hmm... would you ever want to deprecate only the read or only the write half of a property? If that's a use case, it might be better to be on the VIs themselves. Currently yes, I'm only depreciating only the write operation, though I'm not convinced this is wise. Due to a change in my data model, the write operation can become brutally inefficient, but the read is still pretty straight forward. I was thinking of it being applied via the "Item Settings" category of the class properties, though I'm undecided on where best to apply it. If it becomes a settable flag of the Property Folder itself, I imagine differentiating read/write becomes impossible. Maybe the flag would only be settable at the VI level, but only for VIs which are part of a property folder, is that possible? Quote Link to comment
mje Posted October 28, 2011 Author Report Share Posted October 28, 2011 Posted to the idea exchange. Quote Link to comment
Mr Mike Posted October 28, 2011 Report Share Posted October 28, 2011 > is this functionality exported in any way that we can take advantage of it in classes? Not currently. Those are marks on properties of C++ classes. The LV classes have no such designation. Not a bad suggestion. I'm guessing this would be a property you would set on the Property Folder, not on the VIs themselves. It would be up to you to still recolor the icons of the VIs if they were being used somewhere directly instead of through the property node. We could do it on the VIs, I suppose, but at that point, I'd want a much broader feature for deprecating VIs generally that had nothing to do with classes. Hmm... would you ever want to deprecate only the read or only the write half of a property? If that's a use case, it might be better to be on the VIs themselves. Anyway, think about it, and then throw it on the Idea Exchange. It's a worthy suggestion but not one I've contemplated before. I'll ping Mr. Mike on this topic... he is the member of my team that owns the property node interfaces. I have permission from AQ to say this: Aristos Queue has no idea what he's talking about. It's possible to deprecate properties, but we have it hidden. This was built so some of our APIs could be deprecated with the potential of releasing it in the future. When you deprecate a LabVIEW Class Property it will remove the item from the property menu and is supposed to turn the property node reddish pink (it doesn't because of a bug I just discovered). I don't remember the behavior of deprecated overridden properties. The deprecation applies to the LabVIEW Class Property Definition Folder itself (i.e. the property itself), not the individual methods. I'm not against turning it on in the future, but I think it'd need to have significant public support before I get off my lazy butt it gets approved. I was thinking of it being applied via the "Item Settings" category of the class properties, though I'm undecided on where best to apply it. If it becomes a settable flag of the Property Folder itself, I imagine differentiating read/write becomes impossible. Uhhhhh...you mean like this? Seriously, this is what it looks like if you know how to show it. 2 Quote Link to comment
mje Posted October 28, 2011 Author Report Share Posted October 28, 2011 LOL. Yeah, that's exactly what I was thinking about. For the first time I'm noticing it's "deprecated" not "depreciated". I suppose that's why my google-fu failed me. Well, that and the fact that it's impossible to do unless you know the ways of the NI Engineer. Quote Link to comment
Daklu Posted October 31, 2011 Report Share Posted October 31, 2011 if you know how to show it. Is it sharable as an advanced tweak? (Like scripting before it was released?) For the first time I'm noticing it's "deprecated" not "depreciated". Funny, I noticed that for the first time just a couple months ago. Glad to know I'm not the only one... Quote Link to comment
Mr Mike Posted October 31, 2011 Report Share Posted October 31, 2011 Is it sharable as an advanced tweak? (Like scripting before it was released?) Right now we're not planning on sharing the how you can deprecate properties. However someone posted the idea on the LabVIEW idea exchange. Quote Link to comment
Daklu Posted October 31, 2011 Report Share Posted October 31, 2011 However someone posted the idea on the LabVIEW idea exchange. I was hoping for something a little more informal... like an ini key or something. 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.