Page 10 of 25

Posted: Fri Oct 13, 2006 11:09 am
by mskuma
srod wrote:I'll give the virtual grids some more thought.
That would be cool - looking forward to hearing any update about that :)

Posted: Fri Oct 13, 2006 11:36 am
by srod
e-mail on its way. :)

Posted: Sun Oct 15, 2006 11:04 am
by magicjo
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 :

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
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 ? :o

Posted: Sun Oct 15, 2006 11:29 am
by srod
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;
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.
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.
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.
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 ? :o
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. :) It may well be that, individually, both libraries contain no bugs related to this procedure. However, together they may simply be too incompatible etc. My intention, and my answer to those enquiring about sorting, is that you will probably have to code your own routine. I have distant thoughts of adding such functionality later, but this won't be any time soon I'm afraid.

Try it without a CellCallback function and see if that makes any difference?

Posted: Sun Oct 15, 2006 12:02 pm
by srod
**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. :)

Posted: Sun Oct 15, 2006 12:18 pm
by srod
REMOVED.

Posted: Sun Oct 15, 2006 12:31 pm
by magicjo
@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 ? :lol:

Posted: Sun Oct 15, 2006 12:41 pm
by srod
REMOVED.

How to install...

Posted: Sun Oct 15, 2006 12:44 pm
by KidNovak
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

Re: How to install...

Posted: Sun Oct 15, 2006 1:12 pm
by srod
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
There are basic instructions on the download page - but yes I should make the instructions easier! :) I'll add a page to the help manual (work in progress!)

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.

Posted: Sun Oct 15, 2006 1:14 pm
by magicjo
@srod, sorry for the delay, i'v tried the examples modified by you, but crash the same! (tested with PureLVSort version 4.12) :shock:

Posted: Sun Oct 15, 2006 1:20 pm
by srod
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.

Posted: Sun Oct 15, 2006 1:32 pm
by ts-soft
thx for unicode support, works fine :D

why not use subsystem? i have renamed all libs to egrid4 and moved to:
...\PureLibraries\UserLibraries\
...\SubSystems\UserLibThreadSafe\PureLibraries\
...\SubSystems\UserLibUnicode\PureLibraries\
like gnozals and PBOSL libs?

regards
Thomas

Posted: Sun Oct 15, 2006 1:36 pm
by srod
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.

:)

Posted: Sun Oct 15, 2006 2:08 pm
by magicjo
srod, you'ld rename your nick in supersrod! :lol: