next native Control to Express++ Syntax

This forum is for eXpress++ general support.
Message
Author
User avatar
Auge_Ohr
Posts: 1428
Joined: Wed Feb 24, 2010 3:44 pm

next native Control to Express++ Syntax

#1 Post by Auge_Ohr »

hi,

i try to use DcSlider() / DXE_Slider() Sample for DXE_MonthPick().
DXE_Month.jpg
DXE_Month.jpg (116.08 KiB) Viewed 16926 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 ?
Attachments
DCMONTH.ZIP
need ot4xb
MONTHCAL.LIB / DLL v1.9.355
(38.76 KiB) Downloaded 707 times
greetings by OHR
Jimmy

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

Re: next native Control to Express++ Syntax

#2 Post 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.
The eXpress train is coming - and it has more cars.

User avatar
Auge_Ohr
Posts: 1428
Joined: Wed Feb 24, 2010 3:44 pm

Re: next native Control to Express++ Syntax

#3 Post 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 ?
greetings by OHR
Jimmy

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

Re: next native Control to Express++ Syntax

#4 Post by rdonnay »

If you give me your source maybe I can figure out what is happening here.
The eXpress train is coming - and it has more cars.

User avatar
Auge_Ohr
Posts: 1428
Joined: Wed Feb 24, 2010 3:44 pm

Re: next native Control to Express++ Syntax

#5 Post 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
DC_DxeMonth.jpg (152.02 KiB) Viewed 16888 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
greetings by OHR
Jimmy

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

Re: next native Control to Express++ Syntax

#6 Post by rdonnay »

where to put my "Action" Block ?

Code: Select all

LOCAL bAction := aGetListItem[bGETLIST_ACTION]
The eXpress train is coming - and it has more cars.

User avatar
Auge_Ohr
Posts: 1428
Joined: Wed Feb 24, 2010 3:44 pm

Re: next native Control to Express++ Syntax

#7 Post 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] )
greetings by OHR
Jimmy

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

Re: next native Control to Express++ Syntax

#8 Post 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 */
The eXpress train is coming - and it has more cars.

User avatar
Auge_Ohr
Posts: 1428
Joined: Wed Feb 24, 2010 3:44 pm

Re: next native Control to Express++ Syntax

#9 Post by Auge_Ohr »

rdonnay wrote:Here is a simplified version of DCMONTH.CH:
it is much short and better readable, THX.
greetings by OHR
Jimmy

User avatar
Auge_Ohr
Posts: 1428
Joined: Wed Feb 24, 2010 3:44 pm

Re: next native Control to Express++ Syntax

#10 Post 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") :?:
Attachments
DCMONTH2.ZIP
v1.9.355 need ot4xb
(39.03 KiB) Downloaded 703 times
greetings by OHR
Jimmy

Post Reply