fWH 12.11 broken compatibility

fWH 12.11 broken compatibility

Postby Richard Chidiak » Tue Dec 11, 2012 9:29 am

Antonio

I have 3 compatibility problems (so far) moving from fwh 11.4 to fwh 12.11

1. Combobox hanging the program when using an array..... i will put a sample later today
2. Get with readonly , colours not drawn correct

Ex : REDEFINE GET XCOEFFR ID 206 OF ODLG PICTURE "@Z 99.9999" READONLY COLOR CLR_GREEN,CLR_WHITE will never draw the colours unless you click in the cell.... dialogs are transparent

3. Btnbmp colours again try OBTN:SETCOLOR(clr_white,clr_green) it will never work only displaying black for background whatever colour we chose

I have restored my fwh tget prg from 11.4 (i have hundreds of gets not working properly anymore), combobox reset from 11.4 also and still i have the btnbmp problem

Waiting to hear from you

Richard
http://www.cbati.com

Uestudio
Fwh 13.05 Harbour 3.2 MSVC 2013
User avatar
Richard Chidiak
 
Posts: 946
Joined: Thu Oct 06, 2005 7:05 pm
Location: France

Re: fWH 12.11 broken compatibility

Postby Antonio Linares » Tue Dec 11, 2012 10:08 am

Richard,

In order to use colors on a READONLY Get this code is required:

REDEFINE GET oGet VAR nVal ID 101 OF oDlg READONLY COLOR CLR_GREEN, CLR_BLUE

oGet:lDisColors = .F.

Unless lDisColors value is changed, colors will not be shown

richard.prg
Code: Select all  Expand view
#include "FiveWin.ch"

function Main()

   local oDlg, oGet, nVal := 123

   DEFINE DIALOG oDlg RESOURCE "Test"

   REDEFINE GET oGet VAR nVal ID 101 OF oDlg READONLY COLOR CLR_GREEN, CLR_BLUE

   oGet:lDisColors = .F.

   ACTIVATE DIALOG oDlg CENTERED

return nil


richard.rc
Code: Select all  Expand view
TEST DIALOG 61, 39, 194, 119
STYLE DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU
CAPTION "Test"
FONT 8, "MS Sans Serif"
{
 EDITTEXT 101, 44, 25, 106, 15, WS_BORDER | WS_VSCROLL | WS_TABSTOP
 DEFPUSHBUTTON "OK", IDOK, 12, 96, 50, 14
 PUSHBUTTON "Cancel", IDCANCEL, 72, 96, 50, 14
 PUSHBUTTON "Help", IDHELP, 132, 96, 50, 14
}
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42089
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: fWH 12.11 broken compatibility

Postby Antonio Linares » Tue Dec 11, 2012 10:22 am

This example uses a combobox with an array and it is working fine:

richard2.prg
Code: Select all  Expand view
#include "FiveWin.ch"

function Main()

   local oDlg, oCbx, nValue

   DEFINE DIALOG oDlg

   @ 1, 1 COMBOBOX oCbx VAR nValue ITEMS { "One", "Two", "Three" } OF oDlg

   @ 3, 10 BUTTON "Ok" OF oDlg ACTION oDlg:End()

   ACTIVATE DIALOG oDlg CENTERED

return nil
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42089
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: fWH 12.11 broken compatibility

Postby Antonio Linares » Tue Dec 11, 2012 10:25 am

Richard,

And this example uses a BTNBMP with defined colors:

richard3.prg
Code: Select all  Expand view
#include "FiveWin.ch"

function Main()

   local oDlg, oCbx, nValue, oBtn

   DEFINE DIALOG oDlg

   @ 1, 1 COMBOBOX oCbx VAR nValue ITEMS { "One", "Two", "Three" } OF oDlg

   @ 12, 50 BTNBMP oBtn SIZE 15, 15 OF oDlg NOBORDER

   @ 3, 10 BUTTON "Ok" OF oDlg ACTION oDlg:End()

   ACTIVATE DIALOG oDlg CENTERED ;
      ON INIT oBtn:SetColor( CLR_WHITE, CLR_GREEN )

return nil
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42089
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: fWH 12.11 broken compatibility

Postby Richard Chidiak » Tue Dec 11, 2012 10:42 am

Antonio

Ok for discolors , it would have been nice to initiate it in tget as .f. , compatibility would have been kept, I have done so

Richard
http://www.cbati.com

Uestudio
Fwh 13.05 Harbour 3.2 MSVC 2013
User avatar
Richard Chidiak
 
Posts: 946
Joined: Thu Oct 06, 2005 7:05 pm
Location: France

Re: fWH 12.11 broken compatibility

Postby Richard Chidiak » Tue Dec 11, 2012 10:45 am

Antonio

Can you try this sample ? If you comment the combobox it will be ok , the combobox makes it hang

Code: Select all  Expand view


#INCLUDE "FIVEWIN.CH"

REQUEST DBFCDX,DBFFPT
REQUEST DESCEND
REQUEST ORDKeyno, ORDKeycount,ORDKEYGOTO

function Main()
LOCAL LSAVE     := .F. , ;
      ODSKT     := .F., ;
      OCTA      := .F., ;
      ICTA      := 1, ;
      ALIB      := {}, ;
      TOBJ      := {}, ;
      OFIC      := 1, ;
      OLECT     := " ", ;
      ODLG,ORAD

RDDSETDEFAULT("DBFCDX")

SET DATE FRENCH
SET CENTURY ON
SET FIXED ON
SET DBFLOCKSCHEME TO 2   // clp53
SET AUTOPEN ON
SET STRICTREAD OFF  // pour accélérer la réorg dbfcdx

set(_SET_INSERT, .T.)

SET EPOCH TO YEAR(DATE()) - 80

AADD(ALIB,"1 SAGE COALA ® Format Excel")
AADD(ALIB,"2 CEGID ® Format ASCII")
AADD(ALIB,"3 QUADRA ® Format ASCII")
AADD(ALIB,"4 CCMX ® Format ASCII")
AADD(ALIB,"5 CIEL ® Format ASCII")
AADD(ALIB,"6 CEGID ® Format Excel")

FOR ICTA = 1 TO 7
   AADD(TOBJ,NIL)
NEXT
ICTA := 1

DEFINE DIALOG ODLG RESOURCE "BALANCEXP" TITLE "this is a test" TRANSPARENT

REDEFINE RADIO ORAD VAR OFIC ID 201,202,205 OF ODLG
REDEFINE CHECKBOX ODSKT      ID 203     OF ODLG COLOR CLR_GREEN WHEN OFIC = 2
REDEFINE GET      OLECT      ID 204     OF ODLG PICTURE "!" WHEN ODSKT .AND. OFIC = 2

REDEFINE CHECKBOX TOBJ[01] VAR OCTA  ID 206  OF ODLG COLOR CLR_GREEN  // INTERFACE EXTERNE

REDEFINE COMBOBOX TOBJ[02] VAR ICTA ITEMS ALIB ID 207 OF ODLG ;
         WHEN OCTA UPDATE ;
         ON CHANGE ODLG:UPDATE()

REDEFINE CHECKBOX TOBJ[04] VAR TOBJ[05]  ID 208     OF ODLG COLOR CLR_GREEN                    // EXPORTER UN SEUL JOURNAL
REDEFINE GET      TOBJ[06] VAR TOBJ[07]  ID 209     OF ODLG PICTURE "!!" WHEN TOBJ[05] UPDATE  // CODE JOURNAL

REDEFINE BUTTON TOBJ[03] ID 03 OF ODLG ACTION (1 = 1)

REDEFINE BUTTON ID 01 OF ODLG ACTION (LSAVE := .T., ODLG:END())
REDEFINE BUTTON ID 02 OF ODLG ACTION (LSAVE := .F., ODLG:END())

ACTIVATE DIALOG ODLG CENTERED
return nil

 


Code: Select all  Expand view

// RESOURCE SCRIPT generated by "Pelles C for Windows, version 5.00".

#include <windows.h>
#include <commctrl.h>
#include <richedit.h>

LANGUAGE LANG_FRENCH,SUBLANG_FRENCH

BALANCEXP DIALOG DISCARDABLE 9, 15, 281, 189
STYLE WS_POPUP|WS_CAPTION|WS_SYSMENU
CAPTION "Balance comptable exportée "
FONT 10, "Tahoma"
{
  CONTROL "Format du fichier exporté", 401, "Static", SS_CENTER|WS_BORDER|WS_GROUP, 89, 1, 102, 12
  CONTROL "Excel", 201, "Button", BS_RADIOBUTTON|BS_LEFTTEXT, 1, 19, 38, 11
  CONTROL "ASCII (TXT)", 202, "Button", BS_RADIOBUTTON|BS_LEFTTEXT, 45, 19, 51, 11
  CONTROL "Copier sur support externe (Ascii Uniquement)", 203, "Button", BS_AUTOCHECKBOX|WS_TABSTOP, 1, 58, 166, 12
  CONTROL "Identification du lecteur (Poste de travail)", 402, "Static", SS_CENTER|WS_BORDER|WS_GROUP, 170, 49, 79, 30
  CONTROL "", 204, "Edit", WS_BORDER|WS_TABSTOP, 256, 56, 16, 12
  CONTROL "OK", IDOK, "Button", BS_DEFPUSHBUTTON|WS_TABSTOP, 2, 170, 35, 18
  CONTROL "Annuler", IDCANCEL, "Button", WS_TABSTOP, 244, 170, 35, 18
  CONTROL "Format Fichier Export", 3, "Button", WS_TABSTOP, 176, 18, 99, 18
  CONTROL "Interface vers Logiciel de Comptabilité Agréé", 206, "Button", BS_AUTOCHECKBOX|WS_TABSTOP, 1, 83, 161, 15
  CONTROL "DBF", 205, "Button", BS_RADIOBUTTON|BS_LEFTTEXT, 105, 19, 51, 11
  COMBOBOX 207, 48, 99, 185, 81, CBS_DROPDOWN | WS_TABSTOP 
  CONTROL "Exporter Seulement ce Journal", 208, "Button", BS_AUTOCHECKBOX|WS_TABSTOP, 0, 152, 128, 12
  CONTROL "", 209, "Edit", WS_BORDER|WS_TABSTOP, 136, 152, 32, 11
}
 
http://www.cbati.com

Uestudio
Fwh 13.05 Harbour 3.2 MSVC 2013
User avatar
Richard Chidiak
 
Posts: 946
Joined: Thu Oct 06, 2005 7:05 pm
Location: France

Re: fWH 12.11 broken compatibility

Postby norberto » Tue Dec 11, 2012 10:52 am

I have problems with combobox FWH12.11 related to nAt data, restored to combobox 12.09 Works fine.
norberto
 
Posts: 566
Joined: Thu Aug 30, 2007 3:40 pm
Location: BR

Re: fWH 12.11 broken compatibility

Postby Antonio Linares » Tue Dec 11, 2012 11:28 am

Richard,

Please remove the UPDATE clause from the COMBOBOX or remove the ON CHANGE, as it generates an endless loop:

Code: Select all  Expand view

REDEFINE COMBOBOX TOBJ[02] VAR ICTA ITEMS ALIB ID 207 OF ODLG ;
         WHEN OCTA /* UPDATE */ ;
         ON CHANGE ODLG:UPDATE()
 


or
Code: Select all  Expand view

REDEFINE COMBOBOX TOBJ[02] VAR ICTA ITEMS ALIB ID 207 OF ODLG ;
         WHEN OCTA UPDATE
         // ON CHANGE ODLG:UPDATE()
 


Surely this is due to recent change proposed by Günther:
viewtopic.php?f=3&t=25125&start=0
Class TComboBox Method Set() evaluates bChange
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42089
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: fWH 12.11 broken compatibility

Postby norberto » Tue Dec 11, 2012 11:45 am

Antonio, this solution dont work for me... and I dont use update clause in combobox, class combobox dont have NAT var anymore? Work fine with fwh12.09.

CODE:

@ 0.25,len(oBtnbar:aControls)*4.1 COMBOBOX oComb VAR nComb ITEMS aOrders[1] OF oBtnBar FONT oFont;
SIZE 80, 100 ON CHANGE (oDbf:setorder(aOrders[2,oComb:nat]), oLbx:gotop(),oLbx:refresh(),oLbx:setfocus())
oComb:ctooltip := [Altera Ordenação Arquivo - Pesquisa]


ERROR :

Error Description:
Error BASE/1004 Class: 'NIL' has no exported method: NAT
[ 1] = U

called by NAT(0)
called by (b)P_CVENDEDORES(752)
called by TCOMBOBOX:SET(475)
called by TCOMBOBOX:DEFAULT(724)
called by TCOMBOBOX:NEW(231)
norberto
 
Posts: 566
Joined: Thu Aug 30, 2007 3:40 pm
Location: BR

Re: fWH 12.11 broken compatibility

Postby Antonio Linares » Tue Dec 11, 2012 2:19 pm

Norberto,

Please try this:

::nAt instead of oComb:nat
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42089
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: fWH 12.11 broken compatibility

Postby norberto » Tue Dec 11, 2012 4:22 pm

im out of class combobox , so :: dont work.


Function test()
include ...

local oComb

@ x,y COMBOBOX oComb

...
in this point i can use only oComb:nat, because ::nat dont work.
...

Return nil
norberto
 
Posts: 566
Joined: Thu Aug 30, 2007 3:40 pm
Location: BR

Re: fWH 12.11 broken compatibility

Postby Antonio Linares » Tue Dec 11, 2012 8:58 pm

Norberto,

"Self" is provided as a parameter of the ON CHANGE codeblock, so you could use ::nAt

[{|Self|<uChange>}]

oComb is not defined yet (you are using it before it has been assigned, thats why you get NIL:

Error BASE/1004 Class: 'NIL' has no exported method: NAT
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42089
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: fWH 12.11 broken compatibility

Postby norberto » Tue Dec 11, 2012 9:11 pm

Antonio, right, but after using your suggestion:

Error Description:
Error BASE/1004 Class: 'NIL' has no exported method: GOTOP
[ 1] = U

called by GOTOP(0)
called by (b)P_CVENDEDORES(752)
called by TCOMBOBOX:SET(475)

this change in fwh12.11 broken compatility with thousand of lines... my system Works fine in 12.09.
norberto
 
Posts: 566
Joined: Thu Aug 30, 2007 3:40 pm
Location: BR

Re: fWH 12.11 broken compatibility

Postby Antonio Linares » Tue Dec 11, 2012 9:33 pm

Is it related to oLbx ? Where and how is it defined ?
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42089
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: fWH 12.11 broken compatibility

Postby Antonio Linares » Tue Dec 11, 2012 9:36 pm

Norberto,

Please try to provide a small and self contained example to reproduce it here, thanks
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42089
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 127 guests