Page 1 of 2
bug browse.prg version 23/11/2011
Posted: Fri Dec 02, 2011 1:34 pm
by JosK
error no Exported variable: ClassName:nCellRowIndex
error no Exported variable: ClassName:nNew also nDiff
browse.prg is from abstractgrid
virtualgrid is from abstractgrid
Virtualgrid has data nNew init 0 but browse.prg not
You must add data nCellRowIndex and nNew and nDiff to browse.prg
(look at line 342 in browse.prg. It uses ::nNew but there is no line DATA nNew init so it must be added)
Re: bug browse.prg version 23/11/2011
Posted: Sat Dec 03, 2011 9:20 am
by mrduck
Which is the sample that gives you problem ?
JosK wrote:error no Exported variable: ClassName:nCellRowIndex
error no Exported variable: ClassName:nNew also nDiff
browse.prg is from abstractgrid
virtualgrid is from abstractgrid
Virtualgrid has data nNew init 0 but browse.prg not
You must add data nCellRowIndex and nNew and nDiff to browse.prg
(look at line 342 in browse.prg. It uses ::nNew but there is no line DATA nNew init so it must be added)
Re: bug browse.prg version 23/11/2011
Posted: Thu Dec 08, 2011 4:49 am
by JosK
mrduck wrote:Which is the sample that gives you problem ?
JosK wrote:error no Exported variable: ClassName:nCellRowIndex
error no Exported variable: ClassName:nNew also nDiff
browse.prg is from abstractgrid
virtualgrid is from abstractgrid
Virtualgrid has data nNew init 0 but browse.prg not
You must add data nCellRowIndex and nNew and nDiff to browse.prg
(look at line 342 in browse.prg. It uses ::nNew but there is no line DATA nNew init so it must be added)
There are some bugs in browse.prg. (I have correct some bugs in browse.prg, mostly DATA used in class but not defined. I have not uploaded the code)
I like virtualgrid.prg more so i don't look at bugs in browse.prg anymore.
You can see my other posts for a nice example with virtualgrid, tab-pages, jkgrid/virtualgrid, setkey, layoutbox, insets. (you must expand youre screen and then you see wat insets does.
Re: bug browse.prg version 23/11/2011
Posted: Thu Dec 08, 2011 8:50 pm
by mrduck
Can you please attach a zip file with all the modifies source code ? It's very time consuming extracting the coe from the messages posted.
Thanks
Re: bug browse.prg version 23/11/2011
Posted: Thu Dec 08, 2011 10:34 pm
by JosK
the zip (browse, virtualgrid, abstractgrid)
Re: bug browse.prg version 23/11/2011
Posted: Fri Dec 09, 2011 7:35 am
by Ricci
Josk, the common language for comments in the sources should be english, please.
I don´t understand this change in browse.prg:
Code: Select all
//::nNew := y + 1 //error line ->no exported variable classname()nNew
::nNew := y+1
In Virtualgrid you deleted the methods AllowAppend() and AllowDelete() because they seem to do do nothing (now), but they are there because of HMG3 compatibility!
Re: bug browse.prg version 23/11/2011
Posted: Sat Dec 10, 2011 12:03 pm
by JosK
Ricci wrote:Josk, the common language for comments in the sources should be english, please.
I don´t understand this change in browse.prg:
Code: Select all
//::nNew := y + 1 //error line ->no exported variable classname()nNew
::nNew := y+1
In Virtualgrid you deleted the methods AllowAppend() and AllowDelete() because they seem to do do nothing (now), but they are there because of HMG3 compatibility!
with the browse.prg of 23/11/2011 i get the error no exported variable classname() nNew add that line
therefore i have add nNew, nDiff .. to browse.prg:
DATA cClass INIT "BROWSE"
DATA QAbstractItemModel INIT NIL
DATA nCellRowIndex INIT 0
DATA nCellColIndex INIT 0
DATA aStruct INIT NIL
DATA QHeaderView INIT NIL
DATA oSize INIT NIL
DATA nCX INIT 0
DATA nCY INIT 0
DATA QAbstractItemDelegate INIT NIL
DATA QItemSelectionModel INIT NIL
DATA nCurrent INIT NIL
DATA nNew INIT NIL
DATA nDiff INIT NIL
DATA nMasterRecNo INIT NIL
DATA nRecordCount INIT 0
DATA oQHeaderView INIT NIL
DATA nValue INIT NIL
DATA bOnDblClick INIT NIL
Re: bug browse.prg version 23/11/2011
Posted: Sat Dec 10, 2011 9:00 pm
by mrduck
I think that BROWSE was somehow deemed obsolete by Rathinagiri when he revised code of grid and virtualgrid.
Infact there is no samples/browse.
Probably we should complete this migration.... please wait till next tuesday and I will try to do a resume on the subject.
Re: bug browse.prg version 23/11/2011
Posted: Sat Dec 10, 2011 9:32 pm
by mrduck
mrduck wrote:
Infact there is no samples/browse.
I also did some work on abstractgrid / virtualgrid / grid / browse but samples\browse was already deleted....
Next week I'll check...
Re: bug browse.prg version 23/11/2011
Posted: Tue Dec 13, 2011 1:18 pm
by mrduck
JosK wrote:virtualgrid
Hi JosK,
I had a look at your changes.
ABSTRACTGRID:
I can't understand your comment (DEZE EVAL DOEN WE ALLEEN BIJ INVOEREN EN NIET BIJ OPBOUWEN SCHERM)... can you please exaplain why you removed the eval ?
Perhaps because it is already done in DoKeyboardEvents ?
JosK wrote:JKgrid
First of all I'd like to suggest to you and other developers reading the thread that when we need to "specialize" a hmg4 class we may inherit from the base one and override the specific methods.
For example, in the case of JKgrid I'd do:
Code: Select all
CLASS JKGRID FROM ABSTRACTGRID
METHOD DoCellKeyBoardEvents
ENDCLASS
When you need you overload other methods. In this way you keep the original code and specialize what you need.
JKGrid has a different handling of keypresses during editing, it actually adds some features... so I'd write:
Code: Select all
METHOD xxx
// handle special new cases
super:xxx() // handle the standard cases
In this way I think the code is cleaner and easier to handle....
Later for the contents...