i have add methode Flat in abstractbutton.prg

Moderator: Rathinagiri

JosK
Posts: 46
Joined: Tue Nov 08, 2011 11:38 pm

Re: i have add methode Flat in abstractbutton.prg

Post by JosK »

Problem number 4 from 8.34 pm has nothing to do with problem number 3.
( This was the error that i get when o:columnwhen{ (||.t.),,,} was not a codeblock)
mrduck
Posts: 497
Joined: Fri Sep 10, 2010 5:22 pm

Re: i have add methode Flat in abstractbutton.prg

Post by mrduck »

Dear JosK,
please don't misunderstand what I try to say.

If you want to make changes in your local copy of the code you can, of course.

But there are different methods to do the changes !!!

1) BUG fixes: use SVN
SVN and similar softwares were created exactly for this reason: cooperation between programmers working on the same code base.
So, if you want to do bug fixing (and I thank you for this!!!) please do a SVN checkout and work in that new sandbox. From time to time do an SVN update so that the changes in the repository will be "automatically" merged into your local copy !
If you did this way, you won't have had the errors in your message of today.

When you corrected a bug, please do a last "SVN update" and then create and send us a diff file, that is now easily applicable to the code.

I'm telling to you but everyone is invited to act in this way !!!!

And if you want to discard the changes, just revert the files.. (or delete them and do a update, they will be reloaded from SVN)

2) New features for everyone
like point 1. If you think a feature is missing you can add it and send the diff.

3) New features for your own use: use inheritance
if you don't like how a particular feature works, or you need some specialized behavior, or add some functionality that is strictly related to your project, then use inheritance ! (you is "plurar", the advice is for everybody!)


Please, take my advices in the correct way. They are to cooperate better !
User avatar
danielmaximiliano
Posts: 2612
Joined: Fri Apr 09, 2010 4:53 pm
Location: Argentina
Contact:

Re: i have add methode Flat in abstractbutton.prg

Post by danielmaximiliano »

mrduck wrote: When you corrected a bug, please do a last "SVN update" and then create and send us a diff file, that is now easily applicable to the code.
Hi Josk
use CommitMonitor for TortoiseSVN
http://tools.tortoisesvn.net/CommitMonitor.html

A doublelick on any revision in the top right view will fetch the diff for that revision as a unified diff so you can further inspect the commit. If you have TortoiseSVN installed, the CommitMonitor automatically uses TortoiseSVN to do the diff.
*´¨)
¸.·´¸.·*´¨) ¸.·*¨)
(¸.·´. (¸.·` *
.·`. Harbour/HMG : It's magic !
(¸.·``··*

Saludos / Regards
DaNiElMaXiMiLiAnO

Whatsapp. := +54901169026142
Telegram Name := DaNiElMaXiMiLiAnO
JosK
Posts: 46
Joined: Tue Nov 08, 2011 11:38 pm

Re: i have add methode Flat in abstractbutton.prg

Post by JosK »

Okay.

I will make the changes and do an SVN Update

To who i must send the diff file ?

Where do i explane the reason of my changes ?

For example ... i have uncomment "protected" at line 50 in virtualwindow.prg because i get an error on that line.
o:=TabPage():New(c,oParent)
o:=Toolbar():New(c,oParent) where oParent = oTabPage
JosK
Posts: 46
Joined: Tue Nov 08, 2011 11:38 pm

Re: i have add methode Flat in abstractbutton.prg

Post by JosK »

Grrrr .. svn

- I have done explorer->file->svnupdate to map "xSvn"
- make changes in source files (map "xSvn")
- with explorer -> select map ("xSvn") -> right button -> tortoiseSVN -> check for modifications and then I see the files that are modified.

How do i make a diff file ?
Where do i post this diff file ?
mrduck
Posts: 497
Joined: Fri Sep 10, 2010 5:22 pm

Re: i have add methode Flat in abstractbutton.prg

Post by mrduck »

JosK wrote: How do i make a diff file ?
Where do i post this diff file ?
on the main directory, hmg, with the red !, right click, create patch...

then create a new thread, explain what the patch is for, possibly with an example (you can add a file to svn with right-click -> add) and attach the diff file for review.

thanks
JosK
Posts: 46
Joined: Tue Nov 08, 2011 11:38 pm

Re: i have add methode Flat in abstractbutton.prg

Post by JosK »

is it a good idea to add file "hbqt_errorsys.prg to" svn\source ?
(i kan not attach the file because .prg is not allowed)
JosK
Posts: 46
Joined: Tue Nov 08, 2011 11:38 pm

Re: i have add methode Flat in abstractbutton.prg

Post by JosK »

grrrr add file with extension patch is also not allowed ;-)

Code: Select all


ndex: source/toolbar.prg
===================================================================
--- source/toolbar.prg	(revision 862)
+++ source/toolbar.prg	(working copy)
@@ -87,9 +87,9 @@
    ::oQtObject:setFocusPolicy( Qt_StrongFocus )
 //   ::oQtObject:setAutoFillBackground( .T. )
 
-   IF hb_IsObject( ::oParent ) 
-      ::oParent:QtObject:addToolBar( ::oQTObject )
-   ENDIF
+   //IF hb_IsObject( ::oParent ) 
+   //   ::oParent:QtObject:addToolBar( ::oQTObject )
+   //ENDIF
 
 RETURN Self
 
Index: source/virtualgrid.prg
===================================================================
--- source/virtualgrid.prg	(revision 862)
+++ source/virtualgrid.prg	(working copy)
@@ -972,15 +972,17 @@
          RETURN .T.
       ENDIF
    ENDIF
+   ::nCellCol := ::nCX + 1
    ::nCellRow := ::nCY + 1
-   ::nCellCol := ::nCX + 1
    IF hb_IsArray( ::aColumnWhen ) 
-      IF !Eval( ::aColumnWhen[::nCellCol] )
-         IF ::nCellCol == len( ::aColumnWhen )
-            RETURN .F.
-         ELSE
-            ::nCellCol++    // to navigate to NEXT cell IF columnwhen is not allowed
-         ENDIF
+      IF hb_isBlock(::aColumnWhen[::nCellCol])
+         IF !Eval( ::aColumnWhen[::nCellCol] )
+            IF ::nCellCol == len( ::aColumnWhen )
+               RETURN .F.
+            ELSE
+               ::nCellCol++    // to navigate to NEXT cell IF columnwhen is not allowed
+            ENDIF
+         ENDIF   
       ENDIF
    ENDIF
    * Inplace edit area
Index: source/virtualwindow.prg
===================================================================
--- source/virtualwindow.prg	(revision 862)
+++ source/virtualwindow.prg	(working copy)
@@ -47,7 +47,7 @@
 // data: please preserve alphabetic order.
    DATA lAutoRelease                              INIT   .T.         PROTECTED
    DATA lClickOnXtoClose                          INIT   .T.         PROTECTED   // hmg assume that a form will be closed clicking on [X]
-   DATA aKeyBoardEvents                           INIT   {}          PROTECTED
+   DATA aKeyBoardEvents                           INIT   {}         // PROTECTED
    DATA lMainReleasing                            INIT   .F.         PROTECTED   // to know if WND_MAIN close request is occured
    DATA bOnHscrollBox                             INIT   NIL         PROTECTED
    DATA bOnInit                                   INIT   NIL         PROTECTED
Ricci
Posts: 255
Joined: Thu Nov 19, 2009 2:23 pm

Re: i have add methode Flat in abstractbutton.prg

Post by Ricci »

I like to come back to the thread theme (" i have add methode Flat in abstractbutton.prg").

Josk, I don´t understand why you added a METHOD FLAT to the ABSTRACTBUTTON class. ABSTRACTBUTTON inherits from CONTROL, and CONTROL still has this method:

Code: Select all

/*..............................................................................
   Flat
..............................................................................*/
METHOD Flat( lValue ) CLASS CONTROL
   
   IF PCOUNT() == 0
      ::lFlat := ::oQtObject:isFlat()
      RETURN ::lFlat
   ELSEIF PCOUNT() == 1 .AND. hb_IsLogical( lValue ) 
      ::lFlat := lValue
      ::oQtObject:setFlat( ::lFlat )
   ENDIF

   RETURN NIL
JosK
Posts: 46
Joined: Tue Nov 08, 2011 11:38 pm

Re: i have add methode Flat in abstractbutton.prg

Post by JosK »

Ricci wrote:I like to come back to the thread theme (" i have add methode Flat in abstractbutton.prg").

Josk, I don´t understand why you added a METHOD FLAT to the ABSTRACTBUTTON class. ABSTRACTBUTTON inherits from CONTROL, and CONTROL still has this method:

Code: Select all

/*..............................................................................
   Flat
..............................................................................*/
METHOD Flat( lValue ) CLASS CONTROL
   
   IF PCOUNT() == 0
      ::lFlat := ::oQtObject:isFlat()
      RETURN ::lFlat
   ELSEIF PCOUNT() == 1 .AND. hb_IsLogical( lValue ) 
      ::lFlat := lValue
      ::oQtObject:setFlat( ::lFlat )
   ENDIF

   RETURN NIL
Sorry,
Forget the add methode flat.
You are right. Don't change that. My fault.

In my previous mail you can see the changes i have done with virtualgrid, toolbar and virtualwindow.
Post Reply