Developer forums (C::B DEVELOPMENT STRICTLY!) > Development
New scripts through plugin installation
mandrav:
--- Quote from: yop on October 03, 2007, 01:05:01 pm ---You know what comes next don't you? I 'll ask for adding new project wizards automatically ;-)
--- End quote ---
Hehe, I saw this one coming ;).
mandrav:
@yop:
btw, have you seen this?. Maybe it could be of help for QT's moc/uic tools?
yop:
Yeap I 've seen it (since I picked up on my plugin again I 'm watching the project closely ;)) and it sure can work. I am trying to find some time to check how it would work for Qt (moc has to be run on the project header files and uic in the ui (designer) files) and post it on the wiki. But still using the plugin will be easier to set the whole thing up and will feel closer to what Qt devs have learned to expect and use when setting up Qt projects (my ui ideas come from existing projects for Qt support like the eclipse integration, KDevelop etc). I can cover the whole Qt support either way, my issue is that I don't have that much time to work on it (I 'm trying though)
yop:
OK it was my fault, I regenerated the node in the plugin's registered hook for project loading, the script had nothing to do with it. I have a strange behavior though as it seems that the hook doesn't get called on the first project startup (or the "extended" project properties are not taken into account) right after the wizard has ended. If I reopen the project then everything is as expected. I 'll investigate a bit further.
yop:
I 'm on to something. I have this hooked to the project load/unload:
--- Code: ---void QtWorkbench::OnProjectLoadingHook(cbProject* project, TiXmlElement* elem, bool loading)
--- End code ---
Now when the new project wizard finishes this function get called 3 times and each time it gets called with loading = false :?. This is why I had the strange behavior all the way. When the project gets loaded the plugin checks if it should handle the project and then when the project closes it writes back (depending on the user requests) if it should handle the specific project. Now since the loading never gets the true value my plugin doesn't get the state that it should handle the project and during the project closing it always writes the false value in the project file. What I would expect:
Wizard finishes -> hook gets called with loading = true and nothing else, just resume the typical handling of an open project.
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version