George:
 
Unfortunately, it seems PolyFill2_VVU suffered from the same problem, so I'm fixing it too...
 
Stephen.
 
 
George:
 
Mea Culpa. It seems that there is an error in the GX wrapper code for Trend2_VVU, as you suspected.
Unfortunately, I can think of no work-around at the present time (at least until v5.1.3), unless your data are equally spaced, and you can use Trend_VVU, which should work okay. My apologies!
 
 
Stephen

_______________
Geosoft Inc.
Stephen Cheesman
[EMAIL PROTECTED]
(905) 315-8207

Software and services for effective earth science decision-making.
Free Oasis montaj interface now available at http://www.geosoft.com
 

-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: December 21, 2001 2:48 PM
To: [EMAIL PROTECTED]
Subject: RE: [gxnet]: Trend2_VVU

Stephen,

 

The code I sent you was the code in its current, developmental state, after several hours of attempting to narrow down and fix the problem.  I personally would NEVER create an object and let it be without destroying it and/or assuring it is destroyed gracefully  (at least not knowingly!)  :-).  You will note that there is a section of code preceding the loop, where I intended that all VA and VV objects would be created.

 

The call to Trend2_VVU is failing on the FIRST time through the loop.  Therefore, the loop and whether or not objects are created inside of it, is immaterial.  Furthermore, fixing the VV creation problem does not change the error encountered in the call to Trend2_VVU.

 

So does the function Trend2_VVU work or not in an independent trial?  Can anyone either verify that it does work (so I can figure out what it is that is making it fail in my case) or confirm that it doesn't work (so I don't 'waste' any more time)?

 

David George.

 

 

-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] On Behalf Of Stephen Cheesman
Sent:
Friday, December 21, 2001 8:47 AM
To: '[EMAIL PROTECTED]'
Subject: RE: [gxnet]: Trend2_VVU

 

George.

 

Thank-you for the code. I'm answering this in GXNET because the answer is useful to many programmers.

 

I don't know if this will solve your problem, but it may, and it's something I found recently in one of our own GXs.

 

The following construction was present:

 

 

hLine = FirstSelLine_DB(hDB);
while (iIsLineValid_DB(hDB,hLine))
{

    .....  (other code).

 

      hVV = Create_VV( REAL ,  0);    // create object inside the loop

   ...... (other code)

 

  // --- Advance to Next hLine ---        

  hLine = NextSelLine_DB( hDB , hLine );
}

The problem is that the object is re-created over and over again for each new line. While the GX compiler is set up to keep track of each object as it is made, and automatically destroys them afterward, hopefully preventing what is known as a "memory leak", this certainly stresses the system, especially if there are a lot of objects and a lot of lines.

 

It is (much) preferred to use the following construction:

 

hVV = Create_VV( REAL ,  0);        // create outside the loop

 

hLine = FirstSelLine_DB(hDB);
while (iIsLineValid_DB(hDB,hLine))
{

   ...... (other code)

 

  // --- Advance to Next hLine ---        

  hLine = NextSelLine_DB( hDB , hLine );
}


Try it with these changes and let me know if it works (privately).

 

Stephen

 

_______________
Geosoft Inc.
Stephen Cheesman
[EMAIL PROTECTED]
(905) 315-8207

Software and services for effective earth science decision-making.
Free Oasis montaj interface now available at http://www.geosoft.com
 

 

 

-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent:
December 20, 2001 9:39 PM
To: [EMAIL PROTECTED]
Subject: [gxnet]: Trend2_VVU

Has anyone had success using the function Trend_VVU?

 

It returns an error for me complaining of an invalid handle for the "X" VV.

 

It is not called in any of the source files in GX Developer so I can not find another example of its use.

 

I am sure that the VV I am passing to it is valid.

 

I am not sure that the VV I am passing to it is what it expects.  I know the handle is valid but it may not contain acceptable data.

 

VVU.gxh says the VV should have "X spacing" but I am passing a VV with "X values."

 

I'm curious if anyone has ever used this function or if it might have a bug.

 

Regards,

 

David George

970 263 9714

 

Reply via email to