wopag
  • wopag
  • Member Topic Starter
2011-07-21T12:10:01Z
I keep getting igrid control 4.7 Run-Time error '0' upon exiting a current program in development ?

any pointers ?



Ive also now started to get

Run time error '97' can not call friend function on object which is not an instance of defining class (this is terminating the same program from within the IDE )
Igor/10Tec
2011-07-22T13:53:08Z
Read this forum post which will help you to prepare your request to our tech support, so we can work on it:

http://www.10tec.com/Forum/yaf_postst11_Required-info-to-report-a-problem.aspx 
wopag
  • wopag
  • Member Topic Starter
2011-08-05T14:05:07Z


http://dl.dropbox.com/u/4786852/error.zip 

http://www.codejock.com/downloads/  (they have an evaluation version for download)


Run the example and just make one of the grids have focus. Thats enough so that when you press "STOP" in the IDE, iGrid crashes.......


Ive also had problems with igrid using the codejock "skinning" component. Heres what they say about iGrid :-

"Sorry, afraid problem somewhere else. I tried this sample and totally disabled our hooks and still see crush. Seems this control don't like when system send WM_SYSCOLORCHANGE message indicating that syscolor was changed - we have to send it to notify windows to refresh. "



wopag
  • wopag
  • Member Topic Starter
2011-08-08T08:40:32Z
Seems that the error only occurs if you press STOP from within the IDE - which is a problem whilst debugging at this early stage of development :S


Any chance any DEV can have a look see ?



edit:

I have traced it down to the fast that the STOP button is pressed when the focus is on the iGrid control when its pressed. As a quick work around on mouseup im shifting focus to another control......
wopag
  • wopag
  • Member Topic Starter
2011-08-08T10:57:10Z


the workaround doesnt stop it crashing on exit from the program in runtime.....

Igor/10Tec
2011-08-08T14:44:59Z
We have downloaded the CodeJoke evaluation controls and played with the error demo app. Here are the results:

Originally Posted by: wopag 


Run the example and just make one of the grids have focus. Thats enough so that when you press "STOP" in the IDE, iGrid crashes.......



Yes, there is a problem, but that's not an IDE crash. We tested in Win7 Ultimate x64. We get this message box:

===========================
iGrid Control 4.7
...........................
Run-time error '398':
Client Site not available
===========================

The most funny thing is that we never got this problem if we used iGrid outside of the CodeJoke suite.

It seems, something goes wrong when we have their controls on the form. Most likely, they subclass the form and use native Windows messages to do their work, but what can we say without their source code?

But even if we have this in the IDE, in the compiled exe all works fine - with or without the manifest file that should enable visual styles in the app.

And why should we press the STOP button on the Debug toolbar? This should be an emergency case, but normally you should close the app using the regular way - the window title's close button or ALT+F4. The fact is that this can work good with the intrinsic VB controls, but if we are using such advanced techniques as skinning based on low-level API calls (even in the form of ActiveX's), IT"S NOT ADVISED to hit 'STOP' as you ignore the cleanup code and this may lead unpredictable behavior and results in your app.


Originally Posted by: wopag 


Ive also had problems with igrid using the codejock "skinning" component. Heres what they say about iGrid :-

"Sorry, afraid problem somewhere else. I tried this sample and totally disabled our hooks and still see crush. Seems this control don't like when system send WM_SYSCOLORCHANGE message indicating that syscolor was changed - we have to send it to notify windows to refresh. "



Really? But why then iGrid works properly when we change say the current Windows theme or some colors in it, and the same WM_SYSCOLORCHANGE message is sent to iGrid and it is processed with no errors?
wopag
  • wopag
  • Member Topic Starter
2011-08-09T14:44:39Z


Thanks for the quick reply.

I generally never press the "Stop" button, but whilst in development the problem happens when an error is caught. Like I say I have a workaround which is holding together for the time being.


"skinning" - im not going to pre-sue the matter as it was only going to be a nicety anyway. More trouble than its worth to be honest. If im having trouble with it on y development machine think of the problems when its out in the wild :S
wopag
  • wopag
  • Member Topic Starter
2011-08-09T15:19:54Z


Eeeek. Its now happening outside the IDE now. Im now getting Runitime Error '398' client side not available - I'll have to strip down what I have as an example.
wopag
  • wopag
  • Member Topic Starter
2011-08-10T09:22:46Z


Ive traced it down to the fix I put in for the "STOP"


Ive updated the sample code to demonstrate - either iGrid is doing something illegal or CodeJock is ?

http://dl.dropbox.com/u/4786852/error.zip 

The offending line is in frmpane,


Private Sub grid_MouseDown(Button As Integer, Shift As Integer, ByVal x As Single, ByVal y As Single, ByVal lRow As Long, ByVal lCol As Long, ByVal eCellPart As iGrid470_10Tec.ECellParts, bDoDefault As Boolean)
    Text1.SetFocus     ' <<<<<<<<<<<<<<<<< OFFENDING LINE!
End Sub
Igor/10Tec
2011-08-11T10:04:44Z
wopag, there is a very simple way to detect where a problem comes from a component or not. You just need create a brand new project with the suspicious component without others, and test it 🙂.

If you do the same with iGrid, i.e. create a new form with one iGrid and one textbox, and place this code in the form module:

Private Sub iGrid1_MouseDown(Button As Integer, Shift As Integer, ByVal x As Single, ByVal y As Single, ByVal lRow As Long, ByVal lCol As Long, ByVal eCellPart As iGrid470_10Tec.ECellParts, bDoDefault As Boolean)
   Text1.SetFocus
End Sub

Then set the breakpoint in this statement, and press "STOP" in the IDE, nothing happens if we have only iGrid on the form.
wopag
  • wopag
  • Member Topic Starter
2011-08-11T10:14:27Z

thanks you for your patience.

The problem I have is that both iGrid and the Codejock suite all work perfectly when they are not used together.

I have posted the same error to both you and Codejock to which you both have replied ... "its not our problem" which obviously doesn't help me.........

I have a current workaround in which I detect if im running in the IDE or not on the offending lines. This workaround seems to be holding together fine.



/Stu
Igor/10Tec
2011-08-11T10:22:27Z
Originally Posted by: wopag 


thanks you for your patience.



No prob! That's our work, here, at tech support, to do our best to make our customers happy when using our products - as much as it's possible in the modern complex world of software development.

What we would add to this topic is that the potential problem of the CodeJock control's architecture appears when you place iGrid on the form 🙂! We do not want to say that CodeJock programmers are bad - no, but it is really hard to develop a good and 100%-robust solution based on WinAPI today. Maybe, the problem is even deep inside MS Windows. From time to time, we face that when working heavily with WinAPI.

But if you have the problem only in IDE and (what is most important) ONLY when you press 'STOP' on some lines, we guess we can live with that.

The only thing we can ask you is to place your workaround here for other users - maybe, it will help others in the future. Thank you as well!