Jump to content

Adding a new child class to a parent in a built exe


Recommended Posts

Okay - so here's a question: let's say I have a parent class with a bunch of child classes and I build it all into an exe - then, later, I want to add a new child class that inherits from the parent in the exe - is there a way I can just call it by name from disk and have all the inheritance exist? If so, how do I define that in that child class so the parent knows about it?

I've got to admit that I haven't actually tried anything - I'm just mulling around an idea at the moment...

Link to comment

In the thread that Tomi M started to demo the dynamic event feature he included a demo that let you drop square circles etc.

Latter in that thread I followed-up and he posted a modified demo that showed how to do it in an exe.

In a nutwacko.gif shell...

You search for all LV classes that can be cast as the parent type without errors. The parents don't have to know about the children at compile time.

Ben

Link to comment

I've done it,

it's cool

and it's not too hard.

You simply need to put some callable command in the exe which will look at a path for your new .lvclass and within that command, run the 'Get Default Class Data'.

If that completes successfully, then your new class is loaded into memory and ready to rock and roll.

Within LVSpeak I do this by scanning my Plugin directory for all .lvclass files, running the 'get default data' and then just as a sanity check, run a common method on all of those loaded default values. The same tactic would apply to an exe

<a href="http://content.screencast.com/users/NJKirchner/folders/Jing/media/28e55bc6-47fd-42ff-a581-66ca58b37cb7/2009-12-30_1202.png"><img'>http://content.screencast.com/users/NJKirchner/folders/Jing/media/28e55bc6-47fd-42ff-a581-66ca58b37cb7/2009-12-30_1202.png"><img class="embeddedObject" src="http://content.screencast.com/users/NJKirchner/folders/Jing/media/28e55bc6-47fd-42ff-a581-66ca58b37cb7/2009-12-30_1202.png" width="364" height="190" border="0" /></a>

Link to comment

In the thread that Tomi M started to demo the dynamic event feature he included a demo that let you drop square circles etc.

Latter in that thread I followed-up and he posted a modified demo that showed how to do it in an exe.

In a nutwacko.gif shell...

You search for all LV classes that can be cast as the parent type without errors. The parents don't have to know about the children at compile time.

Ben

Hi Ben,

Can you provide a link to the Tomi M thread? I looked for it but couldnt find it.

Regards

Link to comment

Follow-up: I did some testing over the weekend and this works great! I now have a sleak application that can remain a closed product, and then when each project needs to use it they can "install" LVOOP plugins (I have several built up) and create their own that are project specific. This makes me happy.

Link to comment

Follow-up: I did some testing over the weekend and this works great! I now have a sleak application that can remain a closed product, and then when each project needs to use it they can "install" LVOOP plugins (I have several built up) and create their own that are project specific. This makes me happy.

Congrats!

You do realize that you are now responcilbe for any bug that sneaks in thru that door. oops.gif

kidding aside... i got a nice warm feeling the first time I saw my exe start and find the new functionality dynamically.

Ben

Link to comment
You do realize that you are now responcilbe for any bug that sneaks in thru that door.

Hey man - my app's only repsonsibility is to report issues it sees :)

i got a nice warm feeling the first time I saw my exe start and find the new functionality dynamically.

Mine too - although that was a looong time ago. I've done heaps of dynamic plug-in sutff before, just never LVOOP. The posibilities are endless... :)

Link to comment

Chris,

I'm a little confused about your original question. I thought you were asking about creating a new class in the dev environment that inherits from a parent that has been compiled into an arbitrary .exe, something you might want to do if you didn't have the original source code. Did I misunderstand? The responses appear to require source code access, either to inherit from the parent directly, or to implement an abstract plug-in layer that external code can inherit from.

Link to comment

Follow-up: I did some testing over the weekend and this works great! I now have a sleak application that can remain a closed product, and then when each project needs to use it they can "install" LVOOP plugins (I have several built up) and create their own that are project specific. This makes me happy.

sexy sexy sexy

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.