Grid2Print - Suggestions

Source code related resources

Moderator: Rathinagiri

User avatar
Roberto Lopez
HMG Founder
Posts: 4004
Joined: Wed Jul 30, 2008 6:43 pm

Re: Grid2Print - Suggestions

Post by Roberto Lopez »

esgici wrote:Very interesting :?

in c:\hmg\source\h_init.prg :
_HMG_SYSDATA [ 37 ] -> _HMG_aControlBrushHandle
Regards

--
esgici
You like to find "things" :)

That table in 'h_init.prg' refers to array names in old HMG versions replaced by _HMG_SYSDATA array.

From a long long long... time ago, these old arrays were used for multiple purposes depending on the control type, despite its name.

I've leaved such reference there for users that coded based on HMG interals in old versions that could want to convert to new structure.

Regards,

Roberto.
Regards/Saludos,

Roberto


(Veritas Filia Temporis)
User avatar
esgici
Posts: 4543
Joined: Wed Jul 30, 2008 9:17 pm
DBs Used: DBF
Location: iskenderun / Turkiye
Contact:

Re: Grid2Print - Suggestions

Post by esgici »

Roberto Lopez wrote:
You like to find "things" :)
I haven't any intention as being "bug finder of the year" :).

I am working only for contribute as far as I can.

Meanwhile time to time I am boring you by writing false reports and more frequently talking about worthless "things". :(

I am very sorry for this. Anyway you are punished me by being silent. :cry:

False reports are result of my haste and certainly my faults. The second may be a few discussable. Because importance is always relative to the view point.

You are encourage us frequently to working on UCI. For this I must understand _HMG_SYSDATA, I think. Is this wrong ?

Now, if I ask:
_HMG_SYSDATA [ 60 ] -> Custom Event Procedures Array
...
_HMG_SYSDATA [ 62 ] -> Custom Event Procedures Array

Is this correct ?
do you will say again:
You like to find "things" :)
?

Regards

--

esgici
Viva INTERNATIONAL HMG :D
User avatar
Roberto Lopez
HMG Founder
Posts: 4004
Joined: Wed Jul 30, 2008 6:43 pm

Re: Grid2Print - Suggestions

Post by Roberto Lopez »

esgici wrote: Now, if I ask:
_HMG_SYSDATA [ 60 ] -> Custom Event Procedures Array
...
_HMG_SYSDATA [ 62 ] -> Custom Event Procedures Array

Is this correct ?
do you will say again:
You like to find "things" :)
esgici
No. I'll do a better thing. I'll let you o find the answer :)

Hint: Look at "h_windows.prg"

:) :) :)

Regards,

Roberto.
Regards/Saludos,

Roberto


(Veritas Filia Temporis)
User avatar
esgici
Posts: 4543
Joined: Wed Jul 30, 2008 9:17 pm
DBs Used: DBF
Location: iskenderun / Turkiye
Contact:

Re: Grid2Print - Suggestions

Post by esgici »

Roberto Lopez wrote:
I'll do a better thing. I'll let you o find the answer :)

.
Well... agreed; this is better.. :)

But no the best! :(

A last question for this topic : How we will find answer [37] unless you said :
aJustify := _HMG_SYSDATA [ 37 ]


Is this possible by only looking at the source code ?

--

esgici
Viva INTERNATIONAL HMG :D
User avatar
Roberto Lopez
HMG Founder
Posts: 4004
Joined: Wed Jul 30, 2008 6:43 pm

Re: Grid2Print - Suggestions

Post by Roberto Lopez »

esgici wrote:
Roberto Lopez wrote:
I'll do a better thing. I'll let you o find the answer :)

.
Well... agreed; this is better.. :)

But no the best! :(

A last question for this topic : How we will find answer [37] unless you said :
aJustify := _HMG_SYSDATA [ 37 ]


Is this possible by only looking at the source code ?

--

esgici


I guess yes :)

The line 300 in h_grid.prg says:

_HMG_SYSDATA [ 37 ] [k] := aJust

Being 'aJust' the justify array passed as parameter to _DefineGrid procedure.

For clarification on the prior topic arrond line 4493 in 'h_windows.prg' you'll find:

Code: Select all

*------------------------------------------------------------------------------*
Procedure InstallEventHandler ( cProcedure )
*------------------------------------------------------------------------------*

	aadd ( _HMG_SYSDATA [ 60 ] , AllTrim ( Upper ( cProcedure ) ) )

Return

*------------------------------------------------------------------------------*
Procedure InstallPropertyHandler ( cPropertyName , cSetProcedure , cGetProcedure )
*------------------------------------------------------------------------------*

	aadd ( _HMG_SYSDATA [ 61 ] , { AllTrim ( Upper ( cPropertyName ) ) , AllTrim ( Upper ( cSetProcedure ) ) , AllTrim ( Upper ( cGetProcedure ) ) } )

Return

*------------------------------------------------------------------------------*
Procedure InstallMethodHandler ( cEventName , cMethodProcedure )
*------------------------------------------------------------------------------*

	aadd ( _HMG_SYSDATA [ 62 ] , { AllTrim ( Upper ( cEventName ) ) , AllTrim ( Upper ( cMethodProcedure ) ) } )

Return

So:

_HMG_SYSDATA [ 60 ] is the user events array,
_HMG_SYSDATA [ 61 ] is the user properties array
_HMG_SYSDATA [ 62 ] is the user methods array

But more important is that you don't need to know these 'numbers' since UCI hides for you.

You must not acces that array directly, but via the procedures InstallEventHandler, InstallPropertyHandle and InstallMethodHandler.

Regards,

Roberto.
Regards/Saludos,

Roberto


(Veritas Filia Temporis)
User avatar
esgici
Posts: 4543
Joined: Wed Jul 30, 2008 9:17 pm
DBs Used: DBF
Location: iskenderun / Turkiye
Contact:

Re: Grid2Print - Suggestions

Post by esgici »

Roberto Lopez wrote:
I guess yes :)
All right, understood.

So, result of looking is depend to eyes.

Thanks a lot.

--

esgici
Viva INTERNATIONAL HMG :D
User avatar
esgici
Posts: 4543
Joined: Wed Jul 30, 2008 9:17 pm
DBs Used: DBF
Location: iskenderun / Turkiye
Contact:

Re: Grid2Print - Suggestions

Post by esgici »

Roberto Lopez wrote: But more important is that you don't need to know these 'numbers' since UCI hides for you.
I am noticed, _HMG_SYSDATA is registry of HMG, we must don't play with it. :)

Regards

--

esgici
Viva INTERNATIONAL HMG :D
User avatar
Roberto Lopez
HMG Founder
Posts: 4004
Joined: Wed Jul 30, 2008 6:43 pm

Re: Grid2Print - Suggestions

Post by Roberto Lopez »

esgici wrote:
Roberto Lopez wrote: But more important is that you don't need to know these 'numbers' since UCI hides for you.
I am noticed, _HMG_SYSDATA is registry of HMG, we must don't play with it. :)

Regards

--

esgici

Ohh Yeah!... AT YOUR OWN RISK ;)

Regards,

Roberto.
Regards/Saludos,

Roberto


(Veritas Filia Temporis)
User avatar
Rathinagiri
Posts: 5471
Joined: Tue Jul 29, 2008 6:30 pm
DBs Used: MariaDB, SQLite, SQLCipher and MySQL
Location: Sivakasi, India
Contact:

Re: Grid2Print - Suggestions

Post by Rathinagiri »

Whew! It is JUST Gr8. :)

Now I am working on the new version. Please wait. :)
East or West HMG is the Best.
South or North HMG is worth.
...the possibilities are endless.
User avatar
Rathinagiri
Posts: 5471
Joined: Tue Jul 29, 2008 6:30 pm
DBs Used: MariaDB, SQLite, SQLCipher and MySQL
Location: Sivakasi, India
Contact:

Re: Grid2Print - Suggestions

Post by Rathinagiri »

Here comes the new version. It can be downloaded from here.

Change Log:

1. No parameter is now required for the print method. Just call Form1.Grid1.Print(). Thanks a lot Roberto.
2. Wordwrap option is now available for longer text. For text columns, you can increase/decrease the column size (in mm) using the small button near the column selection table. (see the image) Select wordwrap option in Report Properties.

Image

Image

Please give your suggestions and bug reports. Thanks.
East or West HMG is the Best.
South or North HMG is worth.
...the possibilities are endless.
Post Reply