handling resource files
Max (Weijun) Wang
Weijun.Wang at Sun.COM
Thu Aug 13 23:49:08 UTC 2009
After you create a control in a dialog, do you have the chance to
manually tweak the ID assigned to it? (say, in a property dialog). If
so, you can give each of your developers a range.
Or better, is it possible to config the Visual Studio tool to generate
a random ID for each newly added control?
Thanks
Max
On Aug 14, 2009, at 12:08 AM, Cory Riddell wrote:
> Colin Caughie wrote:
>>
>>> I really like this idea. Sadly, I don't think it will work because
>>> the
>>> resource.h file that contains all the id definitions is created and
>>> modified by Visual Studio (add a control to a dialog, a new id is
>>> allocated).
>>>
>>> I like the idea, so I'm thinking about a step that takes the VS
>>> generated resource.h file and renumbers it, but that's getting close
>>> to
>>> my threshold of too kludgy.
>>>
>>> I'm actually surprised that this doesn't seem to be much of a
>>> problem.
>>> Either that, or I'm not searching on the right terms.
>>>
>>
>> Visual Studio resource files are a version control nightmare,
>> there's no getting around it. Our biggest gripe is the way VS 2005
>> rewrites the string tables in a different order when you edit
>> something completely unrelated; if this happens when there are
>> multiple branches (which there almost always are in our team) the
>> next merge is going to be a major headache.
>>
>> It's bad enough that I've considered writing a custom merge tool
>> just to merge resource files. If I ever do I'll let you know. :)
>
> Definitely let me know. Thanks.
>
> I'm thinking more about Bruce's suggestion of a pre-commit hook. I
> think all it would really need to do is sort the resource file into
> alphabetical order, then renumber everything. This should make
> merging more reliable. It isn't foolproof, but it work most of the
> time. There are still problems with code that uses a range of
> resource ids. It would be possible for a new definition to end up in
> the middle of what is supposed to be a contiguous block of ids. If
> that does prove to be a problem, a naming convention that identifies
> a resource id as being part of a range could probably prevent most
> problems.
>
> I'm glad I'm not the only person with this problem. I was starting
> to think I was doing something wrong.
>
> Cory
>
>
>
> Cory
>
> _______________________________________________
> Mercurial mailing list
> Mercurial at selenic.com
> http://selenic.com/mailman/listinfo/mercurial
More information about the Mercurial
mailing list