Page 1 of 2
next native Control to Express++ Syntax
Posted: Mon Apr 18, 2016 11:04 pm
by Auge_Ohr
hi,
i try to use DcSlider() / DXE_Slider() Sample for DXE_MonthPick().

- DXE_Month.jpg (116.08 KiB) Viewed 16929 times
i have copy DCSLIDE.CH to DCMONTH.CH and change DC_DXESlider() to DC_DXEMonthPick().
than i delete all know like BUDDYSPACE <buds>, also from DC_GetListSet()
this compile/link without Error but when Start i got
------------------------------------------------------------------------------
FEHLERPROTOKOLL von "D:\ALASKA\NATIVE\MonthDay\DCMONTH.EXE" Datum: 19.04.2016 07:58:53
Xbase++ Version : Xbase++ (R) Version 1.90.355
Betriebssystem : Windows Vista 06.01 Build 07601 Service Pack 1
------------------------------------------------------------------------------
oError:args :
-> VALTYPE: O CLASS: DC_DxeMonthPick
oError:canDefault : N
oError:canRetry : N
oError:canSubstitute: J
oError:cargo : NIL
oError:description : Zugriff auf Instanz-Variable in Klassen-Objekt nicht erlaubt
oError:filename :
oError:genCode : 31
oError:operation : cargo
oError:osCode : 0
oError:severity : 2
oError:subCode : 2241
oError:subSystem : BASE
oError:thread : 1
oError:tries : 0
------------------------------------------------------------------------------
CALLSTACK:
------------------------------------------------------------------------------
Aufgerufen von DC_GETLIST:READGUI(2677)
Aufgerufen von DC_READGUI(113)
Aufgerufen von MAIN(61)
so my DCMONTH.CH seem wrong ... how find out what is wrong ?
Re: next native Control to Express++ Syntax
Posted: Tue Apr 19, 2016 7:50 am
by rdonnay
It appears that your DXE_MonthPick class has iVars which are common to Xbase parts that are not exported.
eXpress++ was built around full compatibility with Xbase Parts, all of its methods and all of its iVars.
iVars like cargo, tabstop, etc must be exported to be able to integrate with the eXpress++ engine.
Also methods like childlist(), etc must also be exported.
Re: next native Control to Express++ Syntax
Posted: Tue Apr 19, 2016 12:27 pm
by Auge_Ohr
rdonnay wrote:It appears that your DXE_MonthPick class has iVars which are common to Xbase parts that are not exported.
iVars like cargo, tabstop, etc must be exported to be able to integrate with the eXpress++ engine.
Also methods like childlist(), etc must also be exported.
Thx for Answer.
hm ... i do not use Cargo or Childlist() in that Control and iVar are this
Code: Select all
PROTECTED:
VAR lNowGetDate // Flag when to get
EXPORTED:
VAR hDPick // Handle Monthcalendar
VAR hXbp // Handle Static Parent
VAR dwLvStyle // Control Style
VAR dwLvStyleEx // Control Extend Style
VAR m_ht // need for Notify
VAR nForwardKeyFlags // Forward Keys to Parent -> Xbase++
VAR OnItemDblClick // User Codeblock
VAR MultiSelect // multi Day select
VAR WeekNumbers // show Weeknumber
VAR NoToday // donït show Today
VAR NoTodayCircle // donït show Circle around Today
VAR BoldDays // show Bold Days
VAR TitlebarFGcolor // Titlebar - Weekdays - Weeknumber Color
VAR TitlebarBGcolor // Titlebar Background Color
VAR BodyFGcolor // Month Body Foreground Color
VAR BodyBGcolor // Month Body Background Color
VAR TrailingColor
VAR useVisualStyle // use visual Style
VAR dDaysStart // 1st. Day Start
VAR dDaysEnd // 2nd. Day End
VAR aBoldDays // hold Bold Days
so perhaps useVisualStyle is a Problem ?
how to find out what is going wrong ? can i "strip" MONTHCAL.CH more than i did ?
Re: next native Control to Express++ Syntax
Posted: Tue Apr 19, 2016 4:35 pm
by rdonnay
If you give me your source maybe I can figure out what is happening here.
Re: next native Control to Express++ Syntax
Posted: Tue Apr 19, 2016 6:50 pm
by Auge_Ohr
rdonnay wrote:If you give me your source maybe I can figure out what is happening here.
have figure out after build a DclipX.DLL to debug to find my Error in DCMONTH.CH

- DC_DxeMonth.jpg (152.02 KiB) Viewed 16891 times
only Question (now) : where to put my "Action" Block ?
Code: Select all
// oMonth := DC_DxeMPick():New( oParent,,aPos,aSize,,,oGetList )
oMonth := DXE_MonthPick():New( oParent,,aPos,aSize)
// where to put this ?
oMonth:OnItemDblClick := {|dDate1,dDate2,oSelf| Msgbox( DTOC( ... )}
- DC_MONTH.ZIP
- need ot4xb
DLL / LIB v1.9.355 - (40.55 KiB) Downloaded 695 times
Re: next native Control to Express++ Syntax
Posted: Tue Apr 19, 2016 7:03 pm
by rdonnay
where to put my "Action" Block ?
Code: Select all
LOCAL bAction := aGetListItem[bGETLIST_ACTION]
Re: next native Control to Express++ Syntax
Posted: Tue Apr 19, 2016 8:07 pm
by Auge_Ohr
rdonnay wrote:where to put my "Action" Block ?
Code: Select all
LOCAL bAction := aGetListItem[bGETLIST_ACTION]
OK
Code: Select all
@ 200,0 DCMONTH OBJECT oDPick ;
... ;
ONACTION {|dDate1,dDate2,oSelf| Msgbox( ... ) } ; // add this
RESIZE DCGUI_RESIZE_RESIZEONLY
FUNCTION DC_DxeMonth( aParams )
...
// delete
* oMonth:OnItemDblClick := ...
// add
SetOption( @oMonth:OnItemDblClick, aGetListItem[bGETLIST_ACTION] )
Re: next native Control to Express++ Syntax
Posted: Sat Apr 23, 2016 11:20 am
by rdonnay
Here is a simplified version of DCMONTH.CH:
Code: Select all
#include "dcdialog.ch"
#command @ <row>,<col> DCMONTH [<clauses,...>] ; //DCMONTH
[MULTISELECT <ms>] /* need when from / to */ ;
[NOTODAY <st>] /* -> Show = .NOT. (.F.) */ ;
[SHOWWEEKNUMBERS <sw>] /* Week Number on left */ ;
[SELSTART <ss>] /* */ ;
[SELEND <se>] /* */ ;
[MAXSELCOUNT <maxs>] /* max Days when maximize */ ;
[DATETIME <cdt>] /* */ ;
[DAYOFWEEK <nDate>] /* Monday = 0 Sunday = 6 */ ;
[BOLDDAYS <lbd>] /* see Holyday */ ;
[SETRANGE <dDate1>, <dDate2>] /* */ ;
[TITLEBARBG <tbg>] /* */ ;
[TITLEBARFG <tfg>] /* */ ;
[BODYBG <bbg>] /* */ ;
[BODYFG <bfg>] /* */ ;
[ONACTION <bOnItemDblClick>] /* */ ;
[RESTYPE <cResType>] ;
[RESFILE <cResFile>] ;
=> ;
@ <row>, <col> DCCUSTOM {|a|DC_DxeMonth(a)} [<clauses>] ;
;DC_GetListSet(DCGUI_GETLIST,xGETLIST_OPTIONS, ;
{<ms>,<st>,<sw>,<ss>,<se>,<maxs>,<cdt>,<nDate>,<lbd>,<tbg>, ; /* each 10 */
<tfg>,<bbg>,<bfg>} ) ; /* Jimmy */
[;DC_GetListSet(DCGUI_GETLIST,xGETLIST_OPTIONS2,{<dDate1>,<dDate2>})] ; /* Jimmy */
[;DC_GetListSet(DCGUI_GETLIST,xGETLIST_OPTIONS3,{<cResType>,<cResFile>})] ; /* Jimmy */
Re: next native Control to Express++ Syntax
Posted: Sat Apr 23, 2016 12:38 pm
by Auge_Ohr
rdonnay wrote:Here is a simplified version of DCMONTH.CH:
it is much short and better readable, THX.
Re: next native Control to Express++ Syntax
Posted: Fri Sep 02, 2016 2:13 pm
by Auge_Ohr
hi,
Question : when is ONACTION fired ?
Code: Select all
ONACTION {|dDate1,dDate2,oSelf| ;
Msgbox( DTOC(dDate1)+CRLF+DTOC(dDate2),LTRIM(STR((dDate2-dDate1)+1))+" Days" ) } ;
...
SetOption( @oMonth:OnItemDblClick, aGetListItem[bGETLIST_ACTION] )
normal click ( lbDown ) start Action but in this Control you hold it unit reach Target and release ( LbUp )
both time Windows send MCN_SELCHANGE and NM_RELEASEDCAPTURE when "LbUp"
so what does Express++ need to activate ONACTION Callback Slot ?
i can send it from my native Control to Xbase++ Queue or rename my iVar ("OnItemDblClick")
