Page 3 of 25
Posted: Mon Sep 25, 2006 8:36 am
by jqn
Hi
srod,
Very useful library... But it not compile with "/thread" switch.
It produces a linker error :
Code: Select all
POLINK: error: Unresolved external symbol '_PB_StringBasePosition'.
regards
JOAQUIN
Posted: Mon Sep 25, 2006 11:01 am
by srod
I haven't used the threadsafe switch. Will Tailbite handle it correctly?
Posted: Mon Sep 25, 2006 11:08 am
by gnozal
srod wrote:I haven't used the threadsafe switch. Will Tailbite handle it correctly?
I had to build a custom version of Tailbite to handle it (
http://www.purebasic.fr/english/viewtop ... &start=392 )
TAILBITE.PB
Code: Select all
...
; gnozal
Global UseThreadOption
;
...
ForEach Parameter()
Select UCase(Left(Parameter(), 5))
; gnozal
Case "/THRD"
UseThreadOption = 1
;
Case "/ASKD"
AskDelete = 1
...
PBCOMPILE.PB
Code: Select all
Procedure PBCompile(ThisFile$, ExeName$, Extra$, Icon, DelFolder$, fatal)
...
If Icon
CmdLine$+" /ICON "+q+GetPathPart(ThisFile$)+"Windows.ico"+q
EndIf
; gnozal
If UseThreadOption
CmdLine$+" /THREAD"
EndIf
;
...
And then I use a subsystem to handle both lib versions :
- the standard version, located in %Purebasic%\PureLibraries\UserLibraries\ ;
- the thread-safe version, located in %Purebasic%\SubSystems\UserLibThreadSafe\PureLibraries\ .
In order to use the library in thread-safe mode (compiler option /THREAD), you have to enable the subsystem 'UserLibThreadSafe' in the PB IDE, or add '/SUBSYSTEM UserLibThreadSafe' to the PBCompiler arguments. In jaPBe, do nothing : it will automatically enable the 'UserLibThreadSafe' subsystem to use the threadsafe versions of the installed userlibraries
Posted: Mon Sep 25, 2006 1:31 pm
by srod
Interesting.
Are you saying that I have to edit the Tailbite sources as you've shown, and then recompile?
If so, where do I find the sources?
Mind you, I'm still completing the lib anyhow!
Posted: Mon Sep 25, 2006 4:45 pm
by gnozal
srod wrote:Are you saying that I have to edit the Tailbite sources as you've shown, and then recompile?
Yes
srod wrote:If so, where do I find the sources?
Where you found tailbite
http://inicia.es/de/elchoni/TailBite/
Tailbite manual wrote:The source is included in the 'src.pack' file. Put it in the TailBite folder. Then, run TBManager.exe and click on the 'Extract TailBite sources' button. You'll be prompted for an unpack folder, select it and all the TailBite sources will be extracted there.
Posted: Mon Sep 25, 2006 4:55 pm
by srod
Thanks.
egrid is now nearing the point where I'm happy with it. I've managed to kick Win 98 in the nether-regions enough to persuade it to run egrid 4 without foaming at the mouth.
Once I've rebuilt the lib I'll have a crack at producing a threadsafe version.
Posted: Fri Sep 29, 2006 12:02 am
by srod
Hi,
I apologise for the delay in reinstating egrid 4, but I've made quite a number of changes and indeed we are now at beta 2.
I've considered carefully the fact that I've worked (on and off) upon this library for practically a year now and intend to continue working on improving it. Couple this with the fact that I am now self-employed and I find myself, albeit a little sheepishly, having to ask for a small remittance from those wishing to use this software.
Those who know my record on these forums I think will respect the fact that I have not made this decision lightly, but this project is now a serious investment of my time, more so than I ever envisaged! It is this investment of time and effort which has inevitably led to this decision.
Anyhow, enough of the piffle! I've created a small website dedicated to egrid which will give you some idea of the background and the future of the product. You can download a 'restricted' version of the library, which apart from limiting the number of rows you can add to an egrid (and popping up some annoying messages!) is otherwise fully functional.
The address:
http://www.purecoder.net/egrid.htm
Please do not hesitate to get in touch (through the site) if you have any questions or observations etc.
Regards.
Posted: Fri Sep 29, 2006 6:35 pm
by Thorsten1867
There are problems with the upper border (selection) line, if I use a row height of '16'. With a height of '18' the border will be shown correct.
Posted: Fri Sep 29, 2006 6:56 pm
by Thorsten1867
I can't find a the egrid-version of 'ClearGadgetItemList(#Gadget)'.
Posted: Sat Sep 30, 2006 11:00 am
by srod
Thorsten1867 wrote:There are problems with the upper border (selection) line, if I use a row height of '16'. With a height of '18' the border will be shown correct.
Yes, you must ensure that the row height is sufficient for the fonts being used where the selection box is concerned. I'd advise adding 50% on to the font size; just to be sure.
The thing is that the box is now drawn 'inside' the cell (which apart from everything else; looks better!) and so if using an #egrid_String cell type, the edit control used to edit the cell can clash with the border if the row height is too narrow. No way around this except to ensure the row height is large enough to accommodate all fonts being used. The alternative is that the edit control would not align perfectly with the underlying cell text and that is something I'm not prepared to allow.
There's no reason for this to be a problem as you have full control over the fonts used and the row height.
Posted: Sat Sep 30, 2006 11:01 am
by srod
Thorsten1867 wrote:I can't find a the egrid-version of 'ClearGadgetItemList(#Gadget)'.
Doh!
Will be added asap.
Posted: Sat Sep 30, 2006 12:12 pm
by srod
**UPDATE: 30 September 2006.
- Bug fixed. When removing all rows, part of the header would also vanish!
- Added command: egrid_ClearRows(gadgetnum)
http://www.purecoder.net/egrid.htm
Posted: Sat Sep 30, 2006 6:08 pm
by Thorsten1867
I've converted the 16 egrids in my program and it seems to work.
Now I'm trying to create a copy & paste function (right mouse button).
What's the correct usage of 'egrid_CopyCells(gadgetnum, left, top, right, bottom)'?
Posted: Sat Sep 30, 2006 8:07 pm
by srod
Thorsten1867 wrote:I've converted the 16 egrids in my program and it seems to work.
Now I'm trying to create a copy & paste function (right mouse button).
What's the correct usage of 'egrid_CopyCells(gadgetnum, left, top, right, bottom)'?
Sorry, the form for the command is
Code: Select all
egrid_CopyCells(gadgetnum, column, row, xcols, yrows)
e.g.
Code: Select all
egrid_CopyCells(gadgetnum, 10, 4, 5, 6)
will copy a rectangular grid of cells starting from cell (10, 4), i.e. the 11th column 5th row, and of dimensions 5 cells by 6 cells.
This will thus copy from (10, 4) to (14, 9) inclusive.
I coded things this way because you might allow the user to reorder the columns by click and drag etc. In these cases, the command will still function as required.
I will start work on the chm help file as soon as I'm feeling better.

Posted: Sun Oct 01, 2006 9:06 pm
by srod
REMOVED.