Mr. Nages!! question about xBrowse and EDIT_GET [bug issue]

Mr. Nages!! question about xBrowse and EDIT_GET [bug issue]

Postby elvira » Sat Jul 12, 2014 1:39 pm

Hello,

In xBrowse, when having
Code: Select all  Expand view  RUN
oBrowse:aCols[ 5 ]:nEditType    := EDIT_GET
, it is neccesary to double click on the field to edit it.

Many customers suggested us to do only one click, as it will be more easy to work.

Could be posible?.

Thank you :D :D :D
Last edited by elvira on Tue Oct 21, 2014 1:47 pm, edited 5 times in total.
elvira
 
Posts: 516
Joined: Fri Jun 29, 2012 12:49 pm

Re: question about xBrowse and EDIT_GET

Postby nageswaragunupudi » Sun Jul 13, 2014 1:21 am

Pressing Enter key is the basic way to trigger edit. This is what we inform users. Double-click is provided as an additional way to start edit.

Single click is used for cell navigation.

For browses where users are required to do lot of data-entry, it is desirable to enable Fastedit mode where pressing a data key triggers edit and after edit the next editable cell is ready for edit.

We can also configure xbrowse to use excel style edit. In this case F2 key triggers edit and enter key navigates to next cell and we can tell the users that if they know excel, they know xbrowse.
Regards

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

Re: question about xBrowse and EDIT_GET

Postby elvira » Sun Jul 13, 2014 6:08 pm

But in Excel single click edits the cell, but not in xbrowse. That is the users demand.
elvira
 
Posts: 516
Joined: Fri Jun 29, 2012 12:49 pm

Re: question about xBrowse and EDIT_GET

Postby nageswaragunupudi » Mon Jul 14, 2014 3:36 am

Please try:
Code: Select all  Expand view  RUN
obrw:bLButtonUp := { |r,c,f,o| If( o:SelectedCol():lEditable, o:selectedcol():Edit(), nil )
Regards

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

Re: question about xBrowse and EDIT_GET

Postby nageswaragunupudi » Tue Jul 15, 2014 2:16 am

Even in Excel, single click selects the clicked cell. Either pressing any data key or double-click invokes edit and not single-click.

XBrowse with FastEdit behaves exactly the same way.

If we also set
oBrw:lEnterKey2Edit := .f.
oBrw:lF2KeyToEdit := .t.
edit behavior is exactly like Excel.
Regards

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

Re: question about xBrowse and EDIT_GET

Postby elvira » Wed Jul 23, 2014 10:15 pm

Dear Mr. Nages,

Your suggestion Works fine.

But I detected when I click on the separator between two cells, I get this error:

Error description: Error BASE/1004 No exported method: SELECTALL
Args:
[ 1] = U

Stack Calls
===========
Called from: => SELECTALL( 0 )
Called from: .\source\classes\XBROWSE.PRG => TXBRWCOLUMN:EDIT( 11107 )
Called from: .\source\classes\XBROWSE.PRG => TXBROWSE:LDBLCLICK( 3742 )
Called from: => TWINDOW:HANDLEEVENT( 0 )
Called from: .\source\classes\CONTROL.PRG => TCONTROL:HANDLEEVENT( 1733 )
Called from: .\source\classes\XBROWSE.PRG => TXBROWSE:HANDLEEVENT( 12140 )
Called from: .\source\classes\WINDOW.PRG => _FWH( 3236 )
Called from: => DIALOGBOXINDIRECT( 0 )
Called from: .\source\classes\DIALOG.PRG => TDIALOG:ACTIVATE( 274 )
Called from: rao.prg => MAIN( 81 )



This is my sampel:

Code: Select all  Expand view  RUN
#include 'fivewin.ch'
#include 'ord.ch'
#include 'xbrowse.ch'
#include 'hbcompat.ch'

//#include "xbrowse.prg"

REQUEST DBFCDX

//----------------------------------------------------------------------------//

function Main()

   local oDlg, oBrw, oFont, nWild := 2
   local cList, aFlds, aHdrs
   local nChoice := 0, uDataSource

   SET DATE ITALIAN
   SET CENTURY ON
   RDDSETDEFAULT( "DBFCDX" )

   cList := "First,Last,Street,State,HireDate"

   //nChoice     := ALERT( "Choose Data Souce", { "DBF", "ADO", "ARRAY" } )
   uDataSource := OpenData( nChoice, cList )

   DEFINE FONT oFont NAME "TAHOMA" SIZE 0,-12

   DEFINE DIALOG oDlg SIZE 750,300 PIXEL FONT oFont ;
      TITLE "XBrowse Incremental Filters"

   aFlds := aHdrs := HB_ATokens( cList, ',' )
   if nChoice == 3
      aFlds := Array( Len( aFlds ) )
      AEval( aFlds, { |u,i| aFlds[ i ] := i } )
   endif

   @ 30,10 XBROWSE oBrw SIZE -10,-10 PIXEL OF oDlg ;
      COLUMNS aFlds HEADERS aHdrs ;
      DATASOURCE uDataSource AUTOSORT CELL LINES NOBORDER ;
      FASTEDIT

   WITH OBJECT oBrw
      :lIncrFilter   := .t.
      :lSeekWild     := ( nWild == 2 )
      :cFilterFld    := "FIRST"
      :nStretchCol   := STRETCHCOL_WIDEST

      :nColDividerStyle    := LINESTYLE_BLACK
      :lColDividerComplete := .T.
      :nHeaderLines        := 1.5
      :lRecordSelector     := .F.
      :lAllowColHiding     := .F.

      :nMarqueeStyle := 7

      :bLButtonUp := { |r,c,f,o| If( o:SelectedCol():lEditable, o:SelectedCol():Edit(), nil )  }

   END

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



   @ 10, 10 COMBOBOX oBrw:cFilterFld ;
      ITEMS aHdrs ;
      ON CHANGE ( oBrw:Seek( "" ), oBrw:SetFocus() ) ;
      SIZE 50,400 PIXEL OF oDlg

   @ 10, 70 COMBOBOX nWild ITEMS { "Starting With", "Containing" } ;
      ON CHANGE ( oBrw:lSeekWild := ( nWild == 2 ), ;
                  oBrw:Seek( If( oBrw:lSeekWild, oBrw:cSeek, "" ) ), ;
                  oBrw:SetFocus() ) ;
      SIZE 70,400 PIXEL OF oDlg

   @ 11,160 SAY oBrw:oSeek PROMPT oBrw:cSeek SIZE 200,10 PIXEL ;
      OF oDlg COLOR CLR_BLACK,CLR_YELLOW PICTURE '@!'

   oBrw:CreateFromCode()

   ACTIVATE DIALOG oDlg CENTERED ON INIT ( oBrw:SetFocus(), .f. )

   RELEASE FONT oFont

return nil

//----------------------------------------------------------------------------//

static function OpenData( nSource, cList )

   local oCn, uSource

      USE c:\fwh\samples\CUSTOMER SHARED NEW ALIAS CUST
      SET ORDER TO TAG FIRST
      GO TOP


      if nSource == 3
         uSource  := CUST->( FW_DbfToArray( cList ) )
         CLOSE CUST
      else
         uSource  := "CUST"
      endif


return uSource

//----------------------------------------------------------------------------//
 



METHOD Edit( nKey ) CLASS TXBrwColumn

And xbrowse.prg lines:

if XbrGetSelectAll() == .t. .or. ;
( XBrGetSelectAll() == nil .and. nKey != nil .and. ValType( uValue ) != 'N' .and. ;
::oEditGet:ClassName() == 'TGET' )
::oEditGet:SelectAll()
endif


Thank you. Sorry for any inconvenience.
elvira
 
Posts: 516
Joined: Fri Jun 29, 2012 12:49 pm

Re: question about xBrowse and EDIT_GET [new issue]

Postby elvira » Fri Jul 25, 2014 9:49 am

Up, Thanks
elvira
 
Posts: 516
Joined: Fri Jun 29, 2012 12:49 pm

Re: question about xBrowse and EDIT_GET [new issue]

Postby elvira » Sun Aug 10, 2014 10:47 am

Up
elvira
 
Posts: 516
Joined: Fri Jun 29, 2012 12:49 pm

Re: question about xBrowse and EDIT_GET [bug issue]

Postby nageswaragunupudi » Sun Aug 10, 2014 11:32 am

I am unable to reproduce the error.
You say that in the statement ::oEditGet:SelectAll(), ::oEditGet is nil.
If so, we should have got error in any of the preceding lines of code where ::oEditGet's methods were used.
Regards

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

Re: question about xBrowse and EDIT_GET [bug issue]

Postby elvira » Sun Aug 10, 2014 12:26 pm

Dear Mr. Nages,

Try to do single click out of the field, for example, on the row of column separator.

If you could not reproduce it I will make a video.

Thank you!
elvira
 
Posts: 516
Joined: Fri Jun 29, 2012 12:49 pm

Re: question about xBrowse and EDIT_GET [bug issue]

Postby byte-one » Mon Aug 11, 2014 8:56 am

I also see this behaviour!
MfG
Regards,
Günther
---------------------------------
office@byte-one.com
User avatar
byte-one
 
Posts: 1048
Joined: Mon Oct 24, 2005 9:54 am
Location: Austria

Re: question about xBrowse and EDIT_GET [bug issue]

Postby elvira » Tue Aug 26, 2014 2:06 pm

Up, please!.
elvira
 
Posts: 516
Joined: Fri Jun 29, 2012 12:49 pm

Re: not solved! question about xBrowse and EDIT_GET [bug issue]

Postby elvira » Thu Sep 11, 2014 7:57 am

Up
elvira
 
Posts: 516
Joined: Fri Jun 29, 2012 12:49 pm

Re: not solved! question about xBrowse and EDIT_GET [bug issue]

Postby elvira » Sun Oct 12, 2014 7:16 am

Up!!
elvira
 
Posts: 516
Joined: Fri Jun 29, 2012 12:49 pm

Re: not solved!! question about xBrowse and EDIT_GET [bug issue]

Postby elvira » Fri Oct 17, 2014 12:15 pm

Mr. Nages,

Can you please look at it?.

Thanks ;)
elvira
 
Posts: 516
Joined: Fri Jun 29, 2012 12:49 pm

Next

Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 87 guests

cron