[Gambas-user] Gambas custom controls : renaming the exported class

adamnt42 at ...626... adamnt42 at ...626...
Thu Jun 23 05:04:25 CEST 2016


Well this is a bit obscure but for me it's a big pain.

When developing a custom gambas control I quite often include a test form inside that project. That form is used extensively during development of the custom control (i.e. even before I package and deploy the control in client projects, and sometimes even later when issues arise...)  Now, here's the problem. If I have given the control a "development" name and I later want to give it a more meaningful name, the entire custom control project collapses because the renamed class does not exist in the test form.

An example might illuminate.  I am working on a "lightweight" version of the native DirChooser control - in essence, I want to get rid of much of the extended functionality of the native control and just be able to display a directory tree, no file view, no added vitamins etc. So, I copied the native source and have expunged much of the features I do not need. The goal is to just display a directory tree in a side bar, so I need to get rid of the extra features and just show the tree. It's a bit like the IDE project tree sidebar but even simpler.

So developmentally, I (like the fool I am) renamed the "target" control class as XDirChooser.  Now I want to rename that class "LWDirChooser" (for Light Weight) so it will appear in the IDE quite visibly. But having done that, the test form is now invalid and the component wont compile.... grrr.  To work around this I need to edit the test.form file and change the XDirChooser to a LWDirChooser, then it all works.

But it is a right royal PITA!

This bug is raised in the spirit of your comment at the end of the "How to develop Program Components in Gambas" page:
Conclusion

I try to find the easiest way of making components with the IDE. It is not perfect yet, but if you have any comment, question or problem, please use the mailing-list!

-- 
B Bruen <adamnt42 at ...3379... (sort of)>




More information about the User mailing list