Problem with combobox

Problem with combobox

Postby Silvio.Falconi » Sat Sep 16, 2017 8:29 am

I have this error
Code: Select all  Expand view
Application
===========
   Path and name: C:\Work\Errori\mezzi\test.Exe (32 bits)
   Size: 3,538,944 bytes
   Compiler version: Harbour 3.2.0dev (r1406271520)
   FiveWin  version: FWH 17.02
   C compiler version: Borland C++ 5.8.2 (32-bit)
   Windows version: 6.1, Build 7600

   Time from start: 0 hours 0 mins 0 secs
   Error occurred at: 09/16/17, 10:07:53
   Error description: Error BASE/2022  Argument error: ALLTRIM
   Args:
     [   1] = A   { ... } length: 1

Stack Calls
===========
   Called from:  => ALLTRIM( 0 )
   Called from: .\source\classes\COMBOBOX.PRG => (b)TCOMBOBOX_DEFAULT( 904 )
   Called from:  => ASCAN( 0 )
   Called from: .\source\classes\COMBOBOX.PRG => TCOMBOBOX:DEFAULT( 904 )
   Called from: .\source\classes\COMBOBOX.PRG => TCOMBOBOX:INITIATE( 829 )
   Called from:  => __OBJSENDMSG( 0 )
   Called from: .\source\function\HARBOUR.PRG => OSEND( 291 )
   Called from: .\source\function\HARBOUR.PRG => ASEND( 259 )
   Called from: .\source\classes\DIALOG.PRG => TDIALOG:INITIATE( 647 )
   Called from: .\source\classes\DIALOG.PRG => TDIALOG:HANDLEEVENT( 898 )
   Called from:  => DIALOGBOXINDIRECT( 0 )
   Called from: .\source\classes\DIALOG.PRG => TDIALOG:ACTIVATE( 296 )
   Called from: test.prg => TEST( 47 )



this is the test (there is also the function to create mezzi.dbf

Code: Select all  Expand view


#include "FiveWin.ch"
#include "constant.ch"


REQUEST DBFCDX
REQUEST DBFFPT
EXTERNAL ORDKEYNO,ORDKEYCOUNT,ORDCREATE,ORDKEYGOTO



Function test()

Local oDlg
  local aMezzi:={}
   Local nBottom   := 43
   Local nRight    := 86
   Local nRow:= 10
   Local nCol := 10
   Local nCol2:= 104
   Local nWidth :=  Max( nRight * DLG_CHARPIX_W, 180 )
   Local nHeight := nBottom * DLG_CHARPIX_H

    Local oFont
    Local oFontTablet
    LOCAL cRfauto
    Local aGet[1]

    RddSetDefault( "DBFCDX" )

  createDbf()

USE MEZZI ALIAS ME

     SELECT ME
    ME->(DbGoTop())
      Do while ! Me->(eof())
        AaDd(aMezzi,{ME->MENOMBRE}) //+" con targa "+ME->METARGA
        Me->(dbskip())
     Enddo
     DbCloseAll()





 DEFINE FONT oFont NAME "MS Sans Serif" SIZE 0, 8
 DEFINE FONT oFontTablet NAME "TAHOMA" SIZE 0,-25

 DEFINE DIALOG oDlg        ;
   TITLE "W"     ;
   SIZE nWidth, nHeight  PIXEL               ;
   FONT oFont      STYLE nOr( DS_MODALFRAME, WS_POPUP, WS_CAPTION,  4 )

 @ nRow, nCol SAY "Automezzo :" OF oDlg SIZE 75, 18 PIXEL FONT oFontTablet
 @  nRow-2, nCol2 COMBOBOX aGet[1] VAR cRfauto ITEMS aMezzi  SIZE 200, 460 OF oDlg PIXEL HEIGHTGET 50 FONT oFontTablet

 ACTIVATE DIALOG oDlg

 return nil

Function createDbf()
   Local cDir:= ""
    DbCreate(cDir+'ME', {    { "MENUMERO"  , "C",     2,    0 },;
                              { "MENOMBRE"  , "C",     40,    0 },;
                              { "METARGA"   , "C",     10,    0 } } , 'DBFCDX')

       close all
      use &(cDir+'ME') new
      select ME
      if FILE(cDir+'MEZZI.DBF')
         delete file &(cdir+'MEZZI.cdx')
         append from &(cdir+'MEZZI')
         dbcommitall()
         close all
         delete file &(cdir+'MEZZI.dbf')
      endif
      close all
      rename &(cdir+'ME.dbf') to &(cdir+'MEZZI.dbf')
       DbCloseAll()
    return nil


 
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)
I use : FiveWin for Harbour November 2023 - January 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
User avatar
Silvio.Falconi
 
Posts: 6716
Joined: Thu Oct 18, 2012 7:17 pm

Re: Problem with combobox

Postby nageswaragunupudi » Sat Sep 16, 2017 8:56 pm

Error
AaDd(aMezzi,{ME->MENOMBRE})

It should be

AaDd(aMezzi,ME->MENOMBRE)
Regards

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

Re: Problem with combobox

Postby Silvio.Falconi » Mon Sep 18, 2017 12:05 pm

oooppsss sorry!!!
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)
I use : FiveWin for Harbour November 2023 - January 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
User avatar
Silvio.Falconi
 
Posts: 6716
Joined: Thu Oct 18, 2012 7:17 pm


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 11 guests