Actor Framework Discussions

cancel
Showing results for 
Search instead for 
Did you mean: 

About the use of AF Extension Kit

Solved!
Go to solution

I recently learned the AF message forwarding tool released by ZYAN in VIPM and wanted to use it in combination with the panel Manager actor released by MGI. Originally, the panel actor inherits from the monitor actor. Now I make the monitor actor inherits from the forward message actor. Then I changed the launch nested actor into launch forwarding actor at the bottom of the launch nested panel, and finally my actor successfully obtained the capability of message forwarding and panel management, but inherited several actors in this way. For this kind of expansion pack about AF, besides inheritance, is there a better way to use it

0 Kudos
Message 1 of 5
(1,246 Views)

@Morefun wrote:

...finally my actor successfully obtained the capability of message forwarding and panel management, but inherited several actors in this way. For this kind of expansion pack about AF, besides inheritance, is there a better way to use it


So I wrote most of the Zyah AF Msg Forwarding Utility and we also struggled with this. The generic answer is "composition", but there are some parts where inheritance just makes things a lot easier. Still, I'm working on making some changes to the utility that allow developers to rely less on inheritance and more in favor of composition.

 

I can't speak to the MGI Panel Actor functionality, but with the changes to the Forwarding Utility my hope is that developer will be able to composite the desired functionality into their own Base Actors as needed rather than adding another layer of inheritance.

 

I realize that probably isn't the silver bullet you were hoping for, but it's the best I've got at this point. If we make any breakthroughs, I'll probably post something about it here.

CLA CLED AF Guild
0 Kudos
Message 2 of 5
(1,237 Views)

Yes, Casey .Thank you for your dedication to message forwarding actor. As the ZYAN dynamic diagram illustrates, I use it to overwrite the interface's dynamic method messages as little as possible in my application. My query is that all of my nested model actors and view actors need message forwarding, all of my view actors need panel management, So I inherited it from all actors, and it looked stupid, but I just couldn't do it at first, and I'm not very good at composing, so I'm going to try this technique myself in my base actor, It would be great if you could publish some labview examples of how to use compositions to build base actors with message forwarding capabilities, but that might take some of your personal time.

0 Kudos
Message 3 of 5
(1,216 Views)
Solution
Accepted by topic author Morefun

@Morefun wrote:

It would be great if you could publish some labview examples of how to use compositions to build base actors with message forwarding capabilities, but that might take some of your personal time.


For now, what you can do is just recreate the methods that are in the example base Actor in your own, but that still leaves you with the Panel Actor stuff as a separate inheritance layer. If we come up with other examples, I'll let everyone know.

CLA CLED AF Guild
0 Kudos
Message 4 of 5
(1,158 Views)

I am looking forward to your excellent work

0 Kudos
Message 5 of 5
(1,146 Views)