Board index » cppbuilder » How place certain event handler explicitly in individual *.cpp file

How place certain event handler explicitly in individual *.cpp file

    How can I place definition of IDE - managed event handler (not its
prototype) in other "*.cpp" file, not in location, determined by IDE. I want
do it without loss tracks of event handler by the IDE and, therefore, its
functionality.

    For example, when I create event handlers for MainForm, all their
definitions  will be placed by IDE in "MainForm.cpp" file by default. As the
project grows, "MainForm.cpp" (and others as well) became inconvenient to
deal with. Again, how can I place certain event handler explicitly in
individual *.cpp file without loss of IDE functionality.

    When I manually CUT&PASTE such fragment of code, IDE lose it's tracks
and I can't reach it double-clicking corresponding field in Object
Inspector. Next time it takes a lot of efforts remember&find location of
this code fragment.

    Any help is highly appreciated.

    Yuri.

 

Re:How place certain event handler explicitly in individual *.cpp file


Quote
Yuri wrote in message <3b13446e$1_1@dnews>...
>    How can I place definition of IDE - managed event handler (not its
>prototype) in other "*.cpp" file, not in location, determined by IDE. I
want
>do it without loss tracks of event handler by the IDE and, therefore, its
>functionality.

I doubt you can configure the IDE to put generated event handlers in
a different file.  I would leave all the event handlers in your main form
file and put anything that's not an event handler in a different file.
Maybe
that will help you clean up your code?  Also, you might consider using
Actions, which allow you to abstract conceptual tasks, yet access them
from any interface element in your program.

Dave

Re:How place certain event handler explicitly in individual *.cpp file


Quote
----- Original Message -----
From: David B. Held <dh...@codelogicconsulting.com>

Newsgroups: borland.public.cppbuilder.ide
Sent: Tuesday, May 29, 2001 10:36 PM
Subject: Re: How place certain event handler explicitly in individual *.cpp
file

> I doubt you can configure the IDE to put generated event handlers in
> a different file.

    Thanks a lot, Dave. I just wanted to be sure about it.

> Maybe
> that will help you clean up your code?  Also, you might consider using
> Actions, which allow you to abstract conceptual tasks, yet access them
> from any interface element in your program.

    In addition to Actions there is Class Explorer, which I hope to use for
navigation through my code.

    Thanks a lot.

Other Threads