FW 11.08 / 11.09 Xbrowse with EDIT_LISTBOX error

FW 11.08 / 11.09 Xbrowse with EDIT_LISTBOX error

Postby Maurizio » Tue Sep 27, 2011 2:30 pm

This is the sample that I found in the forum
Code: Select all  Expand view

#include "fivewin.ch"
#include "xbrowse.ch"
function main()
   local aData := {}
   local oWnd, oBrw, oBar

   define dialog oWnd size 600, 300

   @ 12,15 xbrowse oBrw of oWnd ;
      header 'one','two','tipo', "cuatro" ;
      columns 1, 2, 3, 4 ;
      colsizes 50,70,50,70 ;
      pictures '999','mmm dd, yyyy', "9999.99" ;
      SIZE 300, 300 PIXEL ;
      array aData lines cell fastedit footers

   WITH OBJECT oBrw
      :bClrStd    := { || If( oBrw:KeyNo() % 2 == 0, ;
                         { CLR_BLACK, RGB( 224, 236, 255 ) }, ;
                         { CLR_BLACK, RGB( 189, 211, 253 ) } ) }
   END

   AEval( oBrw:aCols, { |o| o:nEditType := EDIT_GET } )

   WITH OBJECT oBrw:tipo
      :nEditType        := EDIT_LISTBOX
      :aEditListBound   := ;
      :aEditListTxt     := { "NOV", "NTO", "TOR", "VAC", "VAQ", "TM ", "TH " }
   END
   WITH OBJECT oBrw:cuatro
      :nTotal        := 0
      :lTotal        := .t.
   END

   WITH OBJECT oBrw
      :bClrStd    := { || If( oBrw:KeyNo() % 2 == 0, ;
                         { CLR_BLACK, RGB( 224, 236, 255 ) }, ;
                         { CLR_BLACK, RGB( 189, 211, 253 ) } ) }
 
      :MakeTotals()
   END

   oBrw:CreateFromCode()
   
   AAdd( oBrw:aArrayData, { 1, date()+1, "NOV", 0 } )
   AAdd( oBrw:aArrayData, { 2, date()+2, "NOV", 0 } )
   AAdd( oBrw:aArrayData, { 3, date()+3, "NOV", 0 } )
   AAdd( oBrw:aArrayData, { 4, date()+4, "NOV", 0 } )
 
   activate dialog oWnd on init ( oWnd:Resize() )
return nil

 






If you change LISTBOX "Tipo" have this error :


Application
===========
Path and name: C:\FWMY\x_list1.exe (32 bits)
Size: 1,986,560 bytes
Time from start: 0 hours 0 mins 2 secs
Error occurred at: 09/27/11, 16:27:16
Error description: Error BASE/1004 Class: 'NIL' has no exported method: NLASTKEY
Args:
[ 1] = U

Stack Calls
===========
Called from: => NLASTKEY(0)
Called from: .\source\classes\XBROWSE.PRG => TXBRWCOLUMN:POSTEDIT(10883)
Called from: .\source\classes\XBROWSE.PRG => (b)TXBRWCOLUMN:SHOWBTNLIST(10792)
Called from: .\source\classes\WINDOW.PRG => TWINDOW:LOSTFOCUS(2935)
Called from: .\source\classes\CONTROL.PRG => (b)TCONTROL:TCONTROL(188)
Called from: => TCONTROL:LOSTFOCUS(0)
Called from: .\source\classes\LISTBOX.PRG => TLISTBOX:LOSTFOCUS(305)
Called from: .\source\classes\CONTROL.PRG => TLISTBOX:KILLFOCUS(1071)
Called from: .\source\classes\CONTROL.PRG => TCONTROL:HANDLEEVENT(1683)
Called from: .\source\classes\LISTBOX.PRG => TLISTBOX:HANDLEEVENT(576)
Called from: .\source\classes\WINDOW.PRG => _FWH(3443)
Called from: => DIALOGBOXINDIRECT(0)
Called from: .\source\classes\DIALOG.PRG => TDIALOG:ACTIVATE(277)
Called from: x_list1.prg => MAIN(56)


Regards MAurizio
Last edited by Maurizio on Wed Sep 28, 2011 1:13 pm, edited 1 time in total.
User avatar
Maurizio
 
Posts: 824
Joined: Mon Oct 10, 2005 1:29 pm

Re: FW 11.08 Xbrowse with EDIT_LISTBOX error

Postby Maurizio » Wed Sep 28, 2011 1:12 pm

Antonio,
the same error in FW 11.09

Maurizio
User avatar
Maurizio
 
Posts: 824
Joined: Mon Oct 10, 2005 1:29 pm

Re: FW 11.08 / 11.09 Xbrowse with EDIT_LISTBOX error

Postby Maurizio » Thu Sep 29, 2011 4:41 pm

Antonio ,
have you tried the sample ?

Maurizio
User avatar
Maurizio
 
Posts: 824
Joined: Mon Oct 10, 2005 1:29 pm

Re: FW 11.08 / 11.09 Xbrowse with EDIT_LISTBOX error

Postby Bayron » Thu Sep 29, 2011 4:56 pm

It looks like a SysRefresh() is missing somewhere and nLastKey is not being processed....
=====>

Bayron Landaverry
(215)2226600 Philadelphia,PA, USA
+(502)46727275 Guatemala
MayaBuilders@gMail.com

FWH12.04||Harbour 3.2.0 (18754)||BCC6.5||UEstudio 10.10||
Windows 7 Ultimate

FiveWin, One line of code and it's done...
User avatar
Bayron
 
Posts: 815
Joined: Thu Dec 24, 2009 12:46 am
Location: Philadelphia, PA

Re: FW 11.08 / 11.09 Xbrowse with EDIT_LISTBOX error

Postby Maurizio » Fri Sep 30, 2011 8:21 am

Bayron ,
the problem is METHOD Postedit is executed twice i dont know way
The second time ::oEditLbx is nil , so a workaround is :
change
if xValue != nil
with
if xValue != nil .and. ::oEditLbx != nil

case ::nEditType == EDIT_LISTBOX
if xValue != nil .and. ::oEditLbx != nil
Eval( ::bOnPostEdit, Self, xValue, ::oEditLbx:nLastKey )
nLastKey := ::oEditLbx:nLastKey
lGoNext := ( nLastKey == VK_RETURN )
endif

But I expect a better solution by the authors

Maurizio
User avatar
Maurizio
 
Posts: 824
Joined: Mon Oct 10, 2005 1:29 pm

Re: FW 11.08 / 11.09 Xbrowse with EDIT_LISTBOX error

Postby nageswaragunupudi » Fri Sep 30, 2011 10:42 am

Maurizio wrote:Bayron ,
the problem is METHOD Postedit is executed twice i dont know way
The second time ::oEditLbx is nil , so a workaround is :
change
if xValue != nil
with
if xValue != nil .and. ::oEditLbx != nil

case ::nEditType == EDIT_LISTBOX
if xValue != nil .and. ::oEditLbx != nil
Eval( ::bOnPostEdit, Self, xValue, ::oEditLbx:nLastKey )
nLastKey := ::oEditLbx:nLastKey
lGoNext := ( nLastKey == VK_RETURN )
endif

But I expect a better solution by the authors

Maurizio

Yes, this is a workaround.
We shall try to find and implement a proper fix.
Regards

G. N. Rao.
Hyderabad, India
User avatar
nageswaragunupudi
 
Posts: 10632
Joined: Sun Nov 19, 2006 5:22 am
Location: India

Re: FW 11.08 / 11.09 Xbrowse with EDIT_LISTBOX error

Postby Maurizio » Thu Dec 22, 2011 4:43 pm

Hello Rao or Antonio ,
this problem has been solved?
MAurizio
User avatar
Maurizio
 
Posts: 824
Joined: Mon Oct 10, 2005 1:29 pm

Re: FW 11.08 / 11.09 Xbrowse with EDIT_LISTBOX error

Postby hua » Fri Mar 30, 2012 4:20 am

I'm using FWH11.8 and am having this problem too. Is Maurizio's workaround the only solution so far?

TIA
FWH 11.08/FWH 19.12
BCC5.82/BCC7.3
xHarbour/Harbour
hua
 
Posts: 1072
Joined: Fri Oct 28, 2005 2:27 am


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 117 guests