Font error in Dialog box

Font error in Dialog box

Postby richard » Thu Jan 19, 2006 10:24 am

Antonio,
The code below is the second dialog box in a multi dialog wizard. It activates the dialog box and immediately comes up with
"Error BASE/1004 Class: NIL has no exported method:hFONT from errorsys, line: 0"
This has appeared with FWH27 Jan using harbour.

STATIC FUNCTION DoMatMed2()

LOCAL lChoice := .F.,nSelect:=1,nLength
LOCAL oMM2Dlg,oBack,oNext
LOCAL oRadio,oCancel,lGoOn:=.F.
LOCAL oChkStart,oChkFinish,oCBXStart,oCBXFinish
LOCAL aItem1:={},aItem2
LOCAL cStart,cFinish,nStart,nFinish

nLength := Len(aMatMed[HEADING])
FOR i := 1 TO nLength
AAdd(aItem1,aMatMed[HEADING,i,1])
NEXT
aItem2 := aItem1
aMatMed[START] := .F.
aMatMed[FINISH] := .F.
aMatMed[BEGINNING] := 1
aMatMed[ENDPOINT] := Len(aMatMed[HEADING])
DEFINE DIALOG oMM2Dlg RESOURCE "MM2"
REDEFINE RADIO oRadio VAR aMatMed[CHOICE] ID 10,20 OF oMM2Dlg
REDEFINE CHECKBOX oChkBox VAR aMatMed[CURRENT] ID 30 OF oMM2Dlg
REDEFINE CHECKBOX oChkStart VAR aMatMed[START] ID 40 OF oMM2Dlg ;
ON CHANGE (IIF(aMatMed[START],.F.,.T.),IIF(!aMatMed[START],DoRestrict(oCBXStart),DoRelease(oCBXStart)))
REDEFINE COMBOBOX oCBXStart VAR cStart ID 60 ITEMS aItem1 OF oMM2Dlg ;
ON CHANGE (aMatMed[BEGINNING]:=oCBXStart:nAt,IIF(aMatMed[START],oCBXFinish:nAt:=aMatMed[BEGINNING]+1,),oCBXFinish:Select(oCBXFinish:nAt))
REDEFINE CHECKBOX oChkFinish VAR aMatMed[FINISH] ID 50 OF oMM2Dlg ;
ON CHANGE (IIF(aMatMed[FINISH],.F.,.T.),IIF(!aMatMed[FINISH],DoRestrict(oCBXFinish),DoRelease(oCBXFinish)),;
IIF(!aMatMed[FINISH],aMatMed[ENDPOINT]:=Len(aMatMed[HEADING]),))
REDEFINE COMBOBOX oCBXFinish VAR cFinish ID 70 ITEMS aItem2 OF oMM2Dlg ;
ON CHANGE (aMatMed[ENDPOINT]:=oCBXFinish:nAt)
REDEFINE BUTTON oBack ID 100 OF oMM2Dlg ;
ACTION DoMatMed(oMM2Dlg)
REDEFINE BUTTON oNext ID 200 OF oMM2Dlg ACTION (aMatMed[CONTINUE]:=.T.,oMM2Dlg:End())
REDEFINE BUTTON oCnclBtn ID 300 OF oMM2Dlg ACTION (MatMedArray(),oMM2Dlg:End())
ACTIVATE DIALOG oMM2Dlg CENTERED ON INIT (IIF(!lRepertorise,oChkBox:Disable(),oChkBox:Enable()),;
oCBXStart:Select(1),oCBXFinish:Select(1),;
oCBXStart:DisAble(),oCBXFinish:Disable())
IF (aMatMed[CONTINUE])
DoMatMed3()
ENDIF

RETURN NIL

This is the RC code

MM2 DIALOG DISCARDABLE 0, 0, 273, 167
STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION
CAPTION "Rubrica Medicæ Wizard "
FONT 8, "MS Sans Serif"
BEGIN
DEFPUSHBUTTON "&Next >>",200,111,146,50,14
PUSHBUTTON "&Cancel",300,195,146,50,14
GROUPBOX "",5,7,7,259,123
PUSHBUTTON "<< &Back",100,25,146,50,14
CONTROL "Use Remedies from current Case",30,"Button",
BS_AUTOCHECKBOX | WS_TABSTOP,137,21,118,10
CONTROL "Single Remedy",10,"Button",BS_AUTORADIOBUTTON,13,20,66,
10
CONTROL "Compare Remedies",20,"Button",BS_AUTORADIOBUTTON,13,34,
78,10
CONTROL "Limit Start",40,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,
13,69,53,10
CONTROL "Limit Finish",50,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,
137,69,52,10
COMBOBOX 60,13,87,105,30,CBS_DROPDOWN | WS_VSCROLL |
WS_TABSTOP
COMBOBOX 70,135,86,108,30,CBS_DROPDOWN | WS_VSCROLL |
WS_TABSTOP
END
It is built from resources, no problems before this version.
regards,

There is no line number given.
Richard Grayden
Balancing Solutions
Sydney, Australia
richard
 
Posts: 8
Joined: Thu Nov 03, 2005 9:17 am
Location: Australia

Postby Antonio Linares » Thu Jan 19, 2006 11:00 am

Richard,

Please post the entire calls stack list that you get. Thanks
regards, saludos

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

Postby richard » Sat Feb 04, 2006 12:52 am

Hi Antonio,

Sorry, but I have been on holidays for the last two weeks.
There is no stack list given, the program immediately exits, however, if I comment out the disabling the program works fine.

ACTIVATE DIALOG oMM2Dlg ON INIT (IIF(!lRepertorise,oChkBox:Disable(),oChkBox:Enable()),;
oCBXStart:Select(1),oCBXFinish:Select(1),;
/*oCBXStart:DisAble(),oCBXFinish:Disable()*/)

If I only comment out one of them I do get "error.log" file.

I have sent the log file to your email address.

Richard.
Richard Grayden
Balancing Solutions
Sydney, Australia
richard
 
Posts: 8
Joined: Thu Nov 03, 2005 9:17 am
Location: Australia


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 49 guests