[Gambas-user] Gambas 3.15.0 and 3.15.1, IDE cries, then sometimes crashes (System or IDE infected ?)
Christof Thalhofer
chrisml at deganius.de
Sat Aug 15 12:10:39 CEST 2020
Am 15.08.20 um 11:52 schrieb Christof Thalhofer:
> Seems to be sth like an easter egg.
Yes, in Gmabas Sources Welcome/FWelcome:
> Private Sub PlaySound() As Boolean
>
> Dim dNow As Date
> Dim iYear As Integer
> Dim dEaster As Date
> Dim sPlay As String
> Dim sTemp As String
>
> dNow = Date(Now)
> 'dNow = Date(2020, 8, 15)
> iYear = Year(dNow)
> dEaster = Date.EasterDay(iYear)
>
> If dNow = Date(iYear, 12, 25) Then
> sPlay = "bells.mp3"
> Else If dNow = Date(iYear, 8, 15) Or If dNow = dEaster Or If dNow = dEaster + 39 Then
> sPlay = "spiritus.mp3"
> Else
> Return
> Endif
>
> Component.Load("gb.media")
> $hPlayer = New MediaPlayer As "MediaPlayer"
> sTemp = Temp$()
> Copy "welcome" &/ sPlay To sTemp
> $hPlayer.URL = Media.URL(sTemp)
> $hPlayer.Play(True)
>
> Return True
>
> End
So let's see who it was:
> christof at tof-x230 ~/programming/gambas/gambas ±master⚡ » git blame app/src/gambas3/.src/Welcome/CWelcome.class | grep -i tear
> 7295d38d02 app/src/gambas3/.src/Welcome/CWelcome.class (gambas 2020-05-22 00:25:24 +0200 6) Public NoTear As Boolean
> 7295d38d02 app/src/gambas3/.src/Welcome/CWelcome.class (gambas 2020-05-22 00:25:24 +0200 21) Private $aTears As New CTear[]
> 7295d38d02 app/src/gambas3/.src/Welcome/CWelcome.class (gambas 2020-05-22 00:25:24 +0200 22) Private $bTear As Boolean
> 7295d38d02 app/src/gambas3/.src/Welcome/CWelcome.class (gambas 2020-05-22 00:25:24 +0200 23) Private $hTear As Image
> 7295d38d02 app/src/gambas3/.src/Welcome/CWelcome.class (gambas 2020-05-22 00:25:24 +0200 24) Private $iTearAge As Integer
> 7295d38d02 app/src/gambas3/.src/Welcome/CWelcome.class (gambas 2020-05-22 00:25:24 +0200 26) Public Sub _new(hDrawingArea As DrawingArea, Optional bHasTear As Boolean)
> 7295d38d02 app/src/gambas3/.src/Welcome/CWelcome.class (gambas 2020-05-22 00:25:24 +0200 49) $bTear = bHasTear
> 7295d38d02 app/src/gambas3/.src/Welcome/CWelcome.class (gambas 2020-05-22 00:25:24 +0200 51) If $bSnow Or If $bTear Then
> 7295d38d02 app/src/gambas3/.src/Welcome/CWelcome.class (gambas 2020-05-22 00:25:24 +0200 102) Dim hTear As CTear
> 7295d38d02 app/src/gambas3/.src/Welcome/CWelcome.class (gambas 2020-05-22 00:25:24 +0200 170) If $bTear Then
> 7295d38d02 app/src/gambas3/.src/Welcome/CWelcome.class (gambas 2020-05-22 00:25:24 +0200 172) If Not $hTear Then $hTear = New Image($hLogo.W, $hLogo.H, Color.Transparent, Image.Premultiplied)
> 7295d38d02 app/src/gambas3/.src/Welcome/CWelcome.class (gambas 2020-05-22 00:25:24 +0200 174) $hTear.Fill(Color.Transparent)
> 7295d38d02 app/src/gambas3/.src/Welcome/CWelcome.class (gambas 2020-05-22 00:25:24 +0200 176) Paint.Begin($hTear)
> e2ba54c6fa app/src/gambas3/.src/Welcome/CWelcome.class (gambas 2020-06-13 17:00:10 +0200 179) 'Debug $aTears.Count
> 7295d38d02 app/src/gambas3/.src/Welcome/CWelcome.class (gambas 2020-05-22 00:25:24 +0200 182) While I < $aTears.Count
> 7295d38d02 app/src/gambas3/.src/Welcome/CWelcome.class (gambas 2020-05-22 00:25:24 +0200 184) hTear = $aTears[I]
> 7295d38d02 app/src/gambas3/.src/Welcome/CWelcome.class (gambas 2020-05-22 00:25:24 +0200 185) Inc hTear.Age
> 7295d38d02 app/src/gambas3/.src/Welcome/CWelcome.class (gambas 2020-05-22 00:25:24 +0200 188) Randomize hTear.Seed
> 7295d38d02 app/src/gambas3/.src/Welcome/CWelcome.class (gambas 2020-05-22 00:25:24 +0200 196) For J = 0 To hTear.Age
> 7295d38d02 app/src/gambas3/.src/Welcome/CWelcome.class (gambas 2020-05-22 00:25:24 +0200 198) iAge = hTear.Age - J
> 7295d38d02 app/src/gambas3/.src/Welcome/CWelcome.class (gambas 2020-05-22 00:25:24 +0200 225) $aTears.Remove(I)
> 7295d38d02 app/src/gambas3/.src/Welcome/CWelcome.class (gambas 2020-05-22 00:25:24 +0200 232) Paint.DrawImage($hTear, hDrawingArea.W - $hLogo.Width - Desktop.Scale, 0)
> 7295d38d02 app/src/gambas3/.src/Welcome/CWelcome.class (gambas 2020-05-22 00:25:24 +0200 276) Dim hTear As CTear
> 7295d38d02 app/src/gambas3/.src/Welcome/CWelcome.class (gambas 2020-05-22 00:25:24 +0200 349) If $bTear Then
> 7295d38d02 app/src/gambas3/.src/Welcome/CWelcome.class (gambas 2020-05-22 00:25:24 +0200 350) Inc $iTearAge
> 7295d38d02 app/src/gambas3/.src/Welcome/CWelcome.class (gambas 2020-05-22 00:25:24 +0200 351) If Not NoTear And If $aTears.Count < 3 Then
> 7295d38d02 app/src/gambas3/.src/Welcome/CWelcome.class (gambas 2020-05-22 00:25:24 +0200 354) If $aTears.Count = 0 Or If Rnd < 0.005 Then
> 7295d38d02 app/src/gambas3/.src/Welcome/CWelcome.class (gambas 2020-05-22 00:25:24 +0200 355) hTear = New CTear
> 7295d38d02 app/src/gambas3/.src/Welcome/CWelcome.class (gambas 2020-05-22 00:25:24 +0200 356) hTear.Seed = Rand(2147483647)
> 7295d38d02 app/src/gambas3/.src/Welcome/CWelcome.class (gambas 2020-05-22 00:25:24 +0200 357) $aTears.Add(hTear)
It was "gambas" himself, the divine dictator of all time:
Benoît.
Alles Gute
Christof Thalhofer
--
Dies ist keine Signatur
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: OpenPGP digital signature
URL: <https://lists.gambas-basic.org/pipermail/user/attachments/20200815/fd22d23a/attachment.sig>
More information about the User
mailing list