
EsGRID grid gadget 2.1. Don't post here!

PB 6.21 beta, PureVision User
Hi Srod, I get an error with PB4.20 beta 2
I added a procedure In your code (egrid5_demo9), and a Menú Item
If I comment this line: ;MessageRequester("TEST IN COL1, ROW0", tarea)
the program give me an Invalid Memory Access in the previous line ( tarea.s = egrid_GetCellText(1, 1,0)
but if I uncomment it, program works fine un it exits of this proc :roll:
(I don't know if is a EGRID error or PB 4.20beta2 error, because in PB4.10 (with previous Egrid version) it works great)
Any help? thank you
I added a procedure In your code (egrid5_demo9), and a Menú Item
If I comment this line: ;MessageRequester("TEST IN COL1, ROW0", tarea)
the program give me an Invalid Memory Access in the previous line ( tarea.s = egrid_GetCellText(1, 1,0)
but if I uncomment it, program works fine un it exits of this proc :roll:
(I don't know if is a EGRID error or PB 4.20beta2 error, because in PB4.10 (with previous Egrid version) it works great)
Any help? thank you
Code: Select all
Procedure TEST_PROC()
Debug egrid_GetCellText(1, 1,0)
tarea.s = egrid_GetCellText(1, 1,0)
;MessageRequester("TEST IN COL1, ROW0", tarea)
EndProcedure
Procedure.l MyCellCallBack(egrid, uMsg, *cellinfo.egridCellInfo)
Protected result, width, height
Select uMsg
Case #egrid_NotifyCellType
If *cellinfo\column = 0
*cellinfo\celltype=#egrid_CustomCell
EndIf
Default
result = #True; This accounts for all messages we have decided not to process.
EndSelect
ProcedureReturn result
EndProcedure
;******************************************************************************************
;*************************************WINDOW + GADGET LIST*********************************
If OpenWindow(0,0,0,640,300,"EsGRID demo 9.",#PB_Window_SystemMenu|#PB_Window_SizeGadget|#PB_Window_MinimizeGadget|#PB_Window_MaximizeGadget|#PB_Window_Maximize|#PB_Window_ScreenCentered) And CreateGadgetList(WindowID(0))
;******************************************************************************************
CreateMenu(0,WindowID(0))
MenuTitle("test")
MenuItem(1, "testing")
;********************************************EGRID*****************************************
;Create an egrid with resizable columns.
egrid_CreateGrid(1, WindowWidth(0)/4, WindowHeight(0)/8, WindowWidth(0)/2, WindowHeight(0)/2,48,#egrid_GridLines|#egrid_HeaderDragDrop|#egrid_AlwaysShowSelection, #egrid_ResizeColumnsTrue|#egrid_MultiLineText)
;**********************************SET CELLCALLBACK FUNCTION*******************************
;Set the callback early to avoid massive flickering when populating the egrid with initial data.
egrid_CreateCellCallback(1, @MyCellCallBack())
;******************************************************************************************
;***************************************ADD DATA TO EGRID**********************************
egrid_AddColumn(1,0,"CUSTOM CELLS",120)
For i = 1 To 10
egrid_AddColumn(1,-1,"",80) ;Some dummy columns.
Next
egrid_AddRows(1,-1, 20) ;20 rows.
;******************************************************************************************
;*****************************************EVENT LOOP***************************************
egrid_SetCellText(1, 1,0, "Hi, Im a test")
Repeat
EventID = WaitWindowEvent()
If EventID=#PB_Event_Menu And EventMenu()=1
MessageRequester("hello", "go to TEST_PROC")
TEST_PROC()
EndIf
Until EventID = #PB_Event_CloseWindow
MessageRequester("info", "end program")
EndIf
End
Last edited by zikitrake on Wed Jan 30, 2008 1:59 pm, edited 1 time in total.
PB 6.21 beta, PureVision User
Confirmed.
The problem only seems to occur when using the compiled library version of EsGRID. When I use EsGRID as a source code include, it works fine with PB 4.2 beta 2.
I thus suspect a problem with Tailbite and am therefore unsure that I'll be able to resolve this any time soon.
I'll keep investigating however.
The problem only seems to occur when using the compiled library version of EsGRID. When I use EsGRID as a source code include, it works fine with PB 4.2 beta 2.
I thus suspect a problem with Tailbite and am therefore unsure that I'll be able to resolve this any time soon.
I'll keep investigating however.
I may look like a mule, but I'm not a complete ass.
The problem is the call to egrid_GetCellText() in your TEST_PROC() procedure. I've even altered the function in the EsGRID library itself to return a simple string and it still crashes. Some kind of stack corruption therefore seems likely.
As you say, it works with PB 4.1 okay, it works when I use EsGRID as a source code include. The only possibilities are a problem with PB 4.2 beta 2 itself or Tailbite; I now suspect PB 4.2.
My next test is to create a really simple user library, and set up a simple program similar to demo 9. Let us see if this crashes (I hope it does!) If it does crash then I'll have a look at the generated asm code to see if anything looks amis.
I'll keep testing but I reckon that if some kind of fix is not forthcoming, the only way out is for me to provide you with the EsGRID source, which, whilst a last resort, I am prepared to do this.
As you say, it works with PB 4.1 okay, it works when I use EsGRID as a source code include. The only possibilities are a problem with PB 4.2 beta 2 itself or Tailbite; I now suspect PB 4.2.
My next test is to create a really simple user library, and set up a simple program similar to demo 9. Let us see if this crashes (I hope it does!) If it does crash then I'll have a look at the generated asm code to see if anything looks amis.
I'll keep testing but I reckon that if some kind of fix is not forthcoming, the only way out is for me to provide you with the EsGRID source, which, whilst a last resort, I am prepared to do this.
I may look like a mule, but I'm not a complete ass.
Don't worry Srod I'm sure you can solve it.
With the DLL version it crash too??
With the DLL version it crash too??
PB 6.21 beta, PureVision User
I have tested with the following userlib compiled with Tailbite :
Now the client program :
And it crashes!
Proof it is not an EsGRID problem.
Now to figure out if it is Tailbite or PB 4.2 beta 2!
Code: Select all
ProcedureDLL.s HeyHo(a)
Protected a$
a$=Str(a)
ProcedureReturn a$
EndProcedure
Code: Select all
Procedure TEST_PROC()
tarea.s = HeyHo(100)
MessageRequester("Bloody hell's bells!", tarea)
EndProcedure
If OpenWindow(0,0,0,640,300,"Tally bally ho!",#PB_Window_SystemMenu|#PB_Window_SizeGadget|#PB_Window_MinimizeGadget|#PB_Window_MaximizeGadget|#PB_Window_Maximize|#PB_Window_ScreenCentered) And CreateGadgetList(WindowID(0))
CreateMenu(0,WindowID(0))
MenuTitle("test")
MenuItem(1, "testing")
Repeat
EventID = WaitWindowEvent()
If EventID=#PB_Event_Menu And EventMenu()=1
TEST_PROC()
EndIf
Until EventID = #PB_Event_CloseWindow
EndIf
Proof it is not an EsGRID problem.

Now to figure out if it is Tailbite or PB 4.2 beta 2!

I may look like a mule, but I'm not a complete ass.
I just try DLL version an it works great
.
I can wait until Tailbite make compatible PB.4.2 libs.
Thank you Srod for effort

I can wait until Tailbite make compatible PB.4.2 libs.
Thank you Srod for effort
PB 6.21 beta, PureVision User

PB 6.21 beta, PureVision User
The dll version is a separate purchase and uses different registration/derestriction codes. The dll version is actually more expensive.
I did this because I wanted non-PB users to pay a little more (still very cheap though) and thus I couldn't use the same registration codes etc. else non PB users would simply purchase the cheaper PB version etc.
As a PB user, however, I will be happy to give you a set of reg codes for the dll version.
To be honest, I think I will move away completely from releasing user libraries, they are more hassle than they are worth when new versions of PB are released. I am thus thinking of discontinuing support for the static lib versions of EsGRID and instead only supporting the dll version AND/OR only releasing EsGRID in source code form. I just need to give this a little more thought.
Whatever I decide, I will ensure that all existing customers (gulp, there's quite a few!) receive either the dll codes or the full source code.
Yes, I think source code is the best way in this case. Give me today to make my mind up.
I did this because I wanted non-PB users to pay a little more (still very cheap though) and thus I couldn't use the same registration codes etc. else non PB users would simply purchase the cheaper PB version etc.
As a PB user, however, I will be happy to give you a set of reg codes for the dll version.
To be honest, I think I will move away completely from releasing user libraries, they are more hassle than they are worth when new versions of PB are released. I am thus thinking of discontinuing support for the static lib versions of EsGRID and instead only supporting the dll version AND/OR only releasing EsGRID in source code form. I just need to give this a little more thought.
Whatever I decide, I will ensure that all existing customers (gulp, there's quite a few!) receive either the dll codes or the full source code.
Yes, I think source code is the best way in this case. Give me today to make my mind up.
I may look like a mule, but I'm not a complete ass.