Page 1 of 1
Newbie Question
Posted: Tue Dec 14, 2010 10:49 pm
by siki
Hello all
I'm new here, first time trying to make gui application. attached is small sample wich contain my first try.
I'm using harbour last compiled from svn
OS - Ubuntu 10.10
hmg - from svn at revision 509
Now questions:
1. Browsing database charachter's in names don't show as expected but terminal version work as expected in habbour
2. Clicking around on browse show difference on picked record and record in database as on attached picture, bigger database it is there are more problems with that. On edit window and print preview character's from database are shown correct.
3 How to lunch print preview with fit width activated
Thank you and best regards from Czech
Davor
Re: Newbie Question
Posted: Tue Dec 14, 2010 11:07 pm
by esgici
Hello Davor
First welcome aboard, regards from Turkiye
Probably you need using HB_OEMTOANSI() function.
This function convert a DOS(OEM) Character to a WINDOWS (ANSI) based character.
Syntax is :
HB_OEMTOANSI( <cOEMString> ) --> cANSIString
I hope that this help you
Regards
--
Esgici
Re: Newbie Question
Posted: Tue Dec 14, 2010 11:19 pm
by siki
Hello Esgici
nice to meet You
As I understand all conversion are done automatic with compiler only point where character's are not correctly presented are browse window. Is there some possibility to use hb_oemtoansi from browse window ???
long time I use clip / habour for terminal based applications without need for such conversion
attached are sample with database
thank You
Re: Newbie Question
Posted: Wed Dec 15, 2010 12:53 am
by apais
HMG 4 is in pre alpha state.
Linux support is limited yet.
Qrids and browses aren't full finished.
QT Codepage conversion is not finished yet, nor in harbour not in HMG.
You'll have to be patient or provide a solution yourself.
Regards
Angel
Re: Newbie Question
Posted: Wed Dec 15, 2010 7:56 am
by mrduck
siki wrote:
2. Clicking around on browse show difference on picked record and record in database as on attached picture, bigger database it is there are more problems with that. On edit window and print preview character's from database are shown correct.
There are problems in browse on record pointer.
BROWSE uses a "call-back" to ask for the record data/colors etc. When you click on a cell it asks data for the record you are leaving (it must redraw the cell unselected) and the cell before after and the selected one.
These call-backs are "async", generated by Qt as it needs, and so it moves the record pointer ( recno() ) and sometimes it is not left on the selected cell ! So tou MUST NOT trust recno(), also on double clicks. Instead you have to retrieve browse:value that returns the browse row and move the pointer accordingly ! I'm trying to change browse code to sync recno() but it is really useful ?
Other tests with BROWSE (samples\browse\demo_5.prg) showed that using browse on a million rows dbf using DBFNTX makes the browse almost unusable. Using DBFCDX makes the browse really quick.
Re: Newbie Question
Posted: Wed Dec 15, 2010 8:50 pm
by siki
Hello Angel
I'm little confused with hmg versions etc. Ok now I know that using version 4
I try most of samples, and have feeling that mostly all working very well in linux without problem
I used harbour for terminal based application and there all codepage conversion working well. Last time I try the same sample in hbxbp also working well for me with codepages
OK I try to make a look
Thank You and best regards
Re: Newbie Question
Posted: Wed Dec 15, 2010 9:20 pm
by siki
Hello mrduck
mrduck wrote:siki wrote:
2. Clicking around on browse show difference on picked record and record in database as on attached picture, bigger database it is there are more problems with that. On edit window and print preview character's from database are shown correct.
mrduck wrote:
There are problems in browse on record pointer.
BROWSE uses a "call-back" to ask for the record data/colors etc. When you click on a cell it asks data for the record you are leaving (it must redraw the cell unselected) and the cell before after and the selected one.
These call-backs are "async", generated by Qt as it needs, and so it moves the record pointer ( recno() ) and sometimes it is not left on the selected cell ! So tou MUST NOT trust recno(), also on double clicks. Instead you have to retrieve browse:value that returns the browse row and move the pointer accordingly ! I'm trying to change browse code to sync recno() but it is really useful ?
I think that is very important that browse update recno because after f.e double click we want to make some action print, edit, etc and we need for sure to print record pointed in browse not some other !
But how from browse:value to find actual record, or there are some other way ?
mrduck wrote:
Other tests with BROWSE (samples\browse\demo_5.prg) showed that using browse on a million rows dbf using DBFNTX makes the browse almost unusable. Using DBFCDX makes the browse really quick.
I have no problem with speed for now
thank You and best regards
Davor