eXpress++ build 256

Announcements about new features or events.
Message
Author
User avatar
rdonnay
Site Admin
Posts: 4729
Joined: Wed Jan 27, 2010 6:58 pm
Location: Boise, Idaho USA
Contact:

eXpress++ build 256

#1 Post by rdonnay »

I promised I would release build 256 before heading out to Hannover for the European Devcon.

Here it is:

http://donnay-software.com:8080/donnay/exp19256.exe
Install password: LoggersPond2012

If you have any problems with this, let me know. I will provide a build 257 fix release asap.

Code: Select all

           ---------------- New to 1.9 (build 256) ----------

 1192. Added a GETALIGN option to the @ DCSAY .. GET command. GETALIGN <nAlign>
       specifies how the characters are aligned within the DC_XbpGet object.

 1191. Added an ALIGN option to the DCGET command. ALIGN <nAlign>
       specifies how the characters are aligned within the DC_XbpGet object.

 1190. Fixed a bug in @..DCPUSHBUTTONXP that causes an error when bitmap is an
       icon.

 1189. Fixed a bug in @..DCTOOLBAR..FIT that did not cause the toolbar to fit
       the buttons when the toolbar was horizontal.

 1188. Added an ALIGN <nAlign> option to the @..DCSLE command.  ALIGN <nAlign>
       specifies how the characters are aligned within the XbpSLE object.

 1187. Fixed a bug in DC_Dir() and the dot-prompt DIR command that truncates
       file names to 14 and would not open database.

 1186. Owner-Drawing using SubClass.  The SUBCLASS clause of all DC* commands
       is now the preferred method of creating custom owner-drawn objects.
       See the sample in \exp19\samples\static\MsgBoxCustom.Prg. This means
       that all Xbase++ classes that support owner-drawing are automatically
       supported by eXpress++.

 1185. The :refresh() method of DC_XbpTabPage() has been simplified to use the
       new :setCaption() method of XbpTabPage() and therefore greatly improves
       performance when the caption of a DCTABPAGE is a codeblock.

 1184. Documented WTF debugging command.  (Same as DCBDEBUG).  This debugging
       may be placed in code blocks provided that it is framed by parenthesis:
       Example {|a,b,c|(WTF a,b,c)}

 1183. Added new function: DC_SetRoundRectRegion().  This function creates
       radiused corners on a window.  See the sample in
       \exp19\samples\static\MsgBoxCustom.Prg

 1182. Fixed a bug in the resizing system that causes a screen to not resize
       properly after it has been minimized.

 1181. Fixed problem with DCGET sometimes clearing buffer when typing numbers.

 1180. DCGET..POPUP now supports ICONS for the popup caption.

 1179. Add new function: DC_Array2CSV().  This will create a CSV file from a
       2-dimensional array.

 1178. New utility program named LOCATE.EXE provided by Jack Duijf. This
       utility locates .DLLs or .EXEs based on SET PATH setting.
       See \exp19\util\locate.prg.

 1177. Changed browse features:

       a. Browse row height automatically adjusts to browse font.  This
          feature is enabled with a new get-set function: DC_BrowPresType(2).
          See sample in \exp19\samples\browse\browtype.prg.
          Thanks to Jack Diujf.

 1176. @ .. DCSTATIC and @ .. DCSAY now support an OWNERDRAW codeblock.

 1175. Dialogs that use the fit clause and Status Bars now use system
       metrics to fit properly under Windows 7.

 1174. DC_CallStack() now lists the name of the source file.

 1173. The record tagging system in @ DCBROWSE now supports tagging by using
       the Shift-Down Arrow key or the Ctrl key and left mouse.  Try it by
       running \exp19\samples\tagging\tagging.exe.

 1171. Added new lTestLock clause to DC_RecLock() and DC_AddRec().

 1170. Added a TIMEOUT clause to the DCPRINT ON command to cause the print
       previewer window to close after a specified time of inactivity.

 1169. Added new function: DC_TabPageNavKeys().  This function is used to
       establish a set of keys to use to navigate between tabpages.  Default
       is Alt-Left and Alt-Right.  See how to use this function in
       \exp19\samples\tabpage.prg.

 1168. Created a new class: DC_BrowseQuery().  This is only a sample class and
       not documented.  Usage is included in the sample program
       ..\Samples\BrowseQuery\BrowseQuery.Prg.  This class is used to provide
       a popup window of a user-friendly dialog for creating filters for the
       browse.

 1167. Fixed a bug in @ .. DCPUSHBUTTONXP .. BITMAP when using the SCALE
       clause.  Bitmap will now scale down properly if the bitmap is larger
       than the button.

 1166. Added new COMBOWHEN and COMBOHIDE sub-clauses to the COMBO clause of
       @..DCSAY..GET and @..DCGET.

 1165. Fixed a regression bug that caused DCBROWSECOL .. DATA <bBlock> to not
       evaluate correctly under some conditions.

 1164. Added a workaround to DC_ArrayView() to prevent an error due to a bug
       in Xbase++ when viewing an array with an XbpHtmlViewer() object.

 1163. Fixed a bug that caused an error in @..DCBROWSE when using the TAGENABLE
       feature and an empty array.

 1162. Fixed a bug in DC_FileNameDupe() that caused it to sometimes calculate
       the incorrect duplicate file name.

 1161. Added a new parameter to the DC_Excel2Array() function: bEval is a code
       block to evaluate after the Excel file is opened.  The Excel object and
       book automation object are passed to the code block.  This can be used
       for formatting cells before the array is created.

 1160. Added 2 new parameters to the DC_PopFile() function: <oParent> and
       <oOwner>.

 1159. Updated tooltip system to prevent memory leaks.  Thanks again to Jack
       Diujf.

 1158. Added CUEBANNER clause to the @ .. DCSLE command.

 1157. Fixed Print Previewer to display scrollbars correctly on Windows 7.

 1156. Fixed DCGET..COMBO to display scrollbars correctly on Windows 7.

 1155. Added SFTP sample program.  See .\samples\sftp.

 1154. Added 3 new parameters to the DC_WorkArea2Excel() function:
       <cDateFormat> is used to format date fields.  <aFieldEvals> is an array
       of code blocks that is used to custom-format the data.  Thanks to Terry
       Wolfe. <cPassword> is a password to apply to the file to allow
       viewing by excel.

The eXpress train is coming - and it has more cars.

User avatar
Tom
Posts: 1170
Joined: Thu Jan 28, 2010 12:59 am
Location: Berlin, Germany

Re: eXpress++ build 256

#2 Post by Tom »

Could you explain what #1186 exactly means? I'm facing heavy problems with all browses using ownerdrawing subclasses. Even the COLOR clause of DCBROWSECOL creates errors, since the cell contens seems to be no parameter anymore (DCBROWSECOL ... COLOR {|x|SetCellColor(x)} EVAL {|o|o:DataArea:DrawMode := XBP_DRAW_OWNER}) -> missing parameter in "SetCellColor", parameter is NIL.
Best regards,
Tom

"Did I offend you?"
"No."
"Okay, give me a second chance."

User avatar
Tom
Posts: 1170
Joined: Thu Jan 28, 2010 12:59 am
Location: Berlin, Germany

Re: eXpress++ build 256

#3 Post by Tom »

See attached sample. This is the way I used to work with ownerdrawing in browses. Ownerdrawing is NOT used for the entire browse, but only for several column dataareas. A subclass is initialized using the SUBCLASS clause, drawmode is set for dataarea cellgroups. This f*cks up with build 256.

(Damned. Why is file extension "PRG" not allowed in this forum? :twisted: )

Anyway:

Code: Select all

include 'dcdialog.ch'
#include 'gra.ch'
#pragma library("dclipx.lib")

#DEFINE MONDAY       1
#DEFINE TUESDAY      2
#DEFINE WEDNESDAY    3
#DEFINE THURSDAY     4
#DEFINE FRIDAY       5
#DEFINE SATURDAY     6
#DEFINE SUNDAY       7

#DEFINE RESERVED     GRA_CLR_GREEN
#DEFINE BOOKED       GRA_CLR_RED


FUNCTION Main()
LOCAL GetList := {}, oDialog, aMyDates := {}, i, oBrowse,;
      aMyPres := ;
        { { XBP_PP_COL_HA_FGCLR, GRA_CLR_WHITE },    /*  Header FG Color  */     ;
          { XBP_PP_COL_HA_BGCLR, GRA_CLR_DARKCYAN }, /*  Header BG Color  */     ;
          { XBP_PP_COL_DA_ROWHEIGHT, 30 },                  /* Row Height */     ;
          { XBP_PP_COL_DA_CELLHEIGHT, 30 },                /* Cell Height */     ;
          { XBP_PP_COL_DA_ROWSEPARATOR, XBPCOL_SEP_NONE },  /* Row Sep  */     ;
          { XBP_PP_COL_DA_COLSEPARATOR, XBPCOL_SEP_NONE },  /* Col Sep  */     ;
          { XBP_PP_COL_DA_FGCLR, GRA_CLR_BLACK } , ;
          { XBP_PP_COL_DA_CELLFRAMELAYOUT, XBPFRAME_BOX }, ;
          { XBP_PP_COL_DA_FRAMELAYOUT,     XBPFRAME_NONE}, ;
          { XBP_PP_COL_DA_BGCLR, GRA_CLR_WHITE } }


FOR i := 1 TO 10 // show ten lines with "dates"
  aAdd(aMyDates,{i,'','','','','','',''})
NEXT

@ 1,1 DCBROWSE oBrowse DATA aMyDates SIZE 100,20 FIT SUBCLASS 'MyDates()' USEVISUALSTYLE NOHSCROLL PRESENTATION aMyPres

DCBROWSECOL ELEMENT 1 HEADER 'Room #' WIDTH 3 PARENT oBrowse

DCBROWSECOL DATA {||DateInfo(DC_GetColArray(1,oBrowse),MONDAY)}    HEADER DayInfo(MONDAY   ) WIDTH 15 PARENT oBrowse EVAL {|o|o:DataArea:DrawMode := XBP_DRAW_OWNER}
DCBROWSECOL DATA {||DateInfo(DC_GetColArray(1,oBrowse),TUESDAY)}   HEADER DayInfo(TUESDAY  ) WIDTH 15 PARENT oBrowse EVAL {|o|o:DataArea:DrawMode := XBP_DRAW_OWNER}
DCBROWSECOL DATA {||DateInfo(DC_GetColArray(1,oBrowse),WEDNESDAY)} HEADER DayInfo(WEDNESDAY) WIDTH 15 PARENT oBrowse EVAL {|o|o:DataArea:DrawMode := XBP_DRAW_OWNER}
DCBROWSECOL DATA {||DateInfo(DC_GetColArray(1,oBrowse),THURSDAY)}  HEADER DayInfo(THURSDAY ) WIDTH 15 PARENT oBrowse EVAL {|o|o:DataArea:DrawMode := XBP_DRAW_OWNER}
DCBROWSECOL DATA {||DateInfo(DC_GetColArray(1,oBrowse),FRIDAY)}    HEADER DayInfo(FRIDAY   ) WIDTH 15 PARENT oBrowse EVAL {|o|o:DataArea:DrawMode := XBP_DRAW_OWNER}
DCBROWSECOL DATA {||DateInfo(DC_GetColArray(1,oBrowse),SATURDAY)}  HEADER DayInfo(SATURDAY ) WIDTH 15 PARENT oBrowse EVAL {|o|o:DataArea:DrawMode := XBP_DRAW_OWNER}
DCBROWSECOL DATA {||DateInfo(DC_GetColArray(1,oBrowse),SUNDAY)}    HEADER DayInfo(SUNDAY   ) WIDTH 15 PARENT oBrowse EVAL {|o|o:DataArea:DrawMode := XBP_DRAW_OWNER}

DCREAD GUI ADDBUTTONS TITLE 'Test' FIT PARENT @oDialog EVAL {||SetAppFocus(oBrowse)}

RETURN nil

FUNCTION DateInfo(nRoomNumber,nDay)
LOCAL cDateInfo := "{}"
* retrieve your reservation information here!
* just sample data:
DO CASE
  CASE nRoomNumber = 1 .AND. nDay = MONDAY
  cDateInfo := "{{'19:00','14:00','reserved','Donnay'},{'19:00','24:00','booked','Smith'}}"
  CASE nRoomNumber = 1 .AND. nDay = TUESDAY
  cDateInfo := "{{'00:00','10:00','booked','Smith'}}"
  CASE nRoomNumber = 3 .AND. nDay = WEDNESDAY
  cDateInfo := "{{'07:00','16:00','booked','Jones'}}"
ENDCASE
RETURN cDateInfo

FUNCTION DayInfo(nDay)
DO CASE
  CASE nDay = MONDAY
  RETURN 'Monday'
  CASE nDay = TUESDAY
  RETURN 'Tuesday'
  CASE nDay = WEDNESDAY
  RETURN 'Wednesday'
  CASE nDay = THURSDAY
  RETURN 'Thursday'
  CASE nDay = FRIDAY
  RETURN 'Friday'
  CASE nDay = SATURDAY
  RETURN 'Saturday'
  CASE nDay = SUNDAY
  RETURN 'Sunday'
ENDCASE
RETURN ''

PROC AppSys() ; RETURN

***************************************
CLASS MyDates FROM DC_XbpBrowse
***************************************

EXPORTED:
   METHOD        CustomDrawCell

   INLINE METHOD destroy
   *********************
      ::DC_XbpBrowse:destroy()
   RETURN self

   INLINE METHOD init( oParent, oOwner, aPos, aSize, aPP, lVisible, oGetList )
   *****************************************************************
      ::DC_XbpBrowse:init( oParent, oOwner, aPos, aSize, aPP, lVisible, oGetList )
      ::drawMode:= XBP_DRAW_OWNER
   RETURN self

   INLINE METHOD create( oParent, oOwner, aPos, aSize, aPP, lVisible )
   *******************************************************************
      ::DC_XbpBrowse:create( oParent, oOwner, aPos, aSize, aPP, lVisible )
   RETURN self

ENDCLASS

METHOD MyDates:customDrawCell( oPS, aInfo )
   ******************************************
LOCAL xData, nPos, aRect, nFgCol, bColBlock, nAlign := 1, nFound, aPP, xData1, xData2, xData3, nHeight,;
      aAttr := ARRAY( GRA_AL_COUNT ), aPaintPos := aInfo[ XBP_DRAWINFO_AREA ]:CellRect( aInfo[ XBP_DRAWINFO_ITEM ] ),;
      aBoxLength := {},;
      aBoxAttrs := Array(GRA_AA_COUNT)

aAttr [ GRA_AL_WIDTH ]  := GRA_LINEWIDTH_NORMAL
aAttr [ GRA_AL_COLOR ]  := GRA_CLR_DARKGRAY
aAttr [ GRA_AL_TYPE ]   := GRA_LINETYPE_DOT

* get column data
xData:= aInfo[ XBP_DRAWINFO_AREA ]:getCell( aInfo[ XBP_DRAWINFO_ITEM ] )

* get column foreground color
aInfo[ XBP_DRAWINFO_AREA ]:getCellColor( aInfo[ XBP_DRAWINFO_ITEM ],@nFgCol )

IF xData <> nil

  GraSetAttrLine( oPS, aAttr )
  GraLine(oPs,{ aPaintPos[ 1 ],aPaintPos[ 2 ] }, { aPaintPos[ 3 ], aPaintPos[ 2 ] } )

  xData := &xData // create array

  IF Len(xData) > 0
    FOR nFound := 1 TO Len(xData) // every item is: begin time, end time, reservation info
      aBoxLength := BoxLength(xData[nFound,1],xData[nFound,2],aPaintPos[3]-aPaintPos[1])
      aBoxAttrs[GRA_AA_COLOR] := IF(xData[nFound,3]='reserved',RESERVED,BOOKED)
      GraSetAttrArea( oPS,aBoxAttrs)
      GraBox(oPs,{aBoxLength[1], aInfo[ XBP_DRAWINFO_RECT,2 ]}, { aBoxLength[2], aInfo[ XBP_DRAWINFO_RECT, 4 ] },GRA_FILL)
      oPS:setColor( nFgCol )
      GraCaptionStr( oPS, {aBoxLength[1], aInfo[ XBP_DRAWINFO_RECT,2 ]}, { aBoxLength[2], aInfo[ XBP_DRAWINFO_RECT, 4 ] }, xData[nFound,4], nAlign )
    NEXT
  ENDIF

  RETURN .F.

ENDIF
RETURN .T.

FUNCTION BoxLength(cTime1,cTime2,nLength)
LOCAL n1, n2, nDayInMinutes := 1440
IF cTime1 > cTime2 // day changed!
  cTime1 := "00:00"
ENDIF
* Time to minutes (a day has 1440 minutes):
n1 := (Val(Left(cTime1,2))*60)+Val(Right(cTime1,2))
n2 := (Val(Left(cTime2,2))*60)+Val(Right(cTime2,2))
* fraction regarding length:
n1 := Int((n1/nDayInMinutes)*nLength)
n2 := Int((n2/nDayInMinutes)*nLength)
return {n1,n2}
Best regards,
Tom

"Did I offend you?"
"No."
"Okay, give me a second chance."

User avatar
Tom
Posts: 1170
Joined: Thu Jan 28, 2010 12:59 am
Location: Berlin, Germany

Re: eXpress++ build 256

#4 Post by Tom »

Forget it! I installed hotfix rollup #45 from Alaska, a new XPPUI1.DLL. This is the cause for all the problems!
Best regards,
Tom

"Did I offend you?"
"No."
"Okay, give me a second chance."

User avatar
hz_scotty
Posts: 107
Joined: Thu Jan 28, 2010 8:20 am
Location: Wr.Neustadt / Österreich

Re: eXpress++ build 256

#5 Post by hz_scotty »

Hello

in the Sample of SFTPTest there is a Error by the DisplayStatus Method
the first parameter is missing (see Row 162+234)

Code: Select all

IF oSFTP == nil
  ::displayStatus('Could not create Active-X component: ' + 'Chilkat.SFtp' )
  RETURN .f.
ENDIF
best regards
Hans

User avatar
rdonnay
Site Admin
Posts: 4729
Joined: Wed Jan 27, 2010 6:58 pm
Location: Boise, Idaho USA
Contact:

Re: eXpress++ build 256

#6 Post by rdonnay »

Tom -

It's good to know that hotfix #45 solved your problems.
Maybe I should add a note about that in the README.TXT file.

Sorry for the delay in responding.
I was gone all day yesterday.

Roger
The eXpress train is coming - and it has more cars.

User avatar
Tom
Posts: 1170
Joined: Thu Jan 28, 2010 12:59 am
Location: Berlin, Germany

Re: eXpress++ build 256

#7 Post by Tom »

Hi, Roger.

Removing hotfix #45 (just released) solved my problems! 8-)

See you on tuesday!
Best regards,
Tom

"Did I offend you?"
"No."
"Okay, give me a second chance."

User avatar
rdonnay
Site Admin
Posts: 4729
Joined: Wed Jan 27, 2010 6:58 pm
Location: Boise, Idaho USA
Contact:

Re: eXpress++ build 256

#8 Post by rdonnay »

Hans -

Thank you for catching that.
I corrected it in the sample.

Roger

Code: Select all

  ::displayStatus( 'Could not create Active-X component: ' + 'Chilkat.SFtp' )

  ::displayStatus( 900, 'Could not create Active-X component: ' + 'Chilkat.SFtp' ) <<<<<<<<<< correction
The eXpress train is coming - and it has more cars.

User avatar
rdonnay
Site Admin
Posts: 4729
Joined: Wed Jan 27, 2010 6:58 pm
Location: Boise, Idaho USA
Contact:

Re: eXpress++ build 256

#9 Post by rdonnay »

Removing hotfix #45 (just released) solved my problems!
I'm confused. Let's talk about it in Hannover.
The eXpress train is coming - and it has more cars.

Wolfgang Ciriack
Posts: 479
Joined: Wed Jan 27, 2010 10:25 pm
Location: Berlin Germany

Re: eXpress++ build 256

#10 Post by Wolfgang Ciriack »

Hi Roger,
the first problem i found is the DCBrowse-Cursor:

The color has changed to another blue.
The color has changed fix to white on blue. if i am on a marked record (yellow on gray) in version 255 i saw yellow on blue, now white on blue.
_______________________
Best Regards
Wolfgang

Post Reply