Calling external action list

Hello,

I'm trying to build utility library project containing most often used actions. I added "Include project" action. The project contains one simple test action. Next, I added Run Action List. The point is that combobox with Action List does not contain the test action.

What is the right way to use external action lists? Help file is very laconic.


 Hi Piotr,

You can select which action list to execute in the 'Include Project' action, please see the attached zip file which contains an example utility and consumer project.

Regards,
Paul.
 

Utility.zip (3.664 KB)

Thanks for response,

I don't know why I thought that "run action list" would be right "consumer" action. All is clear now.

 

I have one more question: Can I use relative paths in "Include project" Project file field?

I tried: "..\FB-LIB\CommonActions.fbp7" but IDE says "Error loading project: File ..\FB-LIB\CommonActions.fbp7 does not exist".

But, what is funny, I can successfully run such an action. Can we treat this as a bug?

FB IDE v. 7.0.0.852

Unbased Relative paths are not supported in FinalBuilder. Relative paths are by their nature relative to something, and the question is what exactly in a FinalBuilder project. We have explored this many times in the past, and if you ask a bunch of people they will all give different answers. So is it relative to the current project, or relative to another option in an action… it’s very difficult to come up with something that is consistent.

Then there is the issue of how to actually resolve relative paths on windows. The windows api resolves relative paths based on the current folder for the application. Applications only have a single “current folder”, so how do you manage that in multi-threaded applications without using locking (and thus causing a major bottleneck as it is something that would be called a lot).

And finally, not all windows api’s support relative paths… (and that’s not very well documented).

I recommend reading this page to understand paths, naming, handling of relative paths etc on windows :

http://msdn.microsoft.com/en-us/library/aa365247(VS.85).aspx

The best practice in FinalBuilder is to use Variables, there is a built in Application variable FBPROJECTDIR which points to the folder where the current project is run. So you can reference your included projects relative to the current project, e.g : %FBPROJECTDIR%…\Lib\whatever.fbp7

Thanks for comprehensive answer.

If relative paths without variable are not supported, would it be possible to add validatation to path fields in actions, that would show a warning or error if path starting with ".." is found?

We’ll look into it, but with 600+ actions and probably a few thousand properties it’s a big task.