Nathan Mates napisał(a):
>> nobody can help me?
>
> You waited about 7 hours between postings. How about a little
> patience? How about providing a lot more detail as to what you're
> doing?
ok i'll wait :D
and the details
in umanaged code i have many classes like
Pseudo code
//nf.h
class nf
{
integers
vectors
void somefunctions()
}
//nf.cpp
#pragma managed(push, off)
#include "main.h"
#include "nf.h"
void nf::somefunctions()
{
//doing some operations on vector
//and setting integers
}
#pragma managed(pop)
and all of them are used by
//SCA.h
class SCA
{
set()
get()
public:
vector<nf> vnf;
vector<vector<int>> vvout;
int makesth()
}
//SCA.cpp
#pragma managed(push, off)
#include "main.h"
#incldue "sca.h"
void SCA::makesth()
{
vnf.push_back(somecountedvalue);
return;
}
#pragma managed(pop)
in managed code i'm forwarding pointer to SCA (main unmanage class)
and then only read public values or execute functions form unmanaged
class SCA
my MAIN manage file looks like that
// gui.cpp : main project file.
#pragma managed(push, off)
#include "source\main.h"
...
#include "source\nfile.h"
#include "source\fun08.h"
...
static SCA Sca; //< --- thats my unmanaged class
#pragma managed(pop)
#include "source\guiTabPageFUN.h"
#include "source\guiTabPageN.h"
...
#include "Form1.h"
using namespace GuiNameSpace;
[STAThreadAttribute]
int main(array<System::String ^> ^args)
{
Application::EnableVisualStyles();
Application::SetCompatibleTextRenderingDefault(false);
Application::Run(gcnew Form1(&Sca));
return 0;
}
everything compiles without errors,
problem shows when i'm trying to fill datagrid or makeing some new
dynamic tabs on tabcotrol.
One by one it looks like that
user is pressing some button,
then class SCA if filling vectors with some large data and sets some
varibles , till that moment everything is ok ( all varibles have good
values, and vectors are filled up ) , I've checked with debuger
next step is refreshing forms (unmanaged code).
Form refreshing function use pointer on class SCA to get values, for
example
while(datagridview->rows->count!=Sca->vvout.size())
{
datagridview->rows->add(1);
datagridview->rows->cell[i][j] = Sca->vvout[i][j];
}
and when something like that is done (datagrid adds rows or tabcontrol
gets new dynamic created tabs), some values in my class SCA are filled
with null and some vectors are cleared.
Where can be bug, am I doing something wrong?
Regards
frank