hmg-4 Changelog

Moderator: Rathinagiri

User avatar
l3whmg
Posts: 694
Joined: Mon Feb 23, 2009 8:46 pm
Location: Italy
Contact:

Re: hmg-4 Changelog

Post by l3whmg »

Hi
l3whmg wrote:This updating must be transparent for previous code. No additional code is required into your programs.
As Ricci has noticed, there are differences about object positioning. This is true, because now objects are positioned in relation to the centralwidget... ;)

Code: Select all

2011-10-31 18:08 UTC+0100 Luigi Ferraris ( <luigi at l3w.it> )
   ! source/animatebox.prg
     ! inherits from label. Align() and VAlign() can be used.

   * source/animatebox.prg
   * source/bitmap.prg
     * added note: inherits from label
     
   * source/label.prg
     * added note about inheriting classes
Luigi from Italy
www.L3W.it
User avatar
l3whmg
Posts: 694
Joined: Mon Feb 23, 2009 8:46 pm
Location: Italy
Contact:

Re: hmg-4 Changelog

Post by l3whmg »

Hy friends.

Code: Select all

2011-11-02 10:40 UTC+0100 Luigi Ferraris ( <luigi at l3w.it> )
   ! source/basic.prg
   ! source/menuitem.prg
     ! when Visible() is .T. the QtObject must be shown else not.
       Made change within Basic class Create() method. Some Qt objects don't
       uses show() method (ie QAction / MENUITEM). For these objects, Create()
       method must be overwrite. Please send notice about other broken code.
As I write in changelog, this change can broke code about some objects. At this moment I know/remember QAction (or MENUITEM). Send quickly notices about this topic. Thanks!
Luigi from Italy
www.L3W.it
User avatar
l3whmg
Posts: 694
Joined: Mon Feb 23, 2009 8:46 pm
Location: Italy
Contact:

Re: hmg-4 Changelog

Post by l3whmg »

Hi to everyone
These objects have their Create() method. I do some change about Visible() and connected events.

Please remember: when you overwrite a generic method pay attention to copy entire source code.

For example this is the source code about Create() method within Basic.prg

Code: Select all

METHOD Create() CLASS BASIC

   IF ::lCreated == .T.
      RETURN NIL
   ENDIF

   ::lCreated := .T.

   // Create inner controls
   ::CreatePendingChildControls()

   ::__HmgConnectEv()
   
   IF ::Visible() == .T.
      ::oQtObject:show()
   ENDIF

RETURN Self
You must copy all lines and don't remove anything if not required.
for example: __HmgConnectEv() connects the default events (close).
If the new object need more connections, you must overwrite __HmgConnectEv() and __HmgDisconnectEv() from basic.
At the same time if object doesn't handle a default connected event, you must overwrite __HmgConnectEv() and __HmgDisconnectEv() from basic.

Please report bugs about broken code from this commit.

Code: Select all

2011-11-02 11:30 UTC+0100 Luigi Ferraris ( <luigi at l3w.it> )
   ! source/animatebox.prg
   ! source/browse.prg
   ! source/grid.prg
   ! source/ipaddress.prg
   ! source/menupopup.prg
   ! source/splitbox.prg
   ! source/textbox.prg
   ! source/tree.prg
   ! source/virtualgrid.prg
     ! when Visible() is .T. the QtObject must be shown else not.
       Made change within Basic class Create() method. Some Qt objects don't
       uses show() method (ie QAction or MENUITEM). For these objects, Create()
       method must be overwrite. Please send notice about broken code.
     ; ATTENTION PLEASE: when you overwrite a method from other class
       (ie Create()) remember to copy the entire code and then edit/remove/add
       code with carefull.
Luigi from Italy
www.L3W.it
User avatar
l3whmg
Posts: 694
Joined: Mon Feb 23, 2009 8:46 pm
Location: Italy
Contact:

Re: hmg-4 Changelog

Post by l3whmg »

Hi

Code: Select all

2011-11-02 13:35 UTC+0100 Luigi Ferraris ( <luigi at l3w.it> )
   ! source/toolbutton.prg
     ! problem with Checked() method. The Qt ....:IsChecked() method seems not
       work. Now Checked() method uses the ::lChecked var to returns the
       item check status.
Cheers
Luigi from Italy
www.L3W.it
User avatar
l3whmg
Posts: 694
Joined: Mon Feb 23, 2009 8:46 pm
Location: Italy
Contact:

Re: hmg-4 Changelog

Post by l3whmg »

Hi

Code: Select all

2011-11-02 20:40 UTC+0100 Luigi Ferraris ( <luigi at l3w.it> )
   ! source/button.prg
     ! about Button class / Picture( Arg ) method.
       If Arg is NIL, icon will be removed.
       If Arg is a valid image then is loaded.

   ! source/toolbutton.prg
     ! about lChecked starting value
I'm sorry for these simple commits, but I'm rewriting samples/everything/demo_1.prg and testing objects.
So, I find and solve (I hope) the problems one at a time.

These are two of .... screenshot
Fig.1
screensho1
screensho1
ScreenShot001.jpg (44.99 KiB) Viewed 3058 times
Fig.2
screenshot2
screenshot2
ScreenShot002.jpg (119.31 KiB) Viewed 3058 times
Cheers
Luigi from Italy
www.L3W.it
Ricci
Posts: 255
Joined: Thu Nov 19, 2009 2:23 pm

Re: hmg-4 Changelog

Post by Ricci »

In grid.prg the METHOD Item and DoKeyBoardEvents are still unchanged. ;)
User avatar
l3whmg
Posts: 694
Joined: Mon Feb 23, 2009 8:46 pm
Location: Italy
Contact:

Re: hmg-4 Changelog

Post by l3whmg »

Hi to everyone

Code: Select all

2011-11-02 22:45 UTC+0100 Luigi Ferraris ( <luigi at l3w.it> )
   ! source/label.prg
     ! about Caption() and Value() (HMG3 method to assign caption).
       Now, the Value() method calls overwrited Caption() method. In this way, 
       we can use Caption() or Value() method to assign caption to label object.
       Always handled Autosize setting.
Hi Ricci, about grid.prg, can you post a little code example? Because, as I write you, near line 1771 the Qt_key_Return OR Qt_Key_Enter seems to be handled....

Cheers
Luigi from Italy
www.L3W.it
Ricci
Posts: 255
Joined: Thu Nov 19, 2009 2:23 pm

Re: hmg-4 Changelog

Post by Ricci »

l3whmg wrote:Hi Ricci, about grid.prg, can you post a little code example? Because, as I write you, near line 1771 the Qt_key_Return OR Qt_Key_Enter seems to be handled....
Yes it´s handled but ::bOnEnter is evaluated without checking if it´s a valid codeblock!
This will solve it:

Code: Select all

   IF !::lAllowEdit .or. ::lMultiSelect
      IF nKey == Qt_Key_Return .OR. nKey == Qt_Key_Enter
         IF VALTYPE( ::bOnEnter ) == "B"
            EVAL( ::bOnEnter )
            RETURN .T.
         ENDIF
      ENDIF

User avatar
l3whmg
Posts: 694
Joined: Mon Feb 23, 2009 8:46 pm
Location: Italy
Contact:

Re: hmg-4 Changelog

Post by l3whmg »

Hi Ricci,
you are right! I see know that problem. And I think it can be possibile there are others.....
Anyway, I do the change.

Many thanks.

Luigi
Luigi from Italy
www.L3W.it
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.

Ricci: please do a little check about this changes.

Code: Select all

2011-11-03 11:40 UTC+0100 Luigi Ferraris ( <luigi at l3w.it> )
   ! source/grid.prg
     ! DoKeyBoardEvents(): check if bOnEnter is a valid block before executing
       Please, check "always must be returned .T. ????" note.

     ! OnHeadClick(): aligned code about event handling. It was introduced
       __HmgOnHeadClickExec() handler.
Luigi from Italy
www.L3W.it
Post Reply