MsgDate Fix

MsgDate Fix

Postby carlos vargas » Sat Dec 17, 2016 9:12 pm

Antonio se podria modificar MsgDate para que el tamaño de letra sea -11, en lugar de -8, que con ese tamaño, se ve muy pequeño los titulosde los dias y los numero de dias.
Antes:
Image
Despues:
Image

Otra cosa, en el ejemplo yunus hay una funcion muy buena llamada TableLookUp, la cual muestra una subtabla en un grid, esta tiene un problema que una vez abierta no se cierra si se da click fuera de esta, solamente con esc se cierra.
Image

salu2
carlos vargas
Salu2
Carlos Vargas
Desde Managua, Nicaragua (CA)
User avatar
carlos vargas
 
Posts: 1720
Joined: Tue Oct 11, 2005 5:01 pm
Location: Nicaragua

Re: MsgDate Fix

Postby Antonio Linares » Mon Dec 19, 2016 7:36 am

Carlos,

MsgDate() modificado para la próxima versión de FWH, gracias

Vamos a revisar la función TableLookUp()
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42099
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: MsgDate Fix

Postby Antonio Linares » Mon Dec 19, 2016 7:49 am

Carlos,

la función TableLookUp() usa una caja de diálogo modal, de ahí que no se pueda hacer click externamente para cerrarla.

Tendríamos que encontrar una forma de cerrar una caja de diálogo modal haciendo click externamente. He intentado
con SetCapture() pero no funciona. No se me ocurre otra forma de momento.

Otra solución sería cambiar esa caja de diálogo de modal a no modal, pero habría que comprobar la diferencia en funcionalidad
que esto pueda ocasionar en el ejemplo yunus.prg
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42099
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: MsgDate Fix

Postby nageswaragunupudi » Mon Dec 19, 2016 11:57 am

Clicking on the CELL closes it
Regards

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

Re: MsgDate Fix

Postby karinha » Mon Dec 19, 2016 1:07 pm

Image
João Santos - São Paulo - Brasil - Phone: +55(11)95150-7341
User avatar
karinha
 
Posts: 7822
Joined: Tue Dec 20, 2005 7:36 pm
Location: São Paulo - Brasil

Re: MsgDate Fix

Postby karinha » Mon Dec 19, 2016 1:09 pm

Code: Select all  Expand view

Application
===========
   Path and name: C:\FWH1610\samples\YUNUS.exe (32 bits)
   Size: 5,982,720 bytes
   Compiler version: xHarbour 1.2.3 Intl. (SimpLex) (Build 20150603)
   FiveWin  Version: FWHX 16.10
   Windows version: 6.1, Build 7601 Service Pack 1

   Time from start: 0 hours 3 mins 6 secs
   Error occurred at: 19/12/2016, 11:05:02
   Error description: Error DBFCDX/1201  Workarea not indexed

Stack Calls
===========
   Called from:  => DBSEEK( 0 )
   Called from: YUNUS.prg => DUPLICATE( 932 )
   Called from: YUNUS.prg => (b)EDITINVOICE( 308 )
   Called from: .\source\classes\TGET.PRG => TGET:LVALID( 1592 )
   Called from: .\source\classes\CONTROL.PRG => TGET:FWLOSTFOCUS( 1136 )
   Called from: .\source\classes\CONTROL.PRG => TCONTROL:HANDLEEVENT( 1706 )
   Called from: .\source\classes\TGET.PRG => TGET:HANDLEEVENT( 767 )
   Called from: .\source\classes\WINDOW.PRG => _FWH( 3305 )
   Called from:  => DIALOGBOXINDIRECT( 0 )
   Called from: .\source\classes\DIALOG.PRG => TDIALOG:ACTIVATE( 296 )
   Called from: YUNUS.prg => EDITINVOICE( 431 )
   Called from: YUNUS.prg => (b)INVOICES( 228 )
   Called from:  => EVAL( 0 )
   Called from: .\source\classes\DATAROW.PRG => TDATAROW:EDIT( 1263 )
   Called from: .\source\classes\XBROWSE.PRG => TXBROWSE:EDIT( 9367 )
   Called from: .\source\classes\XBROWSE.PRG => (b)TXBROWSE:TXBROWSE( 680 )
   Called from:  => TXBROWSE:EDITSOURCE( 0 )
   Called from: YUNUS.prg => (b)INVOICES( 227 )
   Called from: .\source\classes\WINDOW.PRG => TWINDOW:LDBLCLICK( 1988 )
   Called from: .\source\classes\CONTROL.PRG => TCONTROL:LDBLCLICK( 1744 )
   Called from: .\source\classes\XBROWSE.PRG => TXBROWSE:LDBLCLICK( 4577 )
   Called from:  => TWINDOW:HANDLEEVENT( 0 )
   Called from: .\source\classes\CONTROL.PRG => TCONTROL:HANDLEEVENT( 1731 )
   Called from: .\source\classes\XBROWSE.PRG => TXBROWSE:HANDLEEVENT( 14026 )
   Called from: .\source\classes\WINDOW.PRG => _FWH( 3305 )
   Called from:  => WINRUN( 0 )
   Called from: .\source\classes\WINDOW.PRG => TMDIFRAME:ACTIVATE( 1042 )
   Called from: YUNUS.prg => MAIN( 31 )
 


João Santos - São Paulo - Brasil - Phone: +55(11)95150-7341
User avatar
karinha
 
Posts: 7822
Joined: Tue Dec 20, 2005 7:36 pm
Location: São Paulo - Brasil

Re: MsgDate Fix

Postby nageswaragunupudi » Mon Dec 19, 2016 1:25 pm

I too faced the same problem a little while back.
We forgot to include the indexes in the build.

Please substitute the function OpenDataBases() with this function:
Code: Select all  Expand view
static function OpenDataBases()

   field CODE,INVNUM,SERIAL

   if ! File( "invoices.dbf" )
      DbCreate( "invoices.dbf",;
                { { "INVNUM",    "C", 10, 0 }, ;
                  { "DATE",      "D",  8, 0 }, ;
                  { "CODE",      "C", 10, 0 }, ; // Client Code
                  { "CLIENT",    "C", 40, 0 }, ; // Client Name
                  { "ADDRESS",   "M", 10, 0 }, ; // Client Address
                  { "DETAILS",   "C", 30, 0 }, ; // Invoice Details
                  { "AMOUNT",    "N",  9, 0 }, ;
                  { "TAXRATE",   "N",  5, 2 }, ;
                  { "TAX",       "N",  9, 0 }, ;
                  { "TOTAL",     "N",  9, 0 }, ;
                  { "PAYDATE",   "D",  8, 0 } }, "DBFCDX", .T., "DB" )

      INDEX ON INVNUM TAG INVNUM
      CLOSE DB
   elseif !File( "invoices.cdx" )
      USE INVOICES EXCLUSIVE NEW ALIAS DB
      INDEX ON INVNUM TAG INVNUM
      CLOSE DB
   endif

   USE invoices SHARED
   SET ORDER TO TAG INVNUM
   GO BOTTOM
   nTaxRate    := INVOICES->TAXRATE
   GO TOP

   if ! File( "items.dbf" )
      DbCreate( "items.dbf",;
                { { "CODE",   "C", 10, 0 }, ;
                  { "NAME",   "C", 30, 0 }, ;
                  { "UNIT",   "C",  5, 0 }, ;
                  { "PRICE",  "N",  6, 2 } }, "DBFCDX", .T., "DB" )

      INDEX ON CODE TAG CODE
      CLOSE DB
   elseif !File( "items.cdx" )
      USE ITEMS NEW EXCLUSIVE ALIAS DB
      INDEX ON CODE TAG CODE
      CLOSE DB
   endif

   USE items NEW SHARED
   SET ORDER TO TAG CODE
   GO TOP

   if ! File( "invitems.dbf" )
      DbCreate( "invitems.dbf",;
                { { "INVNUM",    "C", 10, 0 }, ;
                  { "SERIAL",    "N",  3, 0 }, ;
                  { "ITEMCODE",  "C", 10, 0 }, ;
                  { "ITEMNAME",  "C", 30, 0 }, ;
                  { "QUANTITY",  "N",  8, 3 }, ;
                  { "UNIT",      "C",  5, 0 }, ;
                  { "PRICE",     "N",  6, 2 }, ;
                  { "DISCOUNT",  "N",  9, 0 } }, "DBFCDX", .T., "DB" )

      INDEX ON INVNUM + STR( SERIAL, 3, 0 ) TAG INVNUM
      INDEX ON DELETED() TAG DELETED
      CLOSE DB
   elseif !File( "invitems.cdx" )
      USE INVITEMS EXCLUSIVE NEW ALIAS DB
      INDEX ON INVNUM + STR( SERIAL, 3, 0 ) TAG INVNUM
      INDEX ON DELETED() TAG DELETED
      CLOSE DB
   endif

   USE invitems NEW SHARED
   aBlankItem  := Array( FCount() + 1 )
   AEval( aBlankItem, { |u,i| aBlankItem[ i ] := uValBlank( FieldGet( i ) ) }, 1, FCount() )
   aBlankItem[ FCount() + 1 ] := 0
   SET ORDER TO TAG INVNUM
   GO TOP

   USE invitems NEW SHARED ALIAS IIT
   SET ORDER TO TAG INVNUM
   GO TOP

   if ! File( "clients2.dbf" )
      DbCreate( "clients2.dbf",;
                { { "CODE",      "C", 10, 0 },;
                  { "FIRST",     "C", 20, 0 },;
                  { "LAST",      "C", 20, 0 },;
                  { "ADDRESS1",  "C", 30, 0 },;
                  { "ADDRESS2",  "C", 30, 0 },;
                  { "CITY",      "C", 20, 0 },;
                  { "ZIPCODE",   "C", 20, 0 },;
                  { "PHONE",     "C", 20, 0 },;
                  { "EMAIL",     "C", 20, 0 } }, "DBFCDX", .T., "DB" )

      INDEX ON CODE TAG CODE
      CLOSE DB
   elseif !File( "clients2.cdx" )
      USE CLIENTS2 EXCLUSIVE NEW ALIAS DB
      INDEX ON CODE TAG CODE
      CLOSE DB
   endif

   USE Clients2 NEW SHARED ALIAS "Clients"
   SET ORDER TO TAG CODE
   GO TOP

   SELECT invoices
   SET RELATION TO INVNUM INTO invitems SCOPED
   GO TOP

return nil

//----------------------------------------------------------------------------//
 
Regards

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

Re: MsgDate Fix

Postby karinha » Mon Dec 19, 2016 1:39 pm

Resuelto, many thanks mister Rao.

Image

Regards, saludos.
João Santos - São Paulo - Brasil - Phone: +55(11)95150-7341
User avatar
karinha
 
Posts: 7822
Joined: Tue Dec 20, 2005 7:36 pm
Location: São Paulo - Brasil


Return to FiveWin para Harbour/xHarbour

Who is online

Users browsing this forum: nageswaragunupudi and 44 guests