topic
stringlengths 1
63
| text
stringlengths 1
577k
⌀ |
|---|---|
Bug in TButton
|
Enrico,
On a first review it looks as a Harbour vs xharbour related issue.
With Harbour it works ok <!-- s:) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":)" title="Smile" /><!-- s:) -->
It seems a difference between Harbour/xharbour Class TGet.
|
Bug in TButton
|
This way it works:
[code:1z6n9bq4]
@ 1, 1 GET cVar;
VALID ( oDlg:aControls[ 1 ]:Assign(), !EMPTY( cVar ) )
[/code:1z6n9bq4]
So it seems that with xharbour the ::oGet DATA has not been assigned, thats why it remains "empty".
|
Bug in TButton
|
This is a fix:
[code:2g61zxy7]
METHOD lValid() CLASS TGet
local lRet := .t.
if ::oGet:BadDate
::oGet:KillFocus()
::oGet:SetFocus()
MsgBeep()
return .f.
else
::oGet:Assign() // New !!!
if ValType( ::bValid ) == "B"
lRet := Eval( ::bValid, Self )
if ! lRet
::oWnd:nLastKey = 0
endif
endif
endif
return lRet
[/code:2g61zxy7]
|
Bug in TButton
|
Thank you, but I suspect that some other problems is hiding under the wood... <!-- s:-( --><img src="{SMILIES_PATH}/icon_sad.gif" alt=":-(" title="Sad" /><!-- s:-( -->
EMG
|
Bug in TButton
|
Enrico,
Yes, we'll see.
The problem is that Class TGet is quite different from Harbour to xharbour.
|
Bug in TButton
|
Antonio:
The last time I sent you a suggested fix in TGet [I forgot what it was
about <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) --> ], I pasted a modified version of ::EditUpdate() I've been using for several years now and in which I added the call to ::oGet:assign()
to ensure the Clipper/[x]Harbour buffer was always in sync with FW/FWH's.
That could be an alternate fix for this problem:
METHOD EditUpdate() CLASS TGet
if ::oGet:HasFocus
::DispText()
::oGet:Assign() // lkm
endif
::SetPos( ::oGet:Pos )
Return Self
[quote="Antonio Linares":302k6lgp]This is a fix:
[code:302k6lgp]
METHOD lValid() CLASS TGet
local lRet := .t.
if ::oGet:BadDate
::oGet:KillFocus()
::oGet:SetFocus()
MsgBeep()
return .f.
else
::oGet:Assign() // New !!!
if ValType( ::bValid ) == "B"
lRet := Eval( ::bValid, Self )
if ! lRet
::oWnd:nLastKey = 0
endif
endif
endif
return lRet
[/code:302k6lgp][/quote:302k6lgp][code:302k6lgp][/code:302k6lgp]
Regards,
Luis
|
Bug in TButton
|
[quote="Antonio Linares":48zy97bd]Enrico,
Yes, we'll see.
The problem is that Class TGet is quite different from Harbour to xharbour.[/quote:48zy97bd]
After some tests it seems all ok with your fix.
Thank you.
EMG
|
Bug in TButton
|
Luis,
The fact is that Class TGet is different in Harbour and xharbour, thats why we need to asure that before we validate a GET, its related variable has been assigned. Placing it at lValid() is a way to be sure it gets done.
|
Bug in TButton
|
Running the following sample you can see that it shows the message "cVar2 is empty" if ALT-C is pressed (but not if the button is clicked):
[code:2bhaiky7]#include "Fivewin.ch"
FUNCTION MAIN()
LOCAL oDlg
LOCAL oGet1, cVar1 := SPACE( 30 )
LOCAL oGet2, cVar2 := SPACE( 30 )
DEFINE DIALOG oDlg
@ 1, 1 GET oGet1 VAR cVar1
oGet1:bLostFocus = { || cVar2 := "Test", oGet2:Refresh() }
@ 2, 1 GET oGet2 VAR cVar2
@ 3, 1 BUTTON "&Close";
ACTION IF( !EMPTY( cVar2 ), oDlg:End(), MSGINFO( "cVar2 is empty" ) )
ACTIVATE DIALOG oDlg;
CENTER
? cVar2
RETURN NIL[/code:2bhaiky7]
A possible fix:
[code:2bhaiky7]METHOD Click() CLASS TButton
if ! ::lProcessing
::lProcessing = .t.
if ::bAction != nil
::SetFocus() ///EMG
Eval( ::bAction )
endif
if ! ::lCancel .and. ::oWnd:hWnd != 0 // A.L. 21/04/03
Super:Click()
endif // A.L. 21/04/03
// Hernan Ceccarelli added 10-Junio-2001
if ( GetFocus() == ::hWnd )
::PostMsg( BM_SETSTYLE, BS_DEFPUSHBUTTON, 1 )
else
if ! ::lDefault
::PostMsg( BM_SETSTYLE, BS_PUSHBUTTON, 1 )
endif
endif
// Hernan Ceccarelli added 10-Junio-2001
::lProcessing = .f.
endif
return nil[/code:2bhaiky7]
EMG
|
Bug in TButton
|
Thanks Enrico! <!-- s:) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":)" title="Smile" /><!-- s:) -->
|
Bug in TButton CANCEL clause
|
The following sample shows that if you hit ALT-C the DIALOG is closed but the VALID of the GET is also executed while if you click on the button with the mouse the VALID is not executed (as it should be):
[code:2r35uusq]#include "Fivewin.ch"
FUNCTION MAIN()
LOCAL oDlg
LOCAL cVar := SPACE( 20 )
DEFINE DIALOG oDlg
@ 1, 1 GET cVar;
VALID ( MSGINFO( "Hello" ), .T. )
@ 3, 1 BUTTON "&Close";
ACTION oDlg:End();
CANCEL
ACTIVATE DIALOG oDlg;
CENTER
RETURN NIL[/code:2r35uusq]
EMG
|
Bug in TButton CANCEL clause
|
Enrico,
I think you have it backwards. It sounds like the bug is in the Alt-C not the clicking the button. Valids are NOT supposed to be executed when the CANCEL clause is used. If there were, then you could not cancel a new (empty) dialog without filling in any data necessary to meet any VALIDs (and then such data would be discarded). Correct?
James
|
Bug in TButton CANCEL clause
|
Yes, the bug is in the Alt-C. That's what I said (or that I was trying to say, sorry for my bad english).
EMG
|
Bug in TButton CANCEL clause
|
Hello,
Quite right - just tested - does the same on all of my dialogs - Cancel Button (with CANCEL clause) when clicked - no problem / Alt-C - big problem - GET is VALIDATED.
Dale.
|
Bug in TButton CANCEL clause
|
Enrico,
[quote:21x2h3d6]Yes, the bug is in the Alt-C. That's what I said (or that I was trying to say, sorry for my bad english). [/quote:21x2h3d6]
My apologies, it was my misunderstanding--not your English. I misread this:
[quote:21x2h3d6]click on the button with the mouse the VALID is not executed (as it should be): [/quote:21x2h3d6]
I thought is said "(but it should be)."
So, as you said Alt-C should not execute the VALID.
Regards,
James
|
Bug in TButton CANCEL clause
|
[quote="James Bott":2l9rvqit]My apologies, it was my misunderstanding--not your English. I misread this:[/quote:2l9rvqit]
No problems, James.
EMG
|
Bug in TCBrowse
|
In the following sample, please press the down arrow till the thumb reaches about half the scrollbar and then try to press PAGE DOWN. You will see that the thumb itself moves up instead of down:
[code:226429ng]#include "Fivewin.ch"
#include "Tcbrowse.ch"
FUNCTION MAIN()
LOCAL oDlg, oBrw
USE TEST
DEFINE DIALOG oDlg;
SIZE 400, 400
@ 0, 0 BROWSE oBrw
ADD COLUMN TO oBrw;
DATA TEST -> last;
HEADER "LAST"
ADD COLUMN TO oBrw;
DATA TEST -> first;
HEADER "FIRST"
ACTIVATE DIALOG oDlg;
ON INIT oDlg:SetControl( oBrw );
CENTER
CLOSE
RETURN NIL[/code:226429ng]
EMG
|
Bug in TCBrowse
|
The same sample works fine if a TWBrowse is used instead of a TCBrowse.
EMG
|
Bug in TCBrowse
|
In the following sample, the currently selected cell is black on black instead of the specified colors:[code:ef2vjkwd]#include "Fivewin.ch"
#include "Tcbrowse.ch"
FUNCTION MAIN()
LOCAL oDlg, oBrw
USE TEST
DEFINE DIALOG oDlg;
SIZE 400, 400
@ 0, 0 BROWSE oBrw
oBrw:bLogicLen = { || LastRec() }
oBrw:lCellStyle = .T.
oBrw:nClrForeFocus = { || CLR_HRED }
oBrw:nClrBackFocus = { || CLR_HGREEN }
ADD COLUMN TO oBrw;
DATA "Data" + LTRIM( STR( RECNO() ) ) + " ";
HEADER "DATA"
ADD COLUMN TO oBrw
ACTIVATE DIALOG oDlg;
ON INIT oDlg:SetControl( oBrw );
CENTER
CLOSE
RETURN NIL[/code:ef2vjkwd]EMG
|
Bug in TCBrowse
|
Any news?EMG
|
Bug in TCBrowse
|
Enrico,Fixed <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) --> Please change these lines in Class TCBrowse:line 506: nClrFore := If( ValType( nClrForeFocus ) == "B", Eval( nClrForeFocus ), nClrForeFocus )line 519: nClrBack := If( ValType( nClrBackFocus ) == "B", Eval( nClrBackFocus ), nClrBackFocus )
|
Bug in TCBrowse
|
Perfect! <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) -->EMG
|
Bug in TCBrowse:lEditCol() method (fixed)
|
This is the sample. Valid is never executed:
[code:2yrkhmc8]#include "Fivewin.ch"
#include "Tcbrowse.ch"
FUNCTION MAIN()
LOCAL oDlg, oBrw, cVar
LOCAL bValid := { || MsgInfo(), .T. }
USE C:\XHARBOUR\TEST
cVar = FIELD -> first
DEFINE DIALOG oDlg SIZE 300, 300
@ 0, 0 BROWSE oBrw;
ON RIGHT CLICK oBrw:lEditCol( 1, @cVar, , bValid )
ADD COLUMN TO oBrw;
DATA TEST -> first;
HEADER "FIRST"
@ 6, 0 BUTTON "Close";
ACTION oDlg:End()
ACTIVATE DIALOG oDlg;
CENTER
RETURN NIL[/code:2yrkhmc8]
EMG
|
Bug in TCBrowse:lEditCol() method (fixed)
|
Fixed. Please change this in source\classes\tcbrowse.prg line 863:
@ 10, 0 BUTTON oBtn PROMPT "" ACTION ( oBtn:SetFocus(), oDlg:End(), lOk := .t. ) OF oDlg
Also, to get a better screen position change this in line 868:
ACTIVATE DIALOG oDlg ;
ON INIT ( oDlg:Move( aDim[ 1 ] + 1, aDim[ 2 ] + 1,;
|
Bug in TCBrowse:lEditCol() method (fixed)
|
Great, thank you!
EMG
|
Bug in TCalenda
|
Antonio
there is a problem in tcalenda.prg , you cann see it in TESTCAL2.PRG
If you do a double click (quicky ) on a day of previous month , you have :
[quote:3q380bjv]Application
===========
Path and name: C:\fwh_09\samples\testcal2.exe (32 bits)
Size: 1,840,128 bytes
Compiler version: xHarbour build 1.2.1 Intl. (SimpLex) (Rev. 9445)
FiveWin Version: FWHX 12.06
Windows version: 5.1, Build 2600 Service Pack 3
Time from start: 0 hours 0 mins 1 secs
Error occurred at: 05/12/2012, 10:58:06
Error description: Error BASE/1082 Argument error: -
Args:
[ 1] = U
[ 2] = N 52
[/quote:3q380bjv]
The problem is in lButtonUP Line 614
IF IsOverDay( ::hWnd, nRow, nCol ) .AND. Abs( ::nRowDbl - nRow ) <= HEIGHTDBLCLICK .AND. Abs( ::nColDbl - nCol ) <= WIDTHDBLCLICK
I solve with
IF HB_IsNumeric( ::nRowDbl) .AND. IsOverDay( ::hWnd, nRow, nCol ) .AND. Abs( ::nRowDbl - nRow ) <= HEIGHTDBLCLICK .AND. Abs( ::nColDbl - nCol ) <= WIDTHDBLCLICK
Regards Maurizio
<!-- w --><a class="postlink" href="http://www.nipeservice.com">www.nipeservice.com</a><!-- w -->
|
Bug in TCalenda
|
Maurizio,
Implemented this way, thanks!:
[code=fw:23fn3od3]<div class="fw" id="{CB}" style="font-family: monospace;"> <span style="color: #00C800;">IF</span> ValType<span style="color: #000000;">(</span> ::<span style="color: #000000;">nRowDbl</span> <span style="color: #000000;">)</span> == <span style="color: #ff0000;">"N"</span> .and. IsOverDay<span style="color: #000000;">(</span> ::<span style="color: #000000;">hWnd</span>, nRow, nCol <span style="color: #000000;">)</span> .AND. ;<br /> <span style="color: #0000ff;">Abs</span><span style="color: #000000;">(</span> ::<span style="color: #000000;">nRowDbl</span> - nRow <span style="color: #000000;">)</span> <= HEIGHTDBLCLICK .AND. <span style="color: #0000ff;">Abs</span><span style="color: #000000;">(</span> ::<span style="color: #000000;">nColDbl</span> - nCol <span style="color: #000000;">)</span> <= WIDTHDBLCLICK <br /> </div>[/code:23fn3od3]
|
Bug in TComboBox
|
Valid clause is evaluated on gotfocus instead of lostfocus in CBS_DROPDOWN combos:
[code:1ym20wzr]#include "Fivewin.ch"
FUNCTION MAIN()
LOCAL oDlg
LOCAL oCbx, cVar := SPACE( 20 )
DEFINE DIALOG oDlg
@ 1, 1 COMBOBOX oCbx VAR cVar;
ITEMS { "First", "Second", "Third" };
STYLE CBS_DROPDOWN;
VALID ( MSGINFO( "Valid" ), .T. )
@ 3, 1 BUTTON "&Close" ACTION oDlg:End()
ACTIVATE DIALOG oDlg;
CENTER
RETURN NIL[/code:1ym20wzr]
EMG
|
Bug in TComboBox
|
Enrico,
The problem is that when CBS_DROPDOWN style is used a Get is created as a child of the combobox, and when the combobox gets the focus, it gives it to the Get, thats why the bValid is fired.
We have tried to modify the code this way:
oCbx:oGet:bValid = { || MsgInfo(), .t. }
but the wrong behavior persists. We may need to review the Class combobox to see if we can improve it.
|
Bug in TComboBox
|
Thank you.
EMG
|
Bug in TComboBox
|
In the following sample, try to hit TAB on the keyboard giving the focus to the combobox. Why the VALID is evaluated on gotfocus?
[code=fw:15tfb81p]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"Fivewin.ch"</span><br /><br /><br /><span style="color: #00C800;">FUNCTION</span> MAIN<span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /><br /> <span style="color: #00C800;">LOCAL</span> oDlg<br /><br /> <span style="color: #00C800;">LOCAL</span> oCbx, cVar := SPACE<span style="color: #000000;">(</span> <span style="color: #000000;">20</span> <span style="color: #000000;">)</span><br /><br /> <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">DIALOG</span> oDlg<br /><br /> @ <span style="color: #000000;">1</span>, <span style="color: #000000;">1</span> <span style="color: #0000ff;">BUTTON</span> <span style="color: #ff0000;">"&Close"</span> <span style="color: #0000ff;">ACTION</span> oDlg:<span style="color: #000000;">End</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /><br /> @ <span style="color: #000000;">3</span>, <span style="color: #000000;">1</span> <span style="color: #0000ff;">COMBOBOX</span> oCbx <span style="color: #0000ff;">VAR</span> cVar;<br /> <span style="color: #0000ff;">ITEMS</span> <span style="color: #000000;">{</span> <span style="color: #ff0000;">"First"</span>, <span style="color: #ff0000;">"Second"</span>, <span style="color: #ff0000;">"Third"</span> <span style="color: #000000;">}</span>;<br /> <span style="color: #0000ff;">STYLE</span> CBS_DROPDOWN;<br /> <span style="color: #0000ff;">VALID</span> <span style="color: #000000;">(</span> <span style="color: #0000ff;">MSGINFO</span><span style="color: #000000;">(</span> <span style="color: #ff0000;">"Valid"</span> <span style="color: #000000;">)</span>, .T. <span style="color: #000000;">)</span><br /><br /> <span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">DIALOG</span> oDlg;<br /> <span style="color: #0000ff;">CENTER</span><br /><br /> <span style="color: #00C800;">RETURN</span> <span style="color: #00C800;">NIL</span></div>[/code:15tfb81p]
EMG
|
Bug in TControl
|
The ESC key is disabled in the following sample (but it is not the only one) in the March build:
[code:2flluljm]#include "Fivewin.ch"
FUNCTION MAIN()
LOCAL oDlg
LOCAL oGet, cVar := SPACE( 30 )
DEFINE DIALOG oDlg
@ 1, 1 GET oGet VAR cVar MEMO
@ 3, 1 BUTTON "&Close";
ACTION oDlg:End()
ACTIVATE DIALOG oDlg;
CENTER
RETURN NIL[/code:2flluljm]
It seems that the cause is a change in TControl:
[code:2flluljm]METHOD KeyDown( nKey, nFlags ) CLASS TControl
if nKey == VK_ESCAPE
::oWnd:KeyDown( nKey, nFlags )
return 0
endif[/code:2flluljm]
This is the previous working version:
[code:2flluljm]METHOD KeyDown( nKey, nFlags ) CLASS TControl
if nKey == VK_ESCAPE
::oWnd:KeyChar( nKey, nFlags )
return 0
endif[/code:2flluljm]
EMG
|
Bug in TControl
|
Enrico,
This fix looks as the right one in Class TMultiGet:
[code:3idp0qzr]
if nKey == VK_ESCAPE // Windows API already sends it to dialogs!!!
if ::oWnd:ChildLevel( TDialog() ) != 0 .and. ::oWnd:lModal
return Super:KeyChar( nKey, nFlags ) // nil
endif
...
[/code:3idp0qzr]
|
Bug in TControl
|
It's not enough:
[code:kpwa9b1z]#include "Fivewin.ch"
FUNCTION MAIN()
LOCAL oDlg, oBrw
DEFINE DIALOG oDlg
@ 1, 1 LISTBOX oBrw FIELDS SIZE 100, 30
oBrw:bKeyChar = { || Tone( 440, 1 ) }
@ 3, 1 BUTTON "&Close";
ACTION oDlg:End()
ACTIVATE DIALOG oDlg;
CENTER
RETURN NIL[/code:kpwa9b1z]
What was the reason why you changed bKeyChar to bKeyDown in TControl:KeyDown() method?
EMG
|
Bug in TControl
|
Enrico,
Because it had some wrong side effects
|
Bug in TControl
|
Enrico,
In dialog.prg copy Method KeyChar() to Method KeyDown() and it gets fixed.
Anyhow, we are curious to know why the ESC comes now by KeyDown() instead of KeyChar().
|
Bug in TControl
|
Please, can you show the exact fix?
EMG
|
Bug in TControl
|
Enrico,
[code:nvmehlgr]
METHOD KeyDown( nKey, nFlags ) CLASS TDialog
if nKey == VK_ESCAPE
if ::oWnd == nil
::End()
else
if ::oWnd:ChildLevel( TMdiChild() ) != 0
::End()
else
if ::oWnd:ChildLevel( TDialog() ) != 0
::End()
#ifdef __HARBOUR__
elseif Upper( ::oWnd:ClassName() ) == "TMDIFRAME" // To avoid ESC being ignored
::End()
#endif
else
return Super:KeyDown( nKey, nFlags )
endif
endif
endif
else
return Super:KeyDown( nKey, nFlags )
endif
return nil
[/code:nvmehlgr]
|
Bug in TControl
|
It seems to work, thank you. Do I have to leave KeyChar() method in place or do I have to remove it?
EMG
|
Bug in TControl
|
[quote="Antonio Linares":2sl7430y]Enrico,
This fix looks as the right one in Class TMultiGet:
[code:2sl7430y]
if nKey == VK_ESCAPE // Windows API already sends it to dialogs!!!
if ::oWnd:ChildLevel( TDialog() ) != 0 .and. ::oWnd:lModal
return Super:KeyChar( nKey, nFlags ) // nil
endif
...
[/code:2sl7430y][/quote:2sl7430y]
This is no more needed.
EMG
|
Bug in TControl
|
Enrico,
Thanks
|
Bug in TDatabase
|
These are the lines from 563-565 [method _delete()][code=fw:3fde51o5]<div class="fw" id="{CB}" style="font-family: monospace;"><br /> <span style="color: #00C800;">if</span> ::<span style="color: #000000;">IsRecLocked</span><span style="color: #000000;">(</span> ::<span style="color: #000000;">RecNo</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span> <span style="color: #000000;">)</span> .or. <span style="color: #000000;">(</span> lLocked := ::<span style="color: #000000;">RecLock</span><span style="color: #000000;">(</span> ::<span style="color: #000000;">RecNo</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span> <span style="color: #000000;">)</span> <span style="color: #000000;">)</span><br /> <span style="color: #000000;">(</span> ::<span style="color: #000000;">nArea</span> <span style="color: #000000;">)</span>-><span style="color: #000000;">(</span> DbDelete<span style="color: #000000;">(</span><span style="color: #000000;">)</span> <span style="color: #000000;">)</span><br /> lDeleted := .f.</div>[/code:3fde51o5]
Shouldn't [i:3fde51o5]lDeleted := .t.[/i:3fde51o5] instead of [i:3fde51o5].f.[/i:3fde51o5]?
And since the success of delete operation is already tracked using [i:3fde51o5]lDeleted[/i:3fde51o5], wouldn't it be better if [i:3fde51o5]method _delete()[/i:3fde51o5] returns [i:3fde51o5]lDeleted[/i:3fde51o5] instead of [i:3fde51o5]nil[/i:3fde51o5]?
TIA
|
Bug in TDatabase
|
[quote:airmgkpo]Shouldn't lDeleted := .t. instead of .f.?
[/quote:airmgkpo]
You are right. Thanks for pointing out.
Fixed and available from next release.
[quote:airmgkpo]And since the success of delete operation is already tracked using lDeleted, wouldn't it be better if method _delete() returns lDeleted instead of nil?
[/quote:airmgkpo]
At present the return value is compatible with the return value of DBDELETE() function in RDD.
But I agree its a better idea to return lDelete instead.
This also will be available from next release.
|
Bug in TDialog [Fixed]
|
Default value for lResizable parameter is missing:
[code=fw:3ogxu5u9]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #00C800;">METHOD</span> <span style="color: #00C800;">New</span><span style="color: #000000;">(</span> nTop, nLeft, nBottom, nRight, cCaption, cResName, hResources,;<br /> lVbx, nStyle, nClrText, nClrBack, oBrush, oWnd, lPixels,;<br /> oIco, oFont, nHelpId, nWidth, nHeight, lTransparent, aNewGradColors,;<br /> cVarName, lUnicode, lTruePixel, lResizable <span style="color: #000000;">)</span> <span style="color: #00C800;">CLASS</span> TDialog<br /><br /> <span style="color: #00C800;">DEFAULT</span> hResources := GetResources<span style="color: #000000;">(</span><span style="color: #000000;">)</span>, lVbx := .f.,;<br /> nClrText := GetSysColor<span style="color: #000000;">(</span> COLOR_BTNTEXT <span style="color: #000000;">)</span>, nClrBack := GetSysColor<span style="color: #000000;">(</span> COLOR_BTNFACE <span style="color: #000000;">)</span>,;<br /> lPixels := .f., nTop := <span style="color: #000000;">0</span>, nLeft := <span style="color: #000000;">0</span>, nBottom := <span style="color: #000000;">10</span>, nRight := <span style="color: #000000;">40</span>,;<br /> nWidth := <span style="color: #000000;">0</span>, nHeight := <span style="color: #000000;">0</span>, lTransparent := .f.,;<br /> nStyle := nOR<span style="color: #000000;">(</span> DS_MODALFRAME, WS_POPUP, WS_CAPTION, WS_SYSMENU, ;<br /> <span style="color: #00C800;">If</span><span style="color: #000000;">(</span> lResizable == .t., WS_MAXIMIZEBOX + WS_MINIMIZEBOX + WS_THICKFRAME, <span style="color: #000000;">0</span> <span style="color: #000000;">)</span> <span style="color: #000000;">)</span>,;</div>[/code:3ogxu5u9]
EMG
|
Bug in TDialog [Fixed]
|
It does not seem to cause any error, sorry.
EMG
|
Bug in TDialog [Fixed]
|
Anyway, the new clause RESIZEABLE is missing in dialog.ch.
EMG
|
Bug in TDialog [Fixed]
|
[quote="Enrico Maria Giordano":3taohz66]Anyway, the new clause RESIZEABLE is missing in dialog.ch.
EMG[/quote:3taohz66]
Any news?
EMG
|
Bug in TDialog [Fixed]
|
Fixed for next version
|
Bug in TDialog [Fixed]
|
Thank you! <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) -->
EMG
|
Bug in TDialog title [Solved]
|
Cristobal,
The third case works fine so the problem is not related to the length checking. As I already wrote, the problem is in cDlg2Chr() function. Once it is fixed, we can probably remove the length checking.
EMG
|
Bug in TDialog title [Solved]
|
Enrico
If I had understood what you have written
My proposal is a temporary solution
I've already tried
|
Bug in TDialog title [Solved]
|
Cristobal,
We need of a real solution.
EMG
|
Bug in TDialog title [Solved]
|
Found! It seems that the correct solution is:
WORD wSize = sizeof( DIALOG_RES ) + ( hb_parclen( 6 ) * 2 ) +
1 + 2 + ( hb_parclen( 9 ) * 2 ) + 3 + 1;
Please note the + 1 at the end of the line. With it I can use a title of 10000 characters without problems! <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) -->
EMG
|
Bug in TDialog title [Solved]
|
The following sample demonstrates the problem. It doesn't show the dialog (tested under Win 8.1). It works correctly with a title up to 114 characters. In dialog.prg there is a check for maximum size of 140 characters. It should be lower to 114.
[code=fw:1s84m7hi]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"Fivewin.ch"</span><br /><br /><br /><span style="color: #00C800;">FUNCTION</span> MAIN<span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /><br /> <span style="color: #00C800;">LOCAL</span> oDlg<br /><br /> <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">DIALOG</span> oDlg;<br /> <span style="color: #0000ff;">TITLE</span> REPLICATE<span style="color: #000000;">(</span> <span style="color: #ff0000;">"X"</span>, <span style="color: #000000;">115</span> <span style="color: #000000;">)</span><br /><br /> <span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">DIALOG</span> oDlg;<br /> <span style="color: #0000ff;">CENTER</span><br /><br /> <span style="color: #00C800;">RETURN</span> <span style="color: #00C800;">NIL</span></div>[/code:1s84m7hi]
EMG
|
Bug in TDialog title [Solved]
|
I forgot to mention that with the latest FWH (14.02) the problem seems to be vanished. <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) -->
EMG
|
Bug in TDialog title [Solved]
|
[quote:m4rsxoxq]
The following sample demonstrates the problem. It doesn't show the dialog (tested under Win 8.1). It works correctly with a title up to 114 characters. In dialog.prg there is a check for maximum size of 140 characters. It should be lower to 114.
[/quote:m4rsxoxq]
Enrico
I use Windows 8.1 and Fwh 13.12
The version that appears Fivewin image is incorrect
Image suit.
[url=https://imageshack.com/i/5ihhzxp:m4rsxoxq][img:m4rsxoxq]http://imagizer.imageshack.us/v2/xq90/198/hhzx.png[/img:m4rsxoxq][/url:m4rsxoxq]
|
Bug in TDialog title [Solved]
|
Cristobal,
are you using Win 8.1 64 bit? If yes, can you send me your EXE to test it here?
EMG
|
Bug in TDialog title [Solved]
|
Enrico
I've sent you an email
|
Bug in TDialog title [Solved]
|
Cristobal,
received and already answered! <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) -->
EMG
|
Bug in TDialog title [Solved]
|
[quote="Enrico Maria Giordano":zdwlg65n]Cristobal,
received and already answered! <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) -->
EMG[/quote:zdwlg65n]
I answered
|
Bug in TDialog title [Solved]
|
Some other clues. The following sample does work fine:
[code=fw:17vjkax8]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"Fivewin.ch"</span><br /><br /><br /><span style="color: #00C800;">FUNCTION</span> MAIN<span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /><br /> <span style="color: #00C800;">LOCAL</span> oDlg<br /><br /> <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">DIALOG</span> oDlg;<br /><span style="color: #B900B9;">// TITLE REPLICATE( "X", 115 )</span><br /><br /><span style="color: #B900B9;">// oDlg:cCaption = REPLICATE( "X", 115 )</span><br /><br /> <span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">DIALOG</span> oDlg;<br /> <span style="color: #0000ff;">ON</span> <span style="color: #0000ff;">INIT</span> oDlg:<span style="color: #000000;">SetText</span><span style="color: #000000;">(</span> REPLICATE<span style="color: #000000;">(</span> <span style="color: #ff0000;">"X"</span>, <span style="color: #000000;">500</span> <span style="color: #000000;">)</span> <span style="color: #000000;">)</span>;<br /> <span style="color: #0000ff;">CENTER</span><br /><br /> <span style="color: #00C800;">RETURN</span> <span style="color: #00C800;">NIL</span></div>[/code:17vjkax8]
It doesn't if you comment out ON INIT clause and uncomment one of the two commented lines. Please note that there is a check for a maximum of 140 characters in TDialog cCaption (that does not trim my 500 characters string) which seems unuseful now.
Any ideas?
EMG
|
Bug in TDialog title [Solved]
|
I traced the problem. It seems to be inside cDlg2Chr() function, probably in the calculation of wSize. But I guess we have to wait for Antonio to fix this.
EMG
|
Bug in TDialog title [Solved]
|
Enrico
It is true
Fw cCaption Controls the length of the dialogue in the first case
[code=fw:wjeh3zay]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">DIALOG</span> oDlg <span style="color: #0000ff;">TITLE</span> REPLICATE<span style="color: #000000;">(</span> <span style="color: #ff0000;">"X"</span>, <span style="color: #000000;">415</span> <span style="color: #000000;">)</span><br /> </div>[/code:wjeh3zay]
In this second case, the length is not controlled
[code=fw:wjeh3zay]<div class="fw" id="{CB}" style="font-family: monospace;"><br /> <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">DIALOG</span> oDlg <span style="color: #B900B9;">//TITLE REPLICATE( "X", 415 )</span><br /> oDlg:<span style="color: #000000;">cCaption</span> = REPLICATE<span style="color: #000000;">(</span> <span style="color: #ff0000;">"X"</span>, <span style="color: #000000;">415</span> <span style="color: #000000;">)</span><br /><br /> </div>[/code:wjeh3zay]
In this third case, the length is not controlled
[code=fw:wjeh3zay]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"Fivewin.ch"</span><br /><br /><br /><span style="color: #00C800;">FUNCTION</span> MAIN<span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /><br /> <span style="color: #00C800;">LOCAL</span> oDlg<br /><br /> <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">DIALOG</span> oDlg <span style="color: #B900B9;">//TITLE REPLICATE( "X", 415 )</span><br /><br /> <span style="color: #B900B9;">//oDlg:cCaption = REPLICATE( "X", 415 )</span><br /><br /> <span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">DIALOG</span> oDlg; <br /> <span style="color: #0000ff;">ON</span> <span style="color: #0000ff;">INIT</span> oDlg:<span style="color: #000000;">SetText</span><span style="color: #000000;">(</span> REPLICATE<span style="color: #000000;">(</span> <span style="color: #ff0000;">"X"</span>, <span style="color: #000000;">500</span> <span style="color: #000000;">)</span> <span style="color: #000000;">)</span>;<br /> <span style="color: #0000ff;">VALID</span> <span style="color: #000000;">(</span><span style="color: #0000ff;">Msginfo</span><span style="color: #000000;">(</span> Len<span style="color: #000000;">(</span> oDlg:<span style="color: #000000;">cCaption</span> <span style="color: #000000;">)</span> <span style="color: #000000;">)</span>, .T. <span style="color: #000000;">)</span>;<br /> <span style="color: #0000ff;">CENTER</span><br /><br /> <span style="color: #00C800;">RETURN</span> <span style="color: #00C800;">NIL</span><br /> </div>[/code:wjeh3zay]
One possible solution would be to add at the end of the Initiate method of TDialog: (no activate method)
[code=fw:wjeh3zay]<div class="fw" id="{CB}" style="font-family: monospace;"><br /> <span style="color: #00C800;">if</span> ::<span style="color: #000000;">bInit</span> != <span style="color: #00C800;">nil</span><br /> lResult = Eval<span style="color: #000000;">(</span> ::<span style="color: #000000;">bInit</span>, <span style="color: #00C800;">Self</span> <span style="color: #000000;">)</span><br /> <span style="color: #00C800;">if</span> ValType<span style="color: #000000;">(</span> lResult <span style="color: #000000;">)</span> == <span style="color: #ff0000;">"L"</span> .and. ! lResult<br /> lFocus = .f.<br /> <span style="color: #00C800;">endif</span><br /> <span style="color: #00C800;">endif</span><br /><br /><span style="color: #B900B9;">// Add</span><br /> <span style="color: #00C800;">if</span> len<span style="color: #000000;">(</span> ::<span style="color: #000000;">cCaption</span> <span style="color: #000000;">)</span> > <span style="color: #000000;">140</span><br /> ::<span style="color: #000000;">cCaption</span> := <span style="color: #0000ff;">Left</span><span style="color: #000000;">(</span> ::<span style="color: #000000;">cCaption</span> , <span style="color: #000000;">140</span> <span style="color: #000000;">)</span><br /> ::<span style="color: #000000;">SetText</span><span style="color: #000000;">(</span> ::<span style="color: #000000;">cCaption</span> <span style="color: #000000;">)</span><br /> <span style="color: #00C800;">endif</span><br /> </div>[/code:wjeh3zay]
It's an idea and I have not tried yet
Tried
|
Bug in TDialog title [Solved]
|
Enrico
Great, fine
|
Bug in TDialog title [Solved]
|
[quote="Enrico Maria Giordano":3ox2a81h]Found! It seems that the correct solution is:
WORD wSize = sizeof( DIALOG_RES ) + ( hb_parclen( 6 ) * 2 ) +
1 + 2 + ( hb_parclen( 9 ) * 2 ) + 3 + 1;
Please note the + 1 at the end of the line. With it I can use a title of 10000 characters without problems! <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) -->
EMG[/quote:3ox2a81h]
No! Unfortunately this is not the right fix, sorry. <!-- s:-( --><img src="{SMILIES_PATH}/icon_sad.gif" alt=":-(" title="Sad" /><!-- s:-( -->
Ok, I will wait for Antonio... <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) -->
EMG
|
Bug in TDialog title [Solved]
|
Enrico
Creo que no he entendido bien tu problema:
A.- Quieres un caption con mas de 140 caracteres
B.- Controlar que el caption no tengas mas de 140 caracteres
Yo habia entendido la opcion B
Tengo un gran problema con el idioma ingles
Enrico
I think I misunderstood your problem:
A. - You want a caption with more than 140 characters
B. - Check that the caption does not have more than 140 characters
I had understood the option B
I have a big problem with the English language
|
Bug in TDialog title [Solved]
|
Cristobal,
[quote="cnavarro":fhu7cr6f]Enrico
I think I misunderstood your problem:
A. - You want a caption with more than 140 characters
B. - Check that the caption does not have more than 140 characters[/quote:fhu7cr6f]
No, the problem is that there is no such limit in the size of a dialog title (Windows API docs don't mention any limits). The current limit is only the result of a bug in cDlg2Chr() function. At least this is what I understood.
Is it more clear now? <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) -->
EMG
|
Bug in TDialog title [Solved]
|
Si, ahora me ha quedado muy muy claro
Gracias
Yes, it has now become very clear to me
thanks
|
Bug in TDialog title [Solved]
|
Enrico
try with
wLen += ( iLenUnicode * 2 ) [color=#FF0000:3hmxuuor]+ 1[/color:3hmxuuor];
|
Bug in TDialog title [Solved]
|
Daniel,
[quote="Daniel Garcia-Gil":38c7zzxy]Enrico
try with
wLen += ( iLenUnicode * 2 ) [color=#FF0000:38c7zzxy]+ 1[/color:38c7zzxy];[/quote:38c7zzxy]
I now get:
hb_xrealloc can't reallocate memory
<!-- s:-( --><img src="{SMILIES_PATH}/icon_sad.gif" alt=":-(" title="Sad" /><!-- s:-( -->
EMG
|
Bug in TDialog title [Solved]
|
what C compiler are you using?
|
Bug in TDialog title [Solved]
|
Daniel,
[quote="Daniel Garcia-Gil":owmyweyo]what C compiler are you using?[/quote:owmyweyo]
BCC582
EMG
|
Bug in TDialog title [Solved]
|
Daniel,
[quote="Daniel Garcia-Gil":1oj88t60]Enrico
try with
wLen += ( iLenUnicode * 2 ) [color=#FF0000:1oj88t60]+ 1[/color:1oj88t60];[/quote:1oj88t60]
With
[code=fw:1oj88t60]<div class="fw" id="{CB}" style="font-family: monospace;">wLen += iLenUnicode;</div>[/code:1oj88t60]
it seems to work fine. What is your opinion about this possible fix?
EMG
|
Bug in TDialog title [Solved]
|
[quote="Enrico Maria Giordano":1g35qqpw]CODE: SELECT ALL EXPAND VIEW
wLen += iLenUnicode;
it seems to work fine. What is your opinion about this possible fix?[/quote:1g35qqpw]
if work is fine <!-- s;-) --><img src="{SMILIES_PATH}/icon_wink.gif" alt=";-)" title="Wink" /><!-- s;-) -->
|
Bug in TDialog title [Solved]
|
Daniel,
[quote="Daniel Garcia-Gil":2ymk4tm2][quote="Enrico Maria Giordano":2ymk4tm2]CODE: SELECT ALL EXPAND VIEW
wLen += iLenUnicode;
it seems to work fine. What is your opinion about this possible fix?[/quote:2ymk4tm2]
if work is fine <!-- s;-) --><img src="{SMILIES_PATH}/icon_wink.gif" alt=";-)" title="Wink" /><!-- s;-) -->[/quote:2ymk4tm2]
The problem is that I don't understand the code of cDlg2Chr() function very well so I found that "fix" with trial and error. <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) -->
EMG
|
Bug in TDialog title [Solved]
|
Enrico
we are filling a [url=http://msdn.microsoft.com/en-us/library/windows/desktop/ms645394(v=vs.85).aspx:2gwjg5vo]DLGTEMPLATE structure[/url:2gwjg5vo], is used like argument in the function [url=http://msdn.microsoft.com/en-us/library/windows/desktop/ms645436(v=vs.85).aspx:2gwjg5vo]CreateDialogIndirect[/url:2gwjg5vo]...
check [url=http://msdn.microsoft.com/en-us/library/windows/desktop/ms645394(v=vs.85).aspx:2gwjg5vo]DLGTEMPLATE structure[/url:2gwjg5vo] remark section
[quote:2gwjg5vo]
In a standard template for a dialog box, the DLGTEMPLATE structure is always immediately followed by three variable-length arrays that specify the menu, class, and title for the dialog box. When the DS_SETFONT style is specified, these arrays are also followed by a 16-bit value specifying point size and another variable-length array specifying a typeface name. Each array consists of one or more 16-bit elements. The menu, class, title, and font arrays must be aligned on WORD boundaries.
...
Following the class array is a title array that specifies a null-terminated Unicode string that contains the title of the dialog box. If the first element of this array is 0x0000, the dialog box has no title and the array has no other elements.
...
[/quote:2gwjg5vo]
|
Bug in TDialog title [Solved]
|
Daniel,
So what? Are you trying to say that my "fix" can be correct? <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) -->
EMG
|
Bug in TDialog title [Solved]
|
[quote="Enrico Maria Giordano":27s1zbpp]Daniel,
So what? Are you trying to say that my "fix" can be correct? <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) -->
EMG[/quote:27s1zbpp]
no i'm trying explain you...
[quote="Enrico Maria Giordano":27s1zbpp]The problem is that I don't understand the code of cDlg2Chr() function very well so I found that "fix" with trial and error. [/quote:27s1zbpp]
|
Bug in TDialog title [Solved]
|
Daniel,
[quote="Daniel Garcia-Gil":11wqmqwv]no i'm trying explain you...[/quote:11wqmqwv]
Ok. <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) -->
At the moment, I'm convinced that iLenUnicode doesn't have to double (*2) but I would hear your opinion.
EMG
|
Bug in TDialog title [Solved]
|
I'm testing my fix and found no problem so far. The fix is:
replace
[code=fw:1u30eumu]<div class="fw" id="{CB}" style="font-family: monospace;">wLen += <span style="color: #000000;">(</span> iLenUnicode * <span style="color: #000000;">2</span> <span style="color: #000000;">)</span>;</div>[/code:1u30eumu]
with
[code=fw:1u30eumu]<div class="fw" id="{CB}" style="font-family: monospace;">wLen += iLenUnicode;</div>[/code:1u30eumu]
in dlg2chr.c.
EMG
|
Bug in TDialog title [Solved]
|
I spoke too fast! It doesn't work with dialogs without title. <!-- s:-( --><img src="{SMILIES_PATH}/icon_sad.gif" alt=":-(" title="Sad" /><!-- s:-( -->
Sorry, I give up for the moment.
Any ideas?
EMG
|
Bug in TDialog title [Solved]
|
Up! <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) -->
EMG
|
Bug in TDialog title [Solved]
|
Antonio,
why are you still imposing the limit of 140 characters in dialog title?
[code=fw:2n7teb1b]<div class="fw" id="{CB}" style="font-family: monospace;">::<span style="color: #000000;">cCaption</span> = <span style="color: #00C800;">If</span><span style="color: #000000;">(</span> cCaption != <span style="color: #00C800;">nil</span>, <span style="color: #0000ff;">SubStr</span><span style="color: #000000;">(</span> cCaption, <span style="color: #000000;">1</span>, <span style="color: #0000ff;">Min</span><span style="color: #000000;">(</span> Len<span style="color: #000000;">(</span> cCaption <span style="color: #000000;">)</span>, <span style="color: #000000;">140</span> <span style="color: #000000;">)</span> <span style="color: #000000;">)</span>, <span style="color: #00C800;">nil</span> <span style="color: #000000;">)</span></div>[/code:2n7teb1b]
I think it's not needed anymore. Can you confirm?
EMG
|
Bug in TDialog title [Solved]
|
Enrico,
Have you tried to remove it and check if it works fine ? If so, yes, we can remove it <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) -->
|
Bug in TDialog title [Solved]
|
Antonio,
yes, I'm currently using a version of dialog.prg without it and found no problem. But it should be better if you tested it in all the Windows flavors. <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) -->
EMG
|
Bug in TFolderEx
|
Hello!
In METHOD Redefine of CLASS TFolderEx this is missing:
[code=fw:ji1r2cjn]<div class="fw" id="{CB}" style="font-family: monospace;">::<span style="color: #000000;">lTransparent</span> := lTransparent</div>[/code:ji1r2cjn]
|
Bug in TFolderEx
|
Hello,
I couldn't detect any Problems.
You can Download my new Tools for testing.
[b:3k6ft9x4]The different Folder-Settings[/b:3k6ft9x4]
[img:3k6ft9x4]http://www.pflegeplus.com/pictures/Backg4.jpg[/img:3k6ft9x4]
Best Regards
Uwe <!-- s:lol: --><img src="{SMILIES_PATH}/icon_lol.gif" alt=":lol:" title="Laughing" /><!-- s:lol: -->
|
Bug in TFolderEx
|
Hi Uwe!
[quote="ukoenig":2qkw67y7]
I couldn't detect any Problems.
[/quote:2qkw67y7]
Did you try to make FolderEx from resource file with REDEFINE?
[code=fw:2qkw67y7]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #00C800;">FUNCTION</span> MAIN<span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /><br /> <span style="color: #00C800;">local</span> oDlg, oFld1<br /><br /> <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">DIALOG</span> oDlg <span style="color: #0000ff;">RESOURCE</span> <span style="color: #ff0000;">"DIALOG0"</span><br /><br /> <span style="color: #0000ff;">REDEFINE</span> FOLDEREX oFld1 <span style="color: #0000ff;">ID</span> <span style="color: #000000;">110</span> <span style="color: #0000ff;">OF</span> oDlg ;<br /> <span style="color: #0000ff;">PROMPT</span> <span style="color: #ff0000;">"&Clipper"</span>, <span style="color: #ff0000;">"&and"</span>, <span style="color: #ff0000;">"&Windows"</span>, <span style="color: #ff0000;">"&Magic"</span> ;<br /> <span style="color: #0000ff;">DIALOGS</span> <span style="color: #ff0000;">"Sub1"</span>, <span style="color: #ff0000;">"Sub2"</span><br /><br /> <span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">DIALOG</span> oDlg <span style="color: #0000ff;">CENTERED</span><br /><br /><span style="color: #00C800;">return</span><span style="color: #000000;">(</span><span style="color: #000000;">0</span><span style="color: #000000;">)</span><br /> </div>[/code:2qkw67y7]
with rc-file:
[code=fw:2qkw67y7]<div class="fw" id="{CB}" style="font-family: monospace;">DIALOG0 DIALOGEX <span style="color: #000000;">44</span>, <span style="color: #000000;">23</span>, <span style="color: #000000;">220</span>, <span style="color: #000000;">110</span><br /><span style="color: #0000ff;">STYLE</span> 0x4L | DS_MODALFRAME| WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU<br />CAPTION <span style="color: #ff0000;">""</span><br /><span style="color: #0000ff;">FONT</span> <span style="color: #000000;">8</span>, <span style="color: #ff0000;">"MS Sans Serif"</span><br /><span style="color: #000000;">{</span><br /> CONTROL <span style="color: #ff0000;">""</span>, <span style="color: #000000;">110</span>, <span style="color: #ff0000;">"SysTabControl32"</span>, <span style="color: #000000;">0</span> | WS_CHILD | WS_VISIBLE | WS_TABSTOP, <span style="color: #000000;">4</span>, <span style="color: #000000;">5</span>, <span style="color: #000000;">213</span>, <span style="color: #000000;">93</span><br /><span style="color: #000000;">}</span><br /><br />sub1 DIALOGEX <span style="color: #000000;">18</span>, <span style="color: #000000;">18</span>, <span style="color: #000000;">142</span>, <span style="color: #000000;">67</span><br /><span style="color: #0000ff;">STYLE</span> 0x4L | WS_CHILD | WS_VISIBLE<br /><span style="color: #0000ff;">FONT</span> <span style="color: #000000;">8</span>, <span style="color: #ff0000;">"MS Sans Serif"</span><br /><span style="color: #000000;">{</span><br /> CONTROL <span style="color: #ff0000;">"Text"</span>, <span style="color: #000000;">101</span>, <span style="color: #ff0000;">"BUTTON"</span>, BS_AUTORADIOBUTTON | WS_CHILD | WS_VISIBLE | WS_GROUP | WS_TABSTOP, <span style="color: #000000;">37</span>, <span style="color: #000000;">30</span>, <span style="color: #000000;">28</span>, <span style="color: #000000;">12</span><br /><span style="color: #000000;">}</span><br /><br />sub2 DIALOGEX <span style="color: #000000;">18</span>, <span style="color: #000000;">18</span>, <span style="color: #000000;">142</span>, <span style="color: #000000;">67</span><br /><span style="color: #0000ff;">STYLE</span> 0x4L | WS_CHILD | WS_VISIBLE<br /><span style="color: #0000ff;">FONT</span> <span style="color: #000000;">8</span>, <span style="color: #ff0000;">"MS Sans Serif"</span><br /><span style="color: #000000;">{</span><br /> CONTROL <span style="color: #ff0000;">"Text"</span>, <span style="color: #000000;">102</span>, <span style="color: #ff0000;">"BUTTON"</span>, BS_AUTORADIOBUTTON | WS_CHILD | WS_VISIBLE | WS_GROUP | WS_TABSTOP, <span style="color: #000000;">37</span>, <span style="color: #000000;">30</span>, <span style="color: #000000;">28</span>, <span style="color: #000000;">12</span><br /><span style="color: #000000;">}</span></div>[/code:2qkw67y7]
|
Bug in TFolderEx
|
Yes, the Screenshot shows Folders from resource.
[color=#0000FF:13ie8wlj]REDEFINE FOLDEREX oFld OF oWndFld ID 110 ;
PROMPT "T&est","&Tabs", "&Bmp", "Br&ush" ;
ON PAINT TAB PaintTab( Self, nOption ) ;
BITMAPS c_Path + "\bitmaps\" + cTabBmp, ;
c_Path + "\bitmaps\" + cTabBmp, ;
c_Path + "\bitmaps\" + cTabBmp, ;
c_Path + "\bitmaps\" + cTabBmp ;
DIALOGS "Sub1", "Sub2", "Sub3", "Sub4" ;
ROUND 5 ;
ON CHANGE ( nTabPos := oFld:nOption )
oFld:lTransparent := .T.
oFld:nFolderHeight := nTabH
oFld:nSeparator := nTabS
oFld:bClrText := {| o, n | nTColor3 }
oFld:oFont := oTextFont
REDEFINE SAY oSay3 ID 110 PROMPT cTEXTFONT1 OF oFld:aDialogs[1] FONT oTextFont PIXEL
oSay3:SetColor( nTColor2, )
oSay3:lTransparent := .T.
REDEFINE RADIO oRadio3 VAR nRadio3 OF oFld:aDialogs[1] ID 120, 121 ;
ON CHANGE MsgBeep() ;
COLOR nTColor2
oRadio3:SetFont( oTextFont )
AEval( oRadio3:aItems, { | oRad | oRad:lTransparent := .T. } )
REDEFINE CHECKBOX oCheck3 VAR lCheck3 ID 130 OF oFld:aDialogs[1] ;
ON CHANGE oCheck3:SetText( "New Text" )
oCheck3:lTransparent := .T.
oCheck3:SetFont( oTextFont )
oCheck3:SetColor( nTColor2 )[/color:13ie8wlj]
[b:13ie8wlj]I think, Your problem comes from here :[/b:13ie8wlj]
ACTIVATE DIALOG oWndFld NOWAIT ;
ON INIT ( oWndFld:Move( 50, 580, NIL, NIL, .T. ), ;
IIF( nOption2 = 2, GRADBRU2(), NIL ), ; // Dialog-Gradient
oFld:SetOption( nTabpos ) ) ;
[color=#FF0000:13ie8wlj]ON PAINT F_BACKGRD(oFld)[/color:13ie8wlj]
RETURN NIL
[code=fw:13ie8wlj]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><span style="color: #B900B9;">// --- Folder - Backgrounds ( Color, Gradient, Brush and Image ) ---</span><br /><br /><span style="color: #B900B9;">// FOLDER-vars in use :</span><br /><span style="color: #B900B9;">// -------------------------</span><br /><span style="color: #B900B9;">//nOption3 := 3 // FOLDER-Background : Color, Gradient, Brush or Image</span><br /><span style="color: #B900B9;">//nMove3 := 0.50 // Gradient Position 2. Color</span><br /><span style="color: #B900B9;">//nColor3a := 14853684 // 1. Color</span><br /><span style="color: #B900B9;">//nColor3b := 16312263 // 2. Color Gradient</span><br /><span style="color: #B900B9;">//aColors3 := { { nMove3, nColor3a, nColor3b }, { nMove3, nColor3b, nColor3a } }</span><br /><span style="color: #B900B9;">//lDirect3 := .T. // Vertical or Horizontal</span><br /><span style="color: #B900B9;">//cBrush3 := "Marble.bmp" // Brush</span><br /><span style="color: #B900B9;">//cImage3 := "Back1.jpg" // Image</span><br /><br /><span style="color: #00C800;">FUNCTION</span> F_BACKGRD<span style="color: #000000;">(</span>oFld<span style="color: #000000;">)</span> <br /><span style="color: #00C800;">LOCAL</span> n, oDlg, oBrush2, hDC1<br /><span style="color: #00C800;">LOCAL</span> aColors := <span style="color: #000000;">{</span> <span style="color: #000000;">{</span> nMOVE3, nCOLOR3a, nCOLOR3b <span style="color: #000000;">}</span>, ;<br /> <span style="color: #000000;">{</span> nMOVE3, nCOLOR3b, nCOLOR3a <span style="color: #000000;">}</span> <span style="color: #000000;">}</span><br /><span style="color: #00C800;">LOCAL</span> aRect := GetClientRect<span style="color: #000000;">(</span> oFld:<span style="color: #000000;">hWnd</span> <span style="color: #000000;">)</span><br /><br /><span style="color: #00C800;">FOR</span> n := <span style="color: #000000;">1</span> <span style="color: #0000ff;">to</span> Len<span style="color: #000000;">(</span> oFld:<span style="color: #000000;">aDialogs</span> <span style="color: #000000;">)</span> <br /> oDlg := oFld:<span style="color: #000000;">aDialogs</span><span style="color: #000000;">[</span> n <span style="color: #000000;">]</span><br /> hDC1 = CreateCompatibleDC<span style="color: #000000;">(</span> oDlg:<span style="color: #000000;">GetDC</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span> <span style="color: #000000;">)</span><br /> hBmp = CreateCompatibleBitMap<span style="color: #000000;">(</span> oDlg:<span style="color: #000000;">hDC</span>, oDlg:<span style="color: #000000;">nWidth</span>, oDlg:<span style="color: #000000;">nHeight</span> <span style="color: #000000;">)</span><br /> hBmpOld = SelectObject<span style="color: #000000;">(</span> hDC1, hBmp <span style="color: #000000;">)</span><br /> <span style="color: #00C800;">IF</span> nOption3 = <span style="color: #000000;">1</span> <span style="color: #B900B9;">// Color</span><br /> <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">BRUSH</span> oBrush2 <span style="color: #0000ff;">COLOR</span> nColor3a<br /> FillRect<span style="color: #000000;">(</span> hDC1, aRect, oBrush2:<span style="color: #000000;">hBrush</span> <span style="color: #000000;">)</span><br /> <span style="color: #00C800;">ENDIF</span> <br /> <span style="color: #00C800;">IF</span> nOption3 = <span style="color: #000000;">2</span> <span style="color: #B900B9;">// Gradient</span><br /> GradientFill<span style="color: #000000;">(</span> hDC1, <span style="color: #000000;">0</span>, <span style="color: #000000;">0</span>, oDlg:<span style="color: #000000;">nHeight</span>, oDlg:<span style="color: #000000;">nWidth</span>, aColors, lDirect <span style="color: #000000;">)</span><br /> <span style="color: #00C800;">ENDIF</span><br /> <span style="color: #00C800;">IF</span> nOption3 = <span style="color: #000000;">3</span> <span style="color: #B900B9;">// Brush</span><br /> <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">BRUSH</span> oBrush2 FILENAME c_Path + <span style="color: #ff0000;">"<span style="color: #000000;">\b</span>itmaps<span style="color: #000000;">\"</span> + cBrush3<br /> FillRect( hDC1, aRect, oBrush2:hBrush )<br /> ENDIF<br /> IF nOption3 = 4 // Image<br /> DEFINE IMAGE oTmp FILENAME c_Path + "</span>\<span style="color: #0000ff;">bitmaps</span>\<span style="color: #ff0000;">" + cImage3<br /> oBrush2 := TBrush():new( ,,,, ResizeBmp( oTmp:hBitmap, oDlg:nWidth, oDlg:nHeight, .T. ) ) <br /> oTmp:End()<br /> FillRect( hDC1, aRect, oBrush2:hBrush )<br /> ENDIF<br /> DeleteObject( oDlg:oBrush:hBrush )<br /> oDlg:oBrush:hBitmap = hBmp<br /> oDlg:oBrush:hBrush = CreatePatternBrush( hBmp ) <br /> SelectObject( hDC1, hBmpOld )<br /> oDlg:ReleaseDC()<br />NEXT<br /><br />RETURN( NIL )<br /></span></div>[/code:13ie8wlj]
Best regards
Uwe <!-- s:lol: --><img src="{SMILIES_PATH}/icon_lol.gif" alt=":lol:" title="Laughing" /><!-- s:lol: -->
|
Bug in TFolderEx
|
Hi Uwe,
And what happens if you don't have this line?
[quote="ukoenig":1y5w0rza]
oFld:lTransparent := .T.
[/quote:1y5w0rza]
Did you tried my sample code?
IMO the sample code should work without insert oFld:lTransparent := .T./.F. in it.
|
Bug in TFolderEx
|
[quote="ukoenig":3n1mak6j]
[b:3n1mak6j]I think, Your problem comes from here :[/b:3n1mak6j]
ACTIVATE DIALOG oWndFld NOWAIT ;
ON INIT ( oWndFld:Move( 50, 580, NIL, NIL, .T. ), ;
IIF( nOption2 = 2, GRADBRU2(), NIL ), ; // Dialog-Gradient
oFld:SetOption( nTabpos ) ) ;
[color=#FF0000:3n1mak6j]ON PAINT F_BACKGRD(oFld)[/color:3n1mak6j]
RETURN NIL
[/quote:3n1mak6j]
I didn't use this code, only the sample code I showed above. I informed about a problem (and also the solution!) with a reduced sample code. I can't understand why you show me a more complex code.
|
Bug in TFolderEx
|
Ruediger,
Many Tests I found, are not tested to the End with all possible Combinations.
In all of my Tools, I have to cover nearly everything, what can be done.
Sometimes, it makes it very complicated and many Tests are needed.
That is the Reason, that my Solutions are maybe looking a bit different.
Best regards
Uwe <!-- s:lol: --><img src="{SMILIES_PATH}/icon_lol.gif" alt=":lol:" title="Laughing" /><!-- s:lol: -->
|
Bug in TFolderEx
|
Hi Uwe!
[quote="ukoenig":4hxz0z0p]
That is the Reason, that my Solutions are maybe looking a bit different.
[/quote:4hxz0z0p]
I understand. But if there is a bug in FWH source code obviously (missing line "::lTransparent := lTransparent" in METHOD Redefine of CLASS TFolderEx) this should IMO be fixed in FWH source code and not in the code of FWH user by inserting always/everyway "oFld:lTransparent := .T." or "oFld:lTransparent := .F.".
|
Bug in TFolderEx
|
Ruediger,
What version of FWH are you using?
I have the TFolderx.prg file dated 8/31/2010 and there is no passed parameter lTransparent to either the New() nor the Redefine() method.
Regards,
James
|
Bug in TFolderEx
|
Hi James,
[quote="James Bott":osoih41e]
What version of FWH are you using?
[/quote:osoih41e]
FWH 10.10, the TFoldex.prg file is dated 10/27/2010:
[code=fw:osoih41e]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #00C800;">METHOD</span> <span style="color: #0000ff;">Redefine</span><span style="color: #000000;">(</span> nID, oWnd, aDialogs, aBitmaps, aPrompts, nFolderHeight, ;<br /> aHelps, nRound, bAction, bClrTabs, bClrText, aAlign, ;<br /> lAdjust, nSeparator, nOption, bPopUp, lStretch, cLayout, bBmpAction,;<br /> nBright, lAnimate, nSpeed, oFont, lTransparent <span style="color: #000000;">)</span> <span style="color: #00C800;">CLASS</span> TFolderEx <span style="color: #B900B9;">//-->> byte-one 2010</span></div>[/code:osoih41e]
|
Bug in TFolderEx
|
Ruediger,
SURPRISE !!!
with my Functions, it works also without [color=#FF0000:lbj3i3f3]oFld:lTransparent := .T.[/color:lbj3i3f3]
( I didn't test it before ) :
REDEFINE FOLDEREX oFld OF oWndFld ID 110 ;
PROMPT "T&est","&Tabs", "&Bmp", "Br&ush" ;
ON PAINT TAB PaintTab( Self, nOption ) ;
BITMAPS c_Path + "\bitmaps\" + cTabBmp, ;
c_Path + "\bitmaps\" + cTabBmp, ;
c_Path + "\bitmaps\" + cTabBmp, ;
c_Path + "\bitmaps\" + cTabBmp ;
DIALOGS "Sub1", "Sub2", "Sub3", "Sub4" ;
ROUND 5 ;
ON CHANGE ( nTabPos := oFld:nOption )
[color=#FF0000:lbj3i3f3]// oFld:lTransparent := .T.[/color:lbj3i3f3]
oFld:nFolderHeight := nTabH
oFld:nSeparator := nTabS
oFld:bClrText := {| o, n | nTColor3 }
oFld:oFont := oTextFont
Best Regards
Uwe <!-- s:lol: --><img src="{SMILIES_PATH}/icon_lol.gif" alt=":lol:" title="Laughing" /><!-- s:lol: -->
|
Bug in TFolderEx
|
Uwe,
Regardless if your sample code works or not, there seems to be a missing default setting in the class which should be fixed. I agree with Ruediger.
Regards,
James
|
Bug in TFolderEx
|
Hi James,
[quote="James Bott":2ip0h7si]a missing default setting in the class which should be fixed.
[/quote:2ip0h7si]
With FWH 11.01 it is fixed (the TFoldex.prg file is dated 12/18/2010). <!-- s:D --><img src="{SMILIES_PATH}/icon_biggrin.gif" alt=":D" title="Very Happy" /><!-- s:D -->
|
Bug in TGet
|
In the following sample, try to paste the string "123456789012345678901234567890" in the GET and you will see that the picture is not respected:
[code=fw:3c09oq4x]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"Fivewin.ch"</span><br /><br /><br /><span style="color: #00C800;">FUNCTION</span> MAIN<span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /><br /> <span style="color: #00C800;">LOCAL</span> oDlg, oGet<br /><br /> <span style="color: #00C800;">LOCAL</span> cVar := SPACE<span style="color: #000000;">(</span> <span style="color: #000000;">39</span> <span style="color: #000000;">)</span><br /><br /> <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">DIALOG</span> oDlg<br /><br /> @ <span style="color: #000000;">1</span>, <span style="color: #000000;">1</span> <span style="color: #0000ff;">GET</span> oGet <span style="color: #0000ff;">VAR</span> cVar;<br /> <span style="color: #0000ff;">PICTURE</span> <span style="color: #ff0000;">"999-999-999-999-999-999-999-999-999-999"</span><br /><br /> @ <span style="color: #000000;">3</span>, <span style="color: #000000;">1</span> <span style="color: #0000ff;">BUTTON</span> <span style="color: #ff0000;">"&Close"</span> <span style="color: #0000ff;">ACTION</span> oDlg:<span style="color: #000000;">End</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /><br /> <span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">DIALOG</span> oDlg;<br /> <span style="color: #0000ff;">CENTER</span><br /><br /> <span style="color: #00C800;">RETURN</span> <span style="color: #00C800;">NIL</span></div>[/code:3c09oq4x]
EMG
|
Bug in TGet
|
Yes, it works correctly in pure xHarbour console mode. As in subject, the bug is in FWH TGet class.
EMG
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.