TreeViewFunction reusable?

THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

On 28/01/2006 at 16:06, xxxxxxxx wrote:

User Information:
Cinema 4D Version:   9.0 + 
Platform:   Windows  ; Mac  ;  Mac OSX  ; 
Language(s) :     C++  ;

---------
Howdy,

This might be more of a C++ specific question than an SDK question, but I have two CommandData's within my plugin and each one uses a dialog with its own TreeViewFunction. I was wondering, is it possible to have a Global TreeViewFunction for the plugin so that both CommandData dialogs can use the same TreeViewFunction. I tried putting it in my plugin's main header file, but got a redefinition error, because each file is including the same Main.h file. Then I tried putting it in the Main.cpp file, but then I got an undefined identifier error.

It works fine with the two separate TreeViewFunctions, but I thought it might be more optimized if I could just use one for both.

Any thoughts?

Adios,
Cactus Dan

THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

On 28/01/2006 at 21:54, xxxxxxxx wrote:

Have you tried defining your TreeViewFunctions class in a header included in both CommandData .cpp's and the TreeViewFunctions methods in a .cpp file? You'll need to create an instance for each CommandData, ala: myTVF* tvf = gNew myTVF; and pass that to each TreeViewCustomGUI.