hmg-4 Changelog

Moderator: Rathinagiri

User avatar
Rathinagiri
Posts: 5481
Joined: Tue Jul 29, 2008 6:30 pm
DBs Used: MariaDB, SQLite, SQLCipher and MySQL
Location: Sivakasi, India
Contact:

Re: hmg-4 Changelog

Post by Rathinagiri »

mrduck wrote:
rathinagiri wrote:I encountered a problem on InplaceEdit of grid. When we click on any other cell to navigate, it is working fine.
However, if we press enter inside, error occurs.
Is it possible to reproduce this problem with a sample in the samples dir ?
Also, dynamicbackcolor is not initialized and working properly.
You mean that the in-place-edit object doesn't inherit the colors from the cell ? Yes, probably :-)
Yes. I am talking about samples/virtualgrid/demo_3.prg

Please select a cell, start editing and press "Enter". And we get an error.

When compiled and run, dynamicbackcolor is not shown. When navigated using arrow keys, dynamic backcolor is working but not properly.

Also I get the following error when running the program the second time (ie afterwards)
Attachments
error.jpg
error.jpg (10.52 KiB) Viewed 3663 times
East or West HMG is the Best.
South or North HMG is worth.
...the possibilities are endless.
mrduck
Posts: 497
Joined: Fri Sep 10, 2010 5:22 pm

Re: hmg-4 Changelog

Post by mrduck »

I corrected the problem with the colors... another hmg.3 compatibility issue solved... :-) Commit tomorrow.

The in place edit worked some commits ago, something changed... Since due to different time zones you will wake up earlier, can you please use svn to go back in previous versions and locate which commit started the ENTER-key problem ?

Thanks
mrduck
Posts: 497
Joined: Fri Sep 10, 2010 5:22 pm

Re: hmg-4 Changelog

Post by mrduck »

Code: Select all

2011-09-27 12:02 UTC+0100 Francesco Perillo ( fperillo at gmail.com )
   * source/virtualgrid.prg
     * set some defaults
   * source/dialog.prg
     * added destructor to force dialog removal from hmgapp() list
     * lActivated set to .F. after exiting from exec()
   * source/abstractgrid.prg
     * correctly implemented cellRowIndex and cellColIndex for use in
       fore/background color. Are they used somewhere else ?
       Please note that now the row number is passed to the codeblock
       so cellRowIndex is not strictly necessary. We may add also
       the col number: it will save some method calls
   * include/hmg.ch
     + added WORKAREA one-liner command

I'm investigating the other problems... since now the test programs sometimes segfault...
mrduck
Posts: 497
Joined: Fri Sep 10, 2010 5:22 pm

Re: hmg-4 Changelog

Post by mrduck »

Code: Select all

2011-09-27 19:42 UTC+0100 Francesco Perillo ( fperillo at gmail.com )
   * source/virtualgrid.prg
     * modified the Refresh() method to not reset the model when handling
       events
     * Self -> ::
     * typos
Now the problem in editing is gone....
User avatar
l3whmg
Posts: 694
Joined: Mon Feb 23, 2009 8:46 pm
Location: Italy
Contact:

Re: hmg-4 Changelog

Post by l3whmg »

Hi guys

Code: Select all

2011-09-28 14:35 UTC+0100 Luigi Ferraris ( <luigi at l3w.it> )
   + samples/tree/card_mast.png
   + samples/tree/card_visa.png
   + samples/tree/demo_1.prg
   + samples/tree/demo_2.prg
   + samples/tree/folder_close.png
   + samples/tree/folder_open.png
   + samples/tree/laptop1.png
   + samples/tree/laptop2.png
   + samples/tree/white_paper.png
   + samples/tree/world.png
   + samples/tree/world_red.png
   - samples/tree/book.bmp
   - samples/tree/cl_fl.bmp
   - samples/tree/demo_3.prg
   - samples/tree/demo_4.prg
   - samples/tree/doc.bmp
   - samples/tree/doc_fl.bmp
   - samples/tree/op_fl.bmp
   - samples/tree/varios.bmp
   - samples/tree/wd.bmp
   - samples/tree/world.bmp

   * include/hmg.ch
     + #xcommand ITEMIMAGES
     + #xcommand NODEIMAGES
     ! #xcommand TREEITEM arranged in according with tree class
     ! #xcommand NODE.... ATTENTION: the new method is :AddNode()
     ! #xcommand END NODE.... ATTENTION! the new method is :EndNode()

   * source/tree.prg
     * totaly rewrited.
     ; TODO the old HMG3 itemid's system is not implemented yet.
ATTENTION please:
A) as the previous version of tree class the HMG3 ItemId's system is not implemented yet
B) as you can see to add a new node the method is AddNode() (see samples/tree/demo_1.prg for OOP)
C) as you can see to end a node the method is EndNode() (see samples/tree/demo_1.prg for OOP )
D) AddItem( cCaption, nParent, aImages, xItemId ) method has two new param: aImages (to force icon) and xItemId (but unused because ItemId's is not implemented)

Now you can activate two images regarding node and item; when you click on an item the relative icon must change.

Please take a look to the samples/tree/demo_1.prg about OOP style and samples/tree/demo_2.prg about XBase commands style.

Best regards
Luigi from Italy
www.L3W.it
User avatar
Roberto Lopez
HMG Founder
Posts: 4023
Joined: Wed Jul 30, 2008 6:43 pm

Re: hmg-4 Changelog

Post by Roberto Lopez »

Francesco,

It could be a silly question, since there had been many changes since I've left the daily work in the project, so I'm sorry in advance.

A call to HbQt_ErrorSys() has been included in the demos.

Could be this be done automatically at app startup?

This way, the user will be not required to manually add that call to every app.

TIA.
Regards/Saludos,

Roberto


(Veritas Filia Temporis)
User avatar
Roberto Lopez
HMG Founder
Posts: 4023
Joined: Wed Jul 30, 2008 6:43 pm

Re: hmg-4 Changelog

Post by Roberto Lopez »

Francesco,

I have another question:

The dialog demo 1 include the following calls:

HB_SYMBOL_UNUSED( oButtonBox )
HB_SYMBOL_UNUSED( oBtn_Ok )
HB_SYMBOL_UNUSED( oBtn_Cancel )

Is this a way to release the variables?

Is there some more friendly/elegant way to handle this?

TIA.
Regards/Saludos,

Roberto


(Veritas Filia Temporis)
User avatar
l3whmg
Posts: 694
Joined: Mon Feb 23, 2009 8:46 pm
Location: Italy
Contact:

Re: hmg-4 Changelog

Post by l3whmg »

Hi Roberto.
This was introduced, many times ago, when the XBase style command assume that the reference name (ie oBtn_Ok) must be a real variable within end program. This is wrong and a lot of demo must be fixed; now, to have the ability to assign object to a LOCAL/PRIVATE/PUBLIC var, I have extended the old Xbase style command with option TOVAR. In this way we can preserve OLD HMG3 commands and extend this future for HMG4.

This problem was born because there was a little confusion about Xbase style command (ie DEFINE TEXTBOX ReferenceName) and OOP style (ie WITH OBJECT oLocalVar := TEXTBOX():New( "ReferenceName") ).

Where ReferenceName is: a reference (ie MainForm.ReferenceName.Value) and, at the same time, an internal HMG4 object that CAN BE exported to a local var.

So, we can use a OOP style
- WITH OBJECT oLocalVar := TEXTBOX():New("ReferenceName") in this way HMG4 assign RefrenceName as internal name and you can use, in your program, MainForm:ReferenceName:Value
- WITH OBJECT oLocalVar := TEXTBOX():New() in this way HMG4 assign an internal name (ie HMG_OBJECT_1) You can use MainForm:HMG_OBJECT_1:Value but you can't know exactly the name: is an internal creation.

With Xbase style
DEFINE TEXTBOX ReferenceName... in this way HMG4 assign RefrenceName as internal name and you can use, in your program, MainForm:ReferenceName:Value
DEFINE TEXTBOX ReferenceName TOVAR oLocalVar....in this way HMG4 assign RefrenceName as internal name and you can use, in your program, MainForm:ReferenceName:Value BUT you can have oLocalVar within yout end program.

I hope my brief is clear no more technical :mrgreen:

Cheers

p.s. for the specific problem, related LOCAL declaration and HB_SYMBOL_UNUSED, must be removed
Luigi from Italy
www.L3W.it
mrduck
Posts: 497
Joined: Fri Sep 10, 2010 5:22 pm

Re: hmg-4 Changelog

Post by mrduck »

Roberto Lopez wrote: A call to HbQt_ErrorSys() has been included in the demos.

Could be this be done automatically at app startup?
Hi Roberto,
someone added in misc.prg a error handler but it never worked. So I proposed to call hbqt_errorsys that is included in hbQt and works correctly.

But you know that everybody has his own, personalized, error handler, to log messages in a text file, send mail etc etc, so probably it would be better to create a error handler template to show programmers how to expand and integrate it in their programs.

So, at the moment, I think that it is better to keep the hbQt_errorsys() call in the demos
User avatar
concentra
Posts: 256
Joined: Fri Nov 26, 2010 11:31 am
Location: Piracicaba - Brasil

Re: hmg-4 Changelog

Post by concentra »

mrduck wrote:
Roberto Lopez wrote: A call to HbQt_ErrorSys() has been included in the demos.

Could be this be done automatically at app startup?
Hi Roberto,
someone added in misc.prg a error handler but it never worked. So I proposed to call hbqt_errorsys that is included in hbQt and works correctly.

But you know that everybody has his own, personalized, error handler, to log messages in a text file, send mail etc etc, so probably it would be better to create a error handler template to show programmers how to expand and integrate it in their programs.

So, at the moment, I think that it is better to keep the hbQt_errorsys() call in the demos
Don't know the inners but without hbQt_errorsys() no message rises on error situations and is impossible to debug code.
[[]] Mauricio Ventura Faria
Post Reply