T O P I C R E V I E W |
peter.cook |
Posted - 11/03/2003 : 04:19:03 AM Hi,
Can someone please explain why I have to SetSize the Origin C datsets in order to work correctly? For MOCA dlls this isn't required.
Does the SetSize have any affect on the Origin dataset during and after running of function?
Also, if the SetSize is required and I'm in debug mode having put a break point in say the first line of the function then it isn't picked up by the debugger when runing. I have to selectively comment out parts of the function to pick this problem up.
Cheers,
Pete
|
3 L A T E S T R E P L I E S (Newest First) |
easwar |
Posted - 11/03/2003 : 09:30:36 AM Hi Pete,
Also note that you can use the Add method in vector class to add an element to a vector or dataset. This could be useful when you are creating and using a new vector/dastaset object and do not necessarily know/want to set the size.
Easwar OriginLab.
|
cpyang |
Posted - 11/03/2003 : 09:19:29 AM SetSize is needed to allocate more rows in a column (dataset). MOCA dlls does not need this because Origin automatically add more rows when you make calls to access them.
Origin C Dataset does not automatically add rows because Dataset is derived from vector, which you will need to to allocate before you can access elements, mainly a performance issue.
CP
|
Mike Buess |
Posted - 11/03/2003 : 08:30:27 AM Hi Pete,
I'm not quite sure what you mean by SetSize being required. I rarely use SetSize with datasets.
Dataset d0("Data1",0); Dataset d1("Data1",1); Dataset d2("Data1",2); d2 = d1 - d0;
Can you give an example where SetSize is needed?
...Perhaps you mean datasets created by your function?
Mike Buess Origin WebRing Member
Edited by - Mike Buess on 11/03/2003 08:50:45 AM |