That would be cool - looking forward to hearing any update about thatsrod wrote:I'll give the virtual grids some more thought.
egrid 4 grid gadget - (static PB library version.)
Hi srod:
First of all thanks for the quick last replies, and now a few requests:
1) if is possible to show the standard popup of edit string gadget(Cut,Copy,etc..),supposing that you blocking it;
2 )if is possible to know the row previously selected when the egrid loses the focus, instead of manually store the row on event #egrid_losingfocus in someone variable,struct,etc.
3)I've had an invalid access memory using the PURELVSort Gnozal's library, follow a code example :
Execute, then order first column, press button and reorder the first column and crash on WaitWindowEvent() line; on some previous replies you said that might be problems on double subclassing of listviewgadget, therefore who must prey for fix the bug, you or Gnozal ? 
First of all thanks for the quick last replies, and now a few requests:
1) if is possible to show the standard popup of edit string gadget(Cut,Copy,etc..),supposing that you blocking it;
2 )if is possible to know the row previously selected when the egrid loses the focus, instead of manually store the row on event #egrid_losingfocus in someone variable,struct,etc.
3)I've had an invalid access memory using the PURELVSort Gnozal's library, follow a code example :
Code: Select all
If OpenWindow(1,5,5,300,210,"",#PB_Window_SystemMenu) And CreateGadgetList(WindowID(1))
egrid_CreateGrid(0,5,5,290,105,18,0,#egrid_ResizeColumnsTrue)
;egrid_CreateCellCallback(0,@CellCallBack())
egrid_AddColumn(0,0,"Col1",150)
egrid_AddColumn(0,1,"Col2",150)
If PureLVSORT_SelectGadgetToSort(0, #PureLVSORT_ShowClickedHeader_IconLeft) = #PureLVSORT_Ok
PureLVSORT_SetColumnType(0, 0, #PureLVSORT_String) ; default, not necessary
PureLVSORT_SetColumnType(0, 1, #PureLVSORT_String) ; default, not necessary
EndIf
ButtonGadget(1,5,110,80,30,"Click me!")
Define i
For i=1 To 9
AddGadgetItem(0,-1,""+Chr(10)+"Col1_"+Str(i)+Chr(10)+"Col2_"+Str(i))
Next
Define Event.l
Repeat
Event=WaitWindowEvent()
Select Event
Case #PB_Event_CloseWindow :
Break :
Case #PB_Event_Gadget
If EventGadget()=1
egrid_AddRow(0,0)
EndIf
EndSelect
ForEver
EndIf
PB Registered User, Egrid Registered User
Win7 x64 Ultimate, 4,00 Gb Mem, Ati Radeon HD4600 Series, Realtek High Definition Audio Integrated
Win7 x64 Ultimate, 4,00 Gb Mem, Ati Radeon HD4600 Series, Realtek High Definition Audio Integrated
I disabled that for some reason. I think it was causing some kind of problem (memory escapes me now!) I'll try reinstating it to see what happens.magicjo wrote:Hi srod:
First of all thanks for the quick last replies, and now a few requests:
1) if is possible to show the standard popup of edit string gadget(Cut,Copy,etc..),supposing that you blocking it;
When #egrid_losingfocus fires, there is no selected row! Again I did this on request. I'll look into adjusting this so that the #egrid_LosingFocus message notifies you which cell was previously selected etc. You could also use the flag #egrid_AlwaysShowSelection when creating an egrid. This way the selection box will always remain.2 )if is possible to know the row previously selected when the egrid loses the focus, instead of manually store the row on event #egrid_losingfocus in someone variable,struct,etc.
I really can't vouch for what will happen when you use these libraries together (for one I have not used PURELVSort). Both libs undoubtedly employ various levels of subclassing and who knows where the 'bug' will be? For one thing, column 0 in egrid will be column 1 in PURELVSort etc. as an egrid is a massively subclassed ListIcon with the 'proper' column 0 blanked out. This was absolutely necessary for various reasons which I won't go into right now.3)I've had an invalid access memory using the PURELVSort Gnozal's library, follow a code example :
Execute, then order first column, press button and reorder the first column and crash on WaitWindowEvent() line; on some previous replies you said that might be problems on double subclassing of listviewgadget, therefore who must prey for fix the bug, you or Gnozal ?
Try it without a CellCallback function and see if that makes any difference?
I may look like a mule, but I'm not a complete ass.
**UPDATE: 15th October 2006.
(See previous post above).
Have reinstated the right-click context menus for the edit controls used to edit certain cells. I originally removed them because of certain issues which have now been addressed.
Have also ammended the #egrid_LosingFocus message so that the developer is informed which cell was last selected before the message is sent etc.
(I won't be able to upload the update until late tonight because I have no access to my broadband account right now.)
In the meantime I will investigate the issues with the PURELVSort library, but no promises here! If it looks as if the problem is with the egrid lib then I'll see what I can do.
(See previous post above).
Have reinstated the right-click context menus for the edit controls used to edit certain cells. I originally removed them because of certain issues which have now been addressed.
Have also ammended the #egrid_LosingFocus message so that the developer is informed which cell was last selected before the message is sent etc.
(I won't be able to upload the update until late tonight because I have no access to my broadband account right now.)
In the meantime I will investigate the issues with the PURELVSort library, but no promises here! If it looks as if the problem is with the egrid lib then I'll see what I can do.
I may look like a mule, but I'm not a complete ass.
@srod :
1) Thanks;
2) Rethanks;
3) the code example i've post is without cellcallback(the line is commented),so i shall code manually the sorting ? you want make me cry ?
1) Thanks;
2) Rethanks;
3) the code example i've post is without cellcallback(the line is commented),so i shall code manually the sorting ? you want make me cry ?
PB Registered User, Egrid Registered User
Win7 x64 Ultimate, 4,00 Gb Mem, Ati Radeon HD4600 Series, Realtek High Definition Audio Integrated
Win7 x64 Ultimate, 4,00 Gb Mem, Ati Radeon HD4600 Series, Realtek High Definition Audio Integrated
How to install...
Sorry, I'm still a PB rookie.
I downloaded the latest version of eGrid "egrid4.zip".
Where do I put the files that are in the zip, and do I have to
configure anything?
When I run "egrid4 demo1.pb" I get error:
Line 35 - egrid_CreateGrid() is not a function...
Thank you,
Novak
I downloaded the latest version of eGrid "egrid4.zip".
Where do I put the files that are in the zip, and do I have to
configure anything?
When I run "egrid4 demo1.pb" I get error:
Line 35 - egrid_CreateGrid() is not a function...
Thank you,
Novak
Re: How to install...
There are basic instructions on the download page - but yes I should make the instructions easier!KidNovak wrote:Sorry, I'm still a PB rookie.
I downloaded the latest version of eGrid "egrid4.zip".
Where do I put the files that are in the zip, and do I have to
configure anything?
When I run "egrid4 demo1.pb" I get error:
Line 35 - egrid_CreateGrid() is not a function...
Thank you,
Novak
Basically, the zip contains 3 versions of the library so you'll need to pick the one you need.
Lets pick 'egrid4_AnsiNonThdsafe' (this is a non-threadsafe ansi version for non Unicode applications). Place this file in your Purebasic installation folder within the PureLibraries\UserLibraries subfolder.
Next place the file 'egrid_Resident..res' within the Residents subfolder of your Purebasic installation folder.
Now restart Purebasic and demo 1 should run.
I may look like a mule, but I'm not a complete ass.
Confirmed.
It now crashes at a slightly different place in the source code at exactly the point where one of my windowprocs would be calling one of PURELVSort's (or the result of being called by on of PURELVSort's).
Because of this, it is unlikely that I can do anything about it!
I'll keep poking around however.
It now crashes at a slightly different place in the source code at exactly the point where one of my windowprocs would be calling one of PURELVSort's (or the result of being called by on of PURELVSort's).
Because of this, it is unlikely that I can do anything about it!
I'll keep poking around however.
I may look like a mule, but I'm not a complete ass.
thx for unicode support, works fine
why not use subsystem? i have renamed all libs to egrid4 and moved to:
regards
Thomas
why not use subsystem? i have renamed all libs to egrid4 and moved to:
like gnozals and PBOSL libs?...\PureLibraries\UserLibraries\
...\SubSystems\UserLibThreadSafe\PureLibraries\
...\SubSystems\UserLibUnicode\PureLibraries\
regards
Thomas
PureBasic 5.73 | SpiderBasic 2.30 | Windows 10 Pro (x64) | Linux Mint 20.1 (x64)
Old bugs good, new bugs bad! Updates are evil: might fix old bugs and introduce no new ones.

Old bugs good, new bugs bad! Updates are evil: might fix old bugs and introduce no new ones.

Yep, I will probably add an installer which will place the different versions within the subsystem folders etc.
@magicjo: The problem is definitely in one of the libs passing messages on to the other and I suspect some kind of infinite loop which win XP is pretty good at spotting and throwing this kind of exception. The only way, however, I can attempt to get to the bottom of this is to have both libs as source code includes so that I can really see where the problem is.
I'll contact Gnozal and see what we can do. But at the end of the day we're dealing with two complex libraries here and put them together like this and ...... boom!
I'll be in touch.

@magicjo: The problem is definitely in one of the libs passing messages on to the other and I suspect some kind of infinite loop which win XP is pretty good at spotting and throwing this kind of exception. The only way, however, I can attempt to get to the bottom of this is to have both libs as source code includes so that I can really see where the problem is.
I'll contact Gnozal and see what we can do. But at the end of the day we're dealing with two complex libraries here and put them together like this and ...... boom!
I'll be in touch.
I may look like a mule, but I'm not a complete ass.




