This is possible if we manually create a FileSystemWatcher and watch the 'parts' directory (here some dlls inside the folder) and track any changes, then we reflect the changes into a container which allows for recomposition.
Does MEF support auto-updating when the Container is using a DirectoryCatalog and it automatically for us ?
You need to call the Refresh method of the DirectoryCatalog for it to update with new contents. This will trigger recomposition in any containers hooked up to the catalog. You can create a FileSystemWatcher and call the Refresh method when anything changes.
Related
I am working on an application which interact with a database and construct reports, I want this application to be extensible and I can in the future to integrate custom report builders to the application as plugins.
I have some question about the plugin architecture supported by Qt:
Can I load the plugins in there own processes ?
How could I send some custom QML type from the plugin to main application and hook some event handlers on it.
Another question: is there any framework to develop service based qt application ?
Can I load the plugins in there own processes ?
Not with the plugin mechanism (QPluginLoader). The plugin mechanism dynamically loads libraries (different threads are possible). However, your plugins can be a normal application, that gets started by your main application via QProcess, and exchange data via stdin/stdout (or other IPC mechanisms)
How could I send some custom QML type from the plugin to main application and hook some event handlers on it.
In case you use normal plugins, simply add method that returns the created QML object. Have a look at:https://doc.qt.io/qt-5/qtqml-cppintegration-interactqmlfromcpp.html#loading-qml-objects-from-c
In case you want to use the multi process version, it gets slightly more complicated. Pass the QML code via stdout and create it in your main application. Pass some "communicator" object to this created QML object, so that the QML type can send back data via that communicator to it's original process.
I want to deploy my PHP application using Capistrano 3. My application uses Symfony 2 as a framework and Phing as a built system. I have installed capistrano-symfony so I can use Symfony commands from inside Capistrano.
The problem is that it also modified the deployment flow. Specifically, it adds two tasks here:
https://github.com/capistrano/symfony/blob/master/lib/capistrano/tasks/symfony.rake
after "deploy:updated", "deploy:clear_controllers"
after "deploy:updated", "deploy:assets:install"
Is there any way to remove these hooks from the flow again? These actions are already performed by my Phing build script (which is invoked by Capistrano). There is no need to run them again.
Finally figured it out, partially. I can remove named before hooks, but not before blocks or after hooks (because they are converted to a block inside Rake). I added this to my deploy.rb:
Rake::Task['deploy:updated'].prerequisites.delete('composer:install')
I figured out that I didn't need any of the after hooks, so I simply cleared them:
Rake::Task['deploy:updated'].actions.clear()
The only thing I can't figure out yet is how to clear specific after hooks, because they end up as blocks (i.e. anonymous functions).
You could just clear the task itself;
Rake::Task["deploy:clear_controllers"].clear
This way the action will still be invoked, but without any effect.
I want to use web worker to play a sequence of sounds that depends on Meteor's Session variables. So I can't really put it in the public folder.
Does it I mean I must wrap it into a package in order to use web worker?
Meteor is based on connect, so, you can put the file worker.js outside the app folder (make it not loaded), then use your self-defining router
.use('/worker.js', FILEPATH).
The /public folder is not for scripts. Sounds like a client-side task – put it in the /client folder (maybe inside a Meteor.startup() function).
I've made a change to an object (added a class attribute) inside a web service and published the service. On a separate project, updating the web service reference (in Visual Studio) yields no change, and the newly added attribute is nowhere to be found.
I've confirmed that the change has been correctly published and that the new attribute is not somehow hidden from the outside, by looking at the service contract in a browser. Also, deleting the reference and adding it again works, but it feels cumbersome to have to do it all the time a change has to be done.
Is this some configuration issue or just a feature I have to learn to live with?
I upload my flex client-side swf app to some website that loads different swf's on it's site. So you see your application floating in that website. My app is Flex swf app and has onCreationComplete() that starts the flow of logic. Now I want to do cleanup state and save state in a shared object when the application unloads (or probably exiting event, or closing event..) So do we have any function that I can implement and the flash platform automatically calls that function when the swf is unloading/closing/exiting?? (just like the onCreationComplet() function)
some thing like onUnloading(), or onUnload() or onClosing()...
Thanks
You could add an event listener to your main (root) object and have your method execute on Event.REMOVED_FROM_STAGE or add the listener to root.loaderInfo and execute on Event.UNLOAD.