Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ERROR: GetXDataFromRef(Type 4097, Line 292) pElemRef is NULL #498

Open
rohan9490 opened this issue Jan 12, 2023 · 1 comment
Open

ERROR: GetXDataFromRef(Type 4097, Line 292) pElemRef is NULL #498

rohan9490 opened this issue Jan 12, 2023 · 1 comment

Comments

@rohan9490
Copy link

NOTE: For issues with the GUIslice Builder, please file a report instead at:
https://github.com/ImpulseAdventure/GUIslice-Builder-source/issues

ERROR: GetXDataFromRef(Type 4097, Line 292) pElemRef is NULL

I am keep getting this error, I check all the reference related to this variable. I think I generated code and then I replace all the elements and re-generated the code.

extern gslc_tsElemRef *IND[32];

gslc_tsElemRef *IND[32] = {NULL};

gslc_tsElemRef* m_pElemCBCheckBox = NULL;

for (int i = 0; i < 16; i++)
{
gslc_ElemXCheckboxSetState(&m_gui, IND[i], true);
}

// create checkbox E_ELEM_CHECK1
pElemRef = gslc_ElemXCheckboxCreate(&m_gui,E_ELEM_CHECK1,E_PG2,&m_asXCheck1,
(gslc_tsRect){20,20,30,30},false,GSLCX_CHECKBOX_STYLE_BOX,GSLC_COL_GREEN,false);
gslc_ElemXCheckboxSetStateFunc(&m_gui, pElemRef, &CbCheckbox);
m_pElemCBCheckBox = pElemRef;

@Pconti31
Copy link
Contributor

@rohan9490 the code segment you presented has all values of IND[32] to NULL so yes you will get this error.
Maybe you could zip a small example of what you are trying to accomplish and post it? If so, I'll take a deeper look.
Otherwise, maybe explain your logic.
Paul--

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants