Page 4 of 30

Re: hmg-4 Changelog

Posted: Thu Sep 01, 2011 11:06 pm
by l3whmg
Hi Rathinagiri.
please check if these lines are right

Code: Select all

   // l3wonsf note: I think this is a method without SETGET
   METHOD DefineCellcontrol                       SETGET    //  FOR inplace edit

// Connected events handling: please preserve alphabetic order.
   METHOD CellChanged                             SETGET
   METHOD CellDoubleClicked                       SETGET
   METHOD DoCellKeyBoardEvents                    SETGET
   METHOD DoKeyBoardEvents                        SETGET
I think the option SETGET it's wrong: the last four are used with connect and the first it's used like a method

Code: Select all

2011-09-02 01:00 UTC+0100 Luigi Ferraris ( <luigi at l3w.it> )
  * source/misc.prg
    * little restyle
    ; attention: in the end, there is code rendered ineffective with "if 0"

  * source/graph.prg
  * source/grid.prg
  * source/printer.prg
    * source restyle: a) alphabetic order about data and methods
      b) methods (special way about new and create) before properties
      n.b. moved, copied and pasted the original source code

  ! source/graph.prg
  ! source/grid.prg
  ! source/printer.prg
    ! Make PROTECTED data. Inside end program retrieve or assign
      must be done with method. At the same time when you need or assign value
      from a class to another class, you must use method.
      If a class inherits from another you can refer directly to inherited vars
      Please check problem about PROTECTED vars.

Re: hmg-4 Changelog

Posted: Fri Sep 02, 2011 5:59 am
by Rathinagiri
Yes. As you have mentioned, they are METHODs without setget.

When I compiled Grid samples, (demo_3) the inplaceedit doesn't work and comes out with 'scope violation error'.

Re: hmg-4 Changelog

Posted: Fri Sep 02, 2011 10:11 am
by l3whmg
Hi Rathinagiri.
I do change within Grid.prg and I do some test, but you know Grid better than me :mrgreen: Please can You do more test?
As you can see within changelog, now method must be used... but some methods are specific for an object other "generalized": this can be a problem. ie Caption can be considered general, Value mmmh: sometime yes sometime no.

Cheers

Code: Select all

2011-09-02 12:10 UTC+0100 Luigi Ferraris ( <luigi at l3w.it> )
  ! source/grid.prg
    ! fixed I remove the option SETGET frmo methods: DefineCellcontrol,
      CellChanged, CellDoubleClicked, DoCellKeyBoardEvents, DoKeyBoardEvents
    ! where I found I fixed usage of defined constants (hmg.ch) 
      instead of numbers. Please use defined in the future
    ! fixed about protected data; now must be used:
      "::oCurrentWidget:Updown.." instead of "::oCurrentWidget:lUpDown.."
    ! fixed about protected data; now must be used:
      "::oCurrentWidget:DataType.." instead of "::oCurrentWidget:nDataType.."
    ! fixed about protected data; now must be used:
      "::oCurrentWidget:InputMask.." instead of "::oCurrentWidget:cInputMask.."
    ! fixed about protected data; now must be used:
      "::oCurrentWidget:Format.." instead of "::oCurrentWidget:cFormat.."
    ! fixed about protected data; now must be used:
      "::oCurrentWidget:Value.." instead of "::oCurrentWidget:xValue.."
    ! fixed about protected data; now must be used:
      "::oCurrentWidget:QtObject.." instead of "::oCurrentWidget:oQtObject.."
    ! fixed about protected data; now must be used:
      "::oCurrentWidget:Caption.." instead of "::oCurrentWidget:cCaption.."
    ! fixed about protected data; now must be used:
      "::oCurrentWidget:OnChange.." instead of "::oCurrentWidget:bOnChange.."
    ! fixed about protected data; now must be used:
      "::oCurrentWidget:Value.." instead of "::oCurrentWidget:lValue.."
    ! fixed about protected data; now must be used:
      "::oCurrentWidget:Value.." instead of "::oCurrentWidget:dValue.."
    ! fixed about protected data; now must be used:
      "::oCurrentWidget:RangeMin.." instead of "::oCurrentWidget:nRangeMin.."
    ! fixed about protected data; now must be used:
      "::oCurrentWidget:RangeMax.." instead of "::oCurrentWidget:nRangeMax.."
    ! fixed about protected data; now must be used:
      "::oCurrentWidget:Items.." instead of "::oCurrentWidget:aItems.."

Re: hmg-4 Changelog

Posted: Sun Sep 04, 2011 8:37 am
by l3whmg

Code: Select all

2011-09-04 10:40 UTC+0100 Luigi Ferraris ( <luigi at l3w.it> )
  ! samples/buttonbox/demo_1.prg
  ! samples/dial/demo_1.prg
  ! samples/grid/demo_4.prg
  ! samples/layout/demo_1.prg
  ! samples/layout/demo_2.prg
  ! samples/layout/demo_3.prg
  ! samples/layout/demo_4.prg
  ! samples/layout/demo_6.prg
  ! samples/lcd/demo_1.prg
  ! samples/media/demo_1.prg
  ! samples/scrollbar/demo_1.prg
  ! samples/scrollbar/demo_2.prg
  ! samples/tab/demo_4.prg
  ! samples/timer/demo_2.prg
  ! samples/virtualgrid/demo_4.prg
    ! fixed usage of Name and Parent method

  ! source/control.prg
    ! Parent method must be used to know the parent.
      I have removed SETGET option: you must use Parent()
      ; the previous code doesn't take care about Qt parent.
        The assignment must be made during the method New with a parameter.
        To move an object from a parent to another parent, a good method must
        be write. IMHO it's dangerous.

  ! source/basic.prg
    ! Name method must be used to know the name/refrence of the Hmg object.
      I have removed SETGET option: you must use Name()
      ; the assignment must be made during the method New with a parameter

  ! source/widget.prg
    ! fixed a problem about PROTECTED data.

Re: hmg-4 Changelog

Posted: Mon Sep 05, 2011 12:27 pm
by l3whmg
Hi friends

Code: Select all

2011-09-05 14:05 UTC+0100 Luigi Ferraris ( <luigi at l3w.it> )
  ! samples/timer/demo_1.prg
  ! samples/timer/demo_2.prg
  ! samples/timer/demo_3.prg
  ! samples/everything/demo_1.prg
  ! samples/lcd/demo_1.prg
    ! removed local declaration about timer object

  + samples/timer/demo_4.prg
    * to show a real OOP demo usage

  ! include/hmg.ch.prg
    ! Remove <oObj> := from defined timer command translation
As I write sometime ago, the XBase style doesn't require the assignment to a var and for this reason the LOCAL/PUBLIC declaration is unusefull. I start to do this job from timer object.

Current usage with Xbase style

Code: Select all

.....
LOCAL MyTimerName
....
DEFINE TIMER MyTimerName
....
END TIMER
New usage

Code: Select all

....
DEFINE TIMER MyTimerName
.....
END TIMER
On the other hand, with Hmg3 style we use this syntax: "Myform.MyTimerName.Interval := 3" As you can see, we don't use "MyTimerName.Interval := 3"
To show a "real" (but it's an example ;) ) usage of OOP style, I add "samples\timer\demo_4.prg".

I hope can be clear what I mean about "difference" between:
  • - Xbase style ("samples\timer\demo_2.prg")
    - OOP style ("samples\timer\demo_4.prg")
    - HMG4 test program ("samples\timer\demo_1.prg")
I will proceed in this direction, but an object at a time to have the opportunity to perform testing.

Cheers

Re: hmg-4 Changelog

Posted: Mon Sep 05, 2011 3:56 pm
by mlacecilia
2011-09-04 10:40 UTC+0100 Luigi Ferraris ( <luigi at l3w.it> )
! samples/buttonbox/demo_1.prg
Hi Luigi, please revise the demo_1.prg in buttonbox folder and rem the 43th line as here returns:

demo_1.prg(43) Error E0022 Invalid lvalue ':'
hbmk2: Error: Running Harbour compiler (embedded). 1

Best regards.
Maurizio

Re: hmg-4 Changelog

Posted: Mon Sep 05, 2011 5:03 pm
by l3whmg
Hi, Maurizio, many thanks.
I done changes within "samples\buttonbox\demo_1.prg" and "source\buttonbox.prg".
ASAP I will do a commit but I must check other mod. that I have implemented.

Cheers

Re: hmg-4 Changelog

Posted: Mon Sep 05, 2011 5:32 pm
by l3whmg
Hi friends
This commit has touched, unfortunately, some objects whose management is a little delicate. I refer in particular to the statusbar.
About this object, as you can see within hmg.ch, I removed use of :s_oParentWindow:oStatusBar and I have used another solution. Why this? 1st, because PROTECTED data create problem, 2nd as little as possible to use shared variables, 3rd in this way I respect Hmg3 compatibility (only one StatusBar reference) but we can naming it because I translate command in this way:

Code: Select all

#xcommand DEFINE STATUSBAR [ NAME <oObj> ] [ <dummy1: OF, PARENT> <oParent> ]   ;
            [ FONT <cFontName> SIZE <nFontSize> ];
            [ <lTop : TOP> ];
   => ;
   With Object StatusBar():New( iif(hb_IsNil( <oObj> ), "StatusBar", <"oObj">), [, <oParent> ] );;
      [:FontName := <cFontName>] ;;
      [:FontSize := <nFontSize>] ;;
      [:Top := <lTop>] ;;

Code: Select all

2011-09-05 19:25 UTC+0100 Luigi Ferraris ( <luigi at l3w.it> )
  ! samples/buttonbox/demo_1.prg
  ! source/buttonbox.prg
    ! fixed problem about PROTECTED data oQtObject and wrong parameter.
      Many thanks to Maurizio.


  ! source/statusbar.prg
    ! fixed problem about PROTECTED data StatusBar

  ! source/notifymenu.prg
    ! fixed problem about PROTECTED data SystemTrayIcon
    ! fixed problem about PROTECTED data NotifyIcon
    ! fixed problem about PROTECTED data NotifyToolTip
    ! fixed problem about PROTECTED data OnNotifyClick

  ! source/window.prg
    + added method SystemTryIcon with SETGET option to handle PROTECTED data
    + added method StatusBarSetGet with SETGET option to handle PROTECTED data

  ! samples/dial/demo_1.prg
  ! samples/everything/demo_1.prg
  ! samples/lcd/demo_1.prg
  ! samples/scrollbar/demo_1.prg
    ! removed local declaration about LCD objects with XBase style
    ! fixed clear local declaration about LCD objects with OOp style

  ! include/hmg.ch.prg
    ! Removed usage of "<oObj> :=" from command translation about LCD object
    ! Added "Alternate" syntax translation about LCD object
    ! Removed usage of "<oObj> :=" from command translation about STATUSBAR object
      ; to have compatbility with HMG3 by default the object name is StatusBar else
        you can assign using this syntax: DEFINE STATUSBAR NAME statusbarname.
        Please take a look within hmg.ch about translation.
    ! Removed circular definition about window statusbar
Cheers

Re: hmg-4 Changelog

Posted: Tue Sep 06, 2011 7:49 pm
by l3whmg
Hi friends,
I found a little difference about DROPDOWN translation between Hmg3 and Hmg4 but it's not very important, but there is. In the future, when I touch this command I revised. IMHO, with Hmg4 we must preserve the ability to assign name and parent. For these reasons I suggest a command like this
#xcommand DEFINE DROPDOWN MENU [ NAME <oObj> ] [ BUTTON <oParent> ]
In this way we can preserve the parent assignment with nested syntax and the name assignment.
I remember to everyone that HMG4 need to know the entire path about parent.

Code: Select all

2011-09-06 21:35 UTC+0100 Luigi Ferraris ( <luigi at l3w.it> )
  ! samples/everything/demo_1.prg
  ! samples/layout/demo_6.prg
  ! samples/toolbar/demo_1.prg
  ! samples/toolbar/demo_2.prg
  ! samples/toolbar/demo_3.prg
  ! samples/toolbar/demo_4.prg
  ! samples/toolbar/demo_5.prg
  ! samples/widget/demo_3a.prg
  ! samples/widget/demo_3b.prg
    ! removed local declaration about TOOLBUTTON objects with XBase style
    ! fixed clear local declaration about TOOLBUTTON objects with OOp style

  ! samples/everything/demo_1.prg
  ! samples/layout/demo_6.prg
  ! samples/toolbar/demo_1.prg
  ! samples/toolbar/demo_2.prg
  ! samples/toolbar/demo_3.prg
  ! samples/toolbar/demo_4.prg
  ! samples/toolbar/demo_5.prg
  ! samples/widget/demo_3b.prg
  ! samples/widget/demo_3a.prg
    ! removed local declaration about TOOLBAR objects with XBase style
    ! fixed clear local declaration about TOOLBAR objects with OOp style

  ! samples/everything/demo_1.prg
  ! samples/tree/demo_4.prg
  ! samples/tree/demo_3.prg
    ! removed local declaration about TREE objects with XBase style
    ! fixed clear local declaration about TREE objects with OOp style

  ! include/hmg.ch
    ! Removed usage of "<oObj> :=" from command translation about TOOLBUTTON object
    ! Removed usage of "<oObj> :=" from command translation about TOOLBAR object
    ! Removed usage of "<oObj> :=" from command translation about TREE object
    ; TODO when all "<oObj> :=" will be removed, the command
      "#xcommand PARENT...." shall be removed or changed.

Re: hmg-4 Changelog

Posted: Fri Sep 09, 2011 5:51 pm
by concentra

Code: Select all

2011-09-09 14:51 UTC-0300 Mauricio Ventura Faria (<conc001 a+t gmail com>)
   ! source/virtualgrid.prg
     ! Fixed columns not resizing.