Android Question Altering name of customview class module and designer view

RB Smissaert

Well-Known Member
Licensed User
Longtime User
I have a customview class module that I would like to rename. Doing this will cause a problem in all the layout files
that have this customview added to the layout as it remains added with the old name and it won't recognize the
new name. As there are many layout files with this customview it will be cumbersome to remove all these views and
re-add them with the new name.
Is there any way to solve this problem?

RBS
 

toby

Well-Known Member
Licensed User
Longtime User
Have two versions of this file
1. The old version with the old name for existing projects
2. The new version, say clsClv2 for new projects.

This way, you don't need to change any existing projects.
 
Upvote 0

RB Smissaert

Well-Known Member
Licensed User
Longtime User
Have two versions of this file
1. The old version with the old name for existing projects
2. The new version, say clsClv2 for new projects.

This way, you don't need to change any existing projects.
Yes, that I can see that option, but I would still like to rename in the old, existing project, without deleting and re-adding that custom view
for all layout files having that custom view.

RBS
 
Upvote 0

toby

Well-Known Member
Licensed User
Longtime User
I would still like to rename in the old, existing project, without deleting and re-adding that custom view
for all layout files having that custom view.
Use a batch file to scan all .bal files and do the following on each of them:
1. convert layout file to json
2. Rename customlistview in json
3. Convert json back to layout file

How to: Bal->json & json->bal
 
Upvote 0

RB Smissaert

Well-Known Member
Licensed User
Longtime User
Thanks, that should work. I can make the changes in the json files with VBA or a VB6 .exe.

RBS
All done now and saved a lot of work by using the mentioned .bal > .json and .json > .bal converter.
I added the option to replace json strings to the converter as posted by Erel and attached a .zip of that.

RBS
 

Attachments

  • BalConverter.zip
    8.8 KB · Views: 154
Upvote 0
Top