[Gambas-user] Fwd: [Gambas Bug Tracker] Bug #1165: Gambas refuses to open files with timers on the form

Benoît Minisini gambas at ...1...
Sat Sep 9 09:41:50 CEST 2017



-------- Message transféré --------
Sujet : [Gambas Bug Tracker] Bug #1165: Gambas refuses to open files with timers on the form
Date : Sat, 09 Sep 2017 00:18:47 GMT
De : bugtracker at ...3416...
Pour : tmorehen at ...3634..., g4mba5 at ...626...

http://gambaswiki.org/bugtracker/edit?object=BUG.1165&from=L21haW4-

Comment #3 by Tony MOREHEN:

Sorry, all my other files either don't have timers or, instead of using #Move(), use #MoveScaled().  I checked the movescaled code and it handles both 2 parameter and 4 parameter moves.

I took another look at the Move code in FForm.class around line 489.  It tries to handle 2 or 4 parameter moves but fails:
       aCoord = Split(Mid$(sLine, 6, -1))
        X = CInt(aCoord[0])
        Y = CInt(aCoord[1])
        W = CInt(aCoord[2])
        H = CInt(aCoord[3])
        If aCoord.Count = 4 Then
          Try hCtrl.MoveAndResize(X, Y, W, H)
        Else
          Try hCtrl.Move(X, Y)
        Endif
Shouldn't the W and H lines be moved into the If?
       aCoord = Split(Mid$(sLine, 6, -1))
        X = CInt(aCoord[0])
        Y = CInt(aCoord[1])
        If aCoord.Count = 4 Then
          W = CInt(aCoord[2])
          H = CInt(aCoord[3])
          Try hCtrl.MoveAndResize(X, Y, W, H)
        Else
          Try hCtrl.Move(X, Y)
        Endif

Tony MOREHEN changed the state of the bug to: Accepted.







More information about the User mailing list