That doesn't make sense.
I'm not placing code in myself to begin with. When I add a windows
form component, and then choose the events button in the GUI, then
double click say: OnLoad the gui creates a function for me at the end
of the document called OnLoad. On top of that it places a handler in
the generated code itself in the designer generated code mapping this
control to the handler. What you're asking, or suggesting is that I
not only insert handlers using the GUI but then go back and place them
outside of the generated code.
I think that you may have misunderstood me. I'm not editing that area.
I'm not touching it. Anything that should be there should be placed by
the IDE itself. The problem is that the IDE is removing my handlers
itself after I reopen a project.
Note that it does not delete the functions it just removes the maps to
them.
Gus
> That doesn't make sense.
>
[quoted text clipped - 11 lines]
> the IDE itself. The problem is that the IDE is removing my handlers
> itself after I reopen a project.
I thought you asked for a simple workaround, so I offered one. Go again and
file bug reports, but designer support for C++/CLI will quite possibly go
away entirely (it's far more complicated to support than any other
language). C++/CLI is positioned as a gateway, from .NET to any non-.NET
system, it does this well and most MVPs are encouraging MS to focus efforts
on C++ with CLR toward making that even better. Since it's so easy to mix
C# and C++ code, and any C++ programmer can immediately use C# quite well,
the brunt of design-time GUI support is always going to be focused on C# and
VB.NET
The only advantages C++ has over C# for GUIs, are things like template
metaprogramming, which are far too sophisticated to hope the designer would
ever help with.
> Note that it does not delete the functions it just removes the maps to
> them.
>
> Gus
gnassar@gmail.com - 11 Jun 2007 21:59 GMT
> <gnas...@gmail.com> wrote in message
>
[quoted text clipped - 34 lines]
>
> > Gus
My apologies if I seemed rash. Thanks for the workaround, I just am
annoyed that I may have to do this for every future project I have to
do.
Gus
Ben Voigt [C++ MVP] - 12 Jun 2007 06:32 GMT
>> <gnas...@gmail.com> wrote in message
>>
[quoted text clipped - 44 lines]
> annoyed that I may have to do this for every future project I have to
> do.
If I might suggest -- if you want good designers, use C# for the GUI and add
your C++/CLI projects as assembly references.
Can you check whether Orcas also exhibits this problem? It's unlikely that
any C++/CLI designer improvements will be made post Orcas.
> Gus