[Gambas-user] Gambas IDE cries (Easter egg !), How to avoid IDE crashes ?
ub2 at gmx.ch
ub2 at gmx.ch
Sat Aug 15 13:12:43 CEST 2020
Dear Christof and Tobias
Thanks a lot for your thorough answers !
My heartbeat is back close to normal,
... and there will be still some WE left.
(As soon as all emergency-actions are undone)
Is there a way to switch that ... thing easily off ?
... in order to reduce the amount if IDE-Crashes ?
It will show up only 200815 and every xx1225.
Grrrrright?
Thanks also to Benoit for his huge work with gambas.
Just keep in mind that some newbies (like me) would appreciate very much
easter eggs coming with an additional info, distinguishing them from
seriously compromised software.
Now, since all seems to be well, have all a nice and recreative weekend.
Thanks for gambas, your spirit and support.
ub2
Am 15.08.20 um 12:10 schrieb Christof Thalhofer:
> 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
>
>
>
> ----[ http://gambaswiki.org/wiki/doc/netiquette ]----
>
More information about the User
mailing list