From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

Actor Framework Discussions

cancel
Showing results for 
Search instead for 
Did you mean: 

How to remove actor from project, if the class does not exist in disk anymore

Solved!
Go to solution

I expected to be able to get rid of unneeded actor classes in project hierarchy just by deleting them from filesystem, and then just ignoring the load errors when loading the project.

Apparently this isn't so, or at least I couldn't find a way to do this. Google gave no answers, so maybe we fix that here.

I had some unneeded classes in my project, so I deleted them. When I load the project now, the LabVIEW 2013 IDE keeps asking for me to locate the classes in filesystem, and when I can't, the classes will stick to projects dependency list although they have no callers. The dependency probably arises from actor class, as these deleted classes have been inheriting from it.

As these actors are unneeded, I can run the application in development environment without problems, but any attempts to build an application fail due dependency errors.

I realize that the *correct* way of going about this is to first remove the (to be removed) actor classes from inheritance hierarchy, prior to removing them from project, and only then removing them from the filesystem.

I still have that option, as I can take the classes from trash and tinker my way around this problem but I'm looking for a robust solution for this.

Anyone?

0 Kudos
Message 1 of 8
(5,769 Views)

the class will show up in your dependencies

there, you need to remove the inheritance from the Actor.lvclass, then you can get rid of it.

_________________________
CLA
Message 2 of 8
(4,585 Views)

With (Not loaded) status, I can't find any obvious way to remove the inheritance to actor class. Can you give me a step by step example perhapsUnlink problem.png?

0 Kudos
Message 3 of 8
(4,585 Views)

that looks strange.

I did a few (maybe too simple) tests where I could not reproduce this behaviour.

can you check "Why is this item in Dependencies?" - what does it say?

somewhere in your project you still refer to the deleted classes. unfortunately, you need to get rid of all of them.

OOP (more exactly lvlibraries work a bit strange here - you might have noticed that even renaming/moving class/lvlib-items offline - not in the project - causes undesired behaviour)

cheers

_________________________
CLA
Message 4 of 8
(4,585 Views)
Solution
Accepted by topic author Blue_Perfect

Thank you -stbe-

My earlier assumption on the dependency reason was incorrect. I had the class controls of these missing classes in disable diagram in the actor core . Your suggestion led me to find those, thanks for that.

And, yes, I have noticed the undesired behaviour of OOP on several occasions. At times it's somewhat demotivating, but I'm still quite happy with the actor framework.

With lvlibraries I've had no problems, but I'm just starting to use them. This is my first touch on both, actor framework and lvlibraries.

And now my builds work again

0 Kudos
Message 5 of 8
(4,585 Views)

Just a couple tips based on the last reply.

Keep typedefs out of your classes. They will pull that class as a dependency wherever you use that control. The exception is data that you expect to only use internally to that class.

Use of lvlibs is convenient with AF as you can group all of your messages with the actor. However, and maybe someone else can speak up to this, extensive use of libraries in a large project can significantly slow down the development environment and the build time.

Casey

Casey Lamers


Phoenix, LLC


casey.lamers@phoenixwi.com


CLA, LabVIEW Champion


Check Out the Software Engineering Processes, Architecture, and Design track at NIWeek. 2018 I guarantee you will learn things you can use daily! I will be presenting!

0 Kudos
Message 6 of 8
(4,585 Views)

CaseyLamers1 wrote:

However, and maybe someone else can speak up to this, extensive use of libraries in a large project can significantly slow down the development environment and the build time.

niACS and I decided that the use of libraries to keep messages organized and to provide scoping abilities for messages was sufficiently valuable that such libraries are the default for the AF project plug-ins for LV that niACS made available. It adds some weight to load time of the project but doesn't appear to significantly weigh on development time compared to weight of the actors themselves.

0 Kudos
Message 7 of 8
(4,585 Views)

Thanks for the tips Casey, I was oblivious of the enum & class dependency marriage.

Thus far my classes have usually been free of typedefs, mostly because my relationship with them typedefs hasn't always been a happy one and I tend to mistrust the ease they bring.

Having said that, I do use them whenever the typedef use is contained in well defined part of the application.

I now look at lvlibraries with the same mistrust

0 Kudos
Message 8 of 8
(4,585 Views)