cnavarro wrote:Dialog selection child window "More Windows"
Good job. Thanks a lot.
cnavarro wrote:Dialog selection child window "More Windows"
CREATE TABLE `statesuni` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`code` varchar(2) CHARACTER SET latin1 COLLATE latin1_general_ci DEFAULT NULL,
`name` varchar(25) COLLATE utf8_unicode_ci DEFAULT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `code` (`code`)
) ENGINE=InnoDB AUTO_INCREMENT=52 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci
#include "fivewin.ch"
#define AS_MDICHILD 1
#define AS_DIALOG 2
static oCn, oRs
//----------------------------------------------------------------------------//
function Main()
local oWnd, oBar, oMenu
FW_SetUnicode( .T. )
SetGetColorFocus()
oCn := FW_DemoDB()
oRs := oCn:RowSet( "statesuni" )
DEFINE WINDOW oWnd MDI TITLE "FWH18.08: DIALOG IN MDICHILD WINDOW"
DEFINE BUTTONBAR oBar OF oWnd SIZE 100,32 2007
DEFINE BUTTON OF oBar PROMPT "MDIDLG" CENTER ACTION CreateDialog( AS_MDICHILD )
DEFINE BUTTON OF oBar PROMPT "DIALOG" CENTER ACTION CreateDialog( AS_DIALOG )
DEFINE BUTTON OF oBar PROMPT "STRUCT" CENTER GROUP ACTION ;
memoedit( oCn:CreateTableSQL( "statesuni" ), "STATESUNI Structure" )
ACTIVATE WINDOW oWnd
oRs:Close()
oCn:Close()
return nil
//----------------------------------------------------------------------------//
static function CreateDialog( nAs )
local oDlg, oBrw, oFont, oBrush
local aGrad := {{1, CLR_WHITE, CLR_HBLUE }}
DEFINE BRUSH oBrush GRADIENT aGrad
DEFINE FONT oFont NAME "Segoe UI" SIZE 0,-20
DEFINE DIALOG oDlg SIZE 500,500 PIXEL TRUEPIXEL FONT oFont TITLE "MDI-DLG" BRUSH oBrush
RELEASE FONT oFont
RELEASE BRUSH oBrush
@ 80,20 XBROWSE oBrw SIZE -20,-20 PIXEL OF oDlg ;
DATASOURCE oRs AUTOCOLS PICTURES "99" CELL LINES NOBORDER UPDATE
WITH OBJECT oBrw
:bChange := { || oDlg:Update() }
//
:CreateFromCode()
END
@ 20,60 GET oRs:Name SIZE 400,40 PIXEL OF oDlg UPDATE VALID ;
( oRs:Save(), oBrw:RefreshCurrent(), .t. )
oDlg:bGotFocus := { || oDlg:Update() }
if nAs == AS_MDICHILD
ACTIVATE DIALOG oDlg AS MDICHILD
elseif nAs == AS_DIALOG
ACTIVATE DIALOG oDlg CENTERED
endif
return oDlg
//----------------------------------------------------------------------------//
nageswaragunupudi wrote:We do not think the problem is with mdi-dialog or nonmodal dialogs. The problem should be due to reasons external to this.
We made this test program using mdi dialogs. We used a table "statesuni" in FWH Demo Server, so that you can test it yourself. Please copy this program to your samples folder and build with buildh.bat.
For testing, do not make any changes to this source and do not also use any external libraries like TMySql.
This is the structure of table "statesuni"
- Code: Select all Expand view
CREATE TABLE `statesuni` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`code` varchar(2) CHARACTER SET latin1 COLLATE latin1_general_ci DEFAULT NULL,
`name` varchar(25) COLLATE utf8_unicode_ci DEFAULT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `code` (`code`)
) ENGINE=InnoDB AUTO_INCREMENT=52 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci
We tested with two Unicode languages we know, i.e., Hindi and Telugu and we did not find any problems.
We request you to test with Chinese Unicode characters and let us have your feedback.
Test program:
- Code: Select all Expand view
#include "fivewin.ch"
#define AS_MDICHILD 1
#define AS_DIALOG 2
static oCn, oRs
//----------------------------------------------------------------------------//
function Main()
local oWnd, oBar, oMenu
FW_SetUnicode( .T. )
SetGetColorFocus()
oCn := FW_DemoDB()
oRs := oCn:RowSet( "statesuni" )
DEFINE WINDOW oWnd MDI TITLE "FWH18.08: DIALOG IN MDICHILD WINDOW"
DEFINE BUTTONBAR oBar OF oWnd SIZE 100,32 2007
DEFINE BUTTON OF oBar PROMPT "MDIDLG" CENTER ACTION CreateDialog( AS_MDICHILD )
DEFINE BUTTON OF oBar PROMPT "DIALOG" CENTER ACTION CreateDialog( AS_DIALOG )
DEFINE BUTTON OF oBar PROMPT "STRUCT" CENTER GROUP ACTION ;
memoedit( oCn:CreateTableSQL( "statesuni" ), "STATESUNI Structure" )
ACTIVATE WINDOW oWnd
oRs:Close()
oCn:Close()
return nil
//----------------------------------------------------------------------------//
static function CreateDialog( nAs )
local oDlg, oBrw, oFont, oBrush
local aGrad := {{1, CLR_WHITE, CLR_HBLUE }}
DEFINE BRUSH oBrush GRADIENT aGrad
DEFINE FONT oFont NAME "Segoe UI" SIZE 0,-20
DEFINE DIALOG oDlg SIZE 500,500 PIXEL TRUEPIXEL FONT oFont TITLE "MDI-DLG" BRUSH oBrush
RELEASE FONT oFont
RELEASE BRUSH oBrush
@ 80,20 XBROWSE oBrw SIZE -20,-20 PIXEL OF oDlg ;
DATASOURCE oRs AUTOCOLS PICTURES "99" CELL LINES NOBORDER UPDATE
WITH OBJECT oBrw
:bChange := { || oDlg:Update() }
//
:CreateFromCode()
END
@ 20,60 GET oRs:Name SIZE 400,40 PIXEL OF oDlg UPDATE VALID ;
( oRs:Save(), oBrw:RefreshCurrent(), .t. )
oDlg:bGotFocus := { || oDlg:Update() }
if nAs == AS_MDICHILD
ACTIVATE DIALOG oDlg AS MDICHILD
elseif nAs == AS_DIALOG
ACTIVATE DIALOG oDlg CENTERED
endif
return oDlg
//----------------------------------------------------------------------------//
Our test results:
Mr.Rao
I just test it. input Chinese work fine. So it's next test what...
oCn:CreateTableSQL( <yourtablename> )
nageswaragunupudi wrote:Mr.Rao
I just test it. input Chinese work fine. So it's next test what...
Now, you need to figure out what is that difference between our sample and your application that is causing the problem for you.
You are in a better position to find out the reason than me.
Anyway, I can give a few hints:
1) When you use FW_SetUnicode( .t. ), do not also SET Chinese CODEPAGE.
2) FWH supports "utf8" but not "utf8mb4". Please make sure that the fields in your table are created with the character set "utf8" but not "utf8mb4".
3) Implications of using FWH builtin MariaLib Vs TMySQL.
Next steps for testing:
1) Change the table and server in our example to your server and your table and see if you still get the problems, using FWH built-in MariaLib.
2) Please also let us know the structure of your table. Please use
- Code: Select all Expand view
oCn:CreateTableSQL( <yourtablename> )
REQUEST HB_Lang_ZH, HB_CODEPAGE_UTF8
HB_LangSelect( "zh" )
HB_SetCodePage( "UTF8" )
HB_CDPSELECT( "UTF8" )
Fw_SetUnicode( .T. )
1) Change the table and server in our example to your server and your table and see if you still get the problems, using FWH built-in MariaLib.
nageswaragunupudi wrote:1) Change the table and server in our example to your server and your table and see if you still get the problems, using FWH built-in MariaLib.
Can you try this and let us know?
nageswaragunupudi wrote:Then what do you think is the difference between your previous sample and the present sample?
Can you please use your TMySql lib instead of Builtin MariaLib of FWH in the same sample we are now testing?
Also please try removing HB_LangSelect(...).
A.I have to use Set Resource to "xxx.DLL" , so I call Resource Dialog and into MDI Child Window.
B.I use TMySQL.
C.your prg type is big5, my prg type is UTF8
D.your control only TGet and xBrowse, my TGet, Radio, Checkbox, buttonbmp and xbrowse in the resource Dialog.
Return to FiveWin for Harbour/xHarbour
Users browsing this forum: Google [Bot] and 95 guests