LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

Panel callbacks problem

Solved!
Go to solution

I created one panel ,wrote its callback.but later I deleted that panel as I don't felt its need.I already had 4 panels working in project.this was 5th.I deleted that panel from .uir also its callback prototype ,its handle,its defination.but on running project it saying that callback function with that panel's name is not found.its saying

 

Error in call to load panel

parent panel handle:0

Panel resource ID :1

error code: 86

 

 

what is this message exactly.???

0 Kudos
Message 1 of 8
(4,597 Views)

Hi,

 

open your GUI and then use the menu command View / Preview User Interface Header File. In this file you can search for all callback function names and where (i.e. for which control, on which panel) they are defined.

 

The error code -86 means: The specified callback function is not a known function. (see the help on User Interface Library Error Codes)

 

So I would assume that the callback you have deleted is also called from a different control/panel.

0 Kudos
Message 2 of 8
(4,591 Views)

I have not given call to that call back function from other file or function.

Will  constant name have any effect on its removal??

I mean I gave name to one panel  as PANEL then I removed that panel and I  again created another panel with same constant name.

Will it conflict in GUI header file??

because I forgot to remove its #define line from UIR header file.

0 Kudos
Message 3 of 8
(4,588 Views)

The include file associate with the UIR is integrally rebuilt every time you save the UIR, so errors like the one you imagine are hard to happen (I cannot remember a single event like this in my 15+ years experience of CVI!).

Have you tried searching into the header file as Wolfgang suggested?



Proud to use LW/CVI from 3.1 on.

My contributions to the Developer Community
________________________________________
If I have helped you, why not giving me a kudos?
Message 4 of 8
(4,585 Views)

@MAPJ wrote:

because I forgot to remove its #define line from UIR header file.


You NEVER should edit the UIR header file yourself...

 

If you inspect the UIR include file you will find the two lines:

 

/* WARNING: Do not add to, delete from, or otherwise modify the contents  */
/*          of this include file.                                         */

Message 5 of 8
(4,581 Views)

Sorry for late reply[Thursday is holiday for us].

Thanks for information given by you both,I wasn't knowing that GUI header is rebuilt every time.

I need few more information to clarify my doubts.

 

 

1)If UIR file name is xyz.UIR then its header file which is automatically generated is also xyz.H,that is, their  name remains same just extension differs.correct??

If some one changes the its header file name then where will be changes in GUI will be written??

 

 

xyz.UIR, xyz.H ,abc.H

 

When I took charge of project,whose GUI was all ready designed by some one else,I found two header files for GUI[I mean in both files # define statements were written for GUI objects.files stated above]And both .h were included in file where main is written[that is our main file from where all other functions are called].

 

So as per observation in 1) I thought abc.H is not needed so removed it,but then program was giving error[for missing definition]. Now if I had included xyz.h in my main file as well as in all my sub file's headers then what could be the problem??

 

And

I am first time using LabWindows/cvi.I am fresher in experience [1 and half month].

 

Sorry for my long description.

 

 

0 Kudos
Message 6 of 8
(4,569 Views)
Solution
Accepted by topic author MAPJ

Q1: Yes, the UIR and related include file always have the same name and different extension. If at some moment you rename (or delete, which is the same) the include file, then it is rebuilt but CVI the first time you save the UIR.

If you happen to rename or delete the include file and run the project without saving the UIR, you shoud get compilation errors due to missing definitions of panels/contols used in the program.

 

Q2: You may have several UIR in the project each of them with its associated include file, so when you removed the #include for one of them you got the errors when running the project.

 

And finally, CVI is a fantastic and powerful developmente environment: find the time to deep into its characteristics while you are using it and you willl gain more and more control over an instrument that can make your time a lot easier! This forum is a good resource for informations, as well as documentation that comes with the product and knowledgbase and documents on this site.



Proud to use LW/CVI from 3.1 on.

My contributions to the Developer Community
________________________________________
If I have helped you, why not giving me a kudos?
Message 7 of 8
(4,567 Views)

Really thanks for your help and for so immediate reply for such long confusing description.

 

I got exact problem.I traced it by your suggestion.

And I removed 2nd abc.h file and understood where was problem.

Now I am clear about UIR and its .H.

Thank you very much..

With your help I will learn more.

0 Kudos
Message 8 of 8
(4,562 Views)