ERROR TO CREATE A FOLDEREX INTO A DIALOG

ERROR TO CREATE A FOLDEREX INTO A DIALOG

Postby Silvio.Falconi » Wed Apr 08, 2020 11:29 pm

the error
Code: Select all  Expand view  RUN
  Time from start: 0 hours 0 mins 0 secs
   Error occurred at: 04/09/20, 01:25:59
   Error description: Error BASE/1132  Bound error: array access
   Args:
     [   1] = A   { ... } length: 0
     [   2] = N   1

Stack Calls
===========
   Called from: .\source\classes\TFOLDEX.PRG => TFOLDEREX:DEFAULT( 825 )
   Called from: .\source\classes\TFOLDEX.PRG => TFOLDEREX:INITIATE( 1047 )
   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( 805 )
   Called from: .\source\classes\DIALOG.PRG => TDIALOG:HANDLEEVENT( 1120 )
   Called from:  => DIALOGBOXINDIRECT( 0 )
   Called from: .\source\classes\DIALOG.PRG => TDIALOG:ACTIVATE( 304 )
   Called from: test.prg => TEST( 58 )




the test


Code: Select all  Expand view  RUN
#include "Fivewin.ch"


Function test()
    local oDlgPre
    local oFolder
    local lGiorno:=.t.
    local oBtnGiorn
    local aImagesGiorno:= {"giornaliero.png","periodico.png"}
    local aBitmaps  := {".\bitmaps\prenota.bmp",".\bitmaps\pag.bmp"}

       DEFINE DIALOG oDlgPre TITLE "TEST" SIZE 400,400;
             PIXEL TRUEPIXEL RESIZABLE

      @ 1, 0 FOLDEREX oFolder ;
                 OF oDlgPre   ;
                 PROMPT "Prenotazioni","Pagamenti" ;
                 BITMAPS aBitmaps  ;
                 PIXEL ;
                  SIZE 100,100

oDlgPre:bResized  := <||
                local oRect    :=  oDlgPre:GetCliRect()
                oFolder:nWidth     := oRect:nRight-2
                oFolder:nHeight    := oRect:nBottom-60
               
    return nil
                 >


 ACTIVATE DIALOG oDlgPre CENTERED  ;
                           ON INIT( EVAL( oDlgPre:bResized) )
RETURN NIL




Now I saw it not run without resources winxp theme ....strange
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: 7075
Joined: Thu Oct 18, 2012 7:17 pm

Re: ERROR TO CREATE A FOLDEREX INTO A DIALOG

Postby karinha » Thu Apr 09, 2020 3:53 am

Code: Select all  Expand view  RUN

#Include "FiveWin.ch"  //-> The Best...

FUNCTION Silvio_Folder_New()

   LOCAL oDlg, oFld, oFont, aGrad
   LOCAL aBitmaps := { "..\bitmaps\alphabmp\facebook.bmp", ;
                       "..\bitmaps\alphabmp\windows.bmp" }

   aGrad := { { 0.30, CLR_WHITE, CLR_HBLUE },{ 0.50, CLR_HBLUE, CLR_WHITE } }

   DEFINE FONT oFont   NAME "Ms Sans Serif" SIZE 00, -14 BOLD
                     
   DEFINE DIALOG oDlg TITLE "- TFolderex - Testing -" SIZE 350, 350          ;
      PIXEL TRUEPIXEL RESIZABLE GRADIENT aGrad
     
   @ 1, 0 FOLDEREX oFld PIXEL ADJUST OF oDlg ;
      PROMPT "Prenotazioni", "Pagamenti"     ;
      BITMAPS aBitmaps                       ;
      TAB HEIGHT 26 OPTION 1 ROUND 5 FONT oFont COLOR CLR_HGREEN TOP

   oFld:aEnable = { .T., .T., .F. }

   /*
   // .OR.
   oFld:nSeparator := 5
   oFld:bClrText   := { | o, n | 16711680 }  // 128 - RED // 16711680  HBLUE
   oFld:oFont      := oFont
   */


   // -> Continue Silvio...

   ACTIVATE DIALOG oDlg CENTERED ON INIT oFld:Resize()

   oFont:End()

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


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 64 guests