Simple effect and maybe a bug ?

Discuss any general programming issues here
Post Reply
pecaN
Posts: 124
Joined: Thu Jun 10, 2010 4:15 pm

Simple effect and maybe a bug ?

Post by pecaN »

Hi all, don'y know what this could be good for, just an idea that came into my mind... it's only a template so you can use it as you wish... so try to execute it with Hollywood and watch and enjoy :-) ...

@DISPLAY {Sizeable=FALSE,Width = 364, Height = 236, Title = " "}
TextOut(#center,#center,"PRESS LEFT MOUSE BUTTON\nTO SEE A SIMPLE EFFECT")
WaitLEftMOuse
a$ = " Simple scrolling window title text"
for cycle = 1 to 32
a$ = UnrightStr(a$,1)
Wait(3)
SetDisplayAttributes({Title = a$})
next
WaitLeftMouse
End

So, it works good for the first time! but when i execute it repeatedly with Hollywood4.7, there is something strange. The window title should be empty at start (see line 1 and the DISPLAy command where Title = " " ).. but when started repeatedly then there is a text in the window title at the start! this happens when executing a script and also when compiled and executed as standalone programme... so is it a bug ? pecaN
User avatar
airsoftsoftwair
Posts: 5446
Joined: Fri Feb 12, 2010 2:33 pm
Location: Germany
Contact:

Re: Simple effect and maybe a bug ?

Post by airsoftsoftwair »

On what OS's did you try this? Does it only happen on one specific OS or on multiple ones?
pecaN
Posts: 124
Joined: Thu Jun 10, 2010 4:15 pm

Re: Simple effect and maybe a bug ?

Post by pecaN »

@ Andreas : sorry I forgot to mention it... i only tested it under MorphOS 1.4.5... maybe other coders can tell if this happens also on os4 and AROS... pecaN
User avatar
airsoftsoftwair
Posts: 5446
Joined: Fri Feb 12, 2010 2:33 pm
Location: Germany
Contact:

Re: Simple effect and maybe a bug ?

Post by airsoftsoftwair »

Tested it on MorphOS 2.7 and it's working fine. Maybe it's a bug in 1.4? I don't have a 1.4 system anymore so I can't test it there.
tolkien
Posts: 190
Joined: Sun Oct 17, 2010 10:40 pm
Location: Spain

Re: Simple effect and maybe a bug ?

Post by tolkien »

In Windows it works right too.
pecaN
Posts: 124
Joined: Thu Jun 10, 2010 4:15 pm

Re: Simple effect and maybe a bug ?

Post by pecaN »

Hi all, thx for your replies :-)

Well, tested it under MOS2.5 it also works ok with no errors but now the scrolling text does not work exactly as it shoukd :-) the text should scroll from the very right of the window title (that's why there are so many spaces in the string :-)) but under MOS2.5 it starts from the center :-) under 1.4,5 it works right - starts from the very right side of the window title :-) but never mind, just an example that Hollywood may work a bit different under different systems :-) pecaN
tolkien
Posts: 190
Joined: Sun Oct 17, 2010 10:40 pm
Location: Spain

Re: Simple effect and maybe a bug ?

Post by tolkien »

yes, in Win the text is in the middel of the window too.
User avatar
airsoftsoftwair
Posts: 5446
Joined: Fri Feb 12, 2010 2:33 pm
Location: Germany
Contact:

Re: Simple effect and maybe a bug ?

Post by airsoftsoftwair »

Hollywood doesn't have any influence on whether the window's title appears centered or left-aligned. I think this is defined by the currently used skin/theme.
pecaN
Posts: 124
Joined: Thu Jun 10, 2010 4:15 pm

Re: Simple effect and maybe a bug ?

Post by pecaN »

O- OH !!!!

Somewhere wrong happened when posting sourcecode !!! That's why it is not working as it should !!
it should be a$=" Simple scrolling window title text" !!!! There are 32 spaces and then the text in the string a$ !!! but now i see that there is only one space here... :-)

so a$ is used as title of the window...it's too long for the title so only spaces are seen at the start nut then the cycle (for cycle = 1 to 32...) deletes spaces one by one so there is an effect of scrolling :-) so try to correct the line :

a$=" Simple scrolling window title text" ( 32 spaces here!!)

and it sholud work :-)
User avatar
Juan Carlos
Posts: 891
Joined: Mon Sep 06, 2010 1:02 pm

Re: Simple effect and maybe a bug ?

Post by Juan Carlos »

I tested it under Windos version and the problem is as the html/javascript problems the spaces int he cycle instead 32 you put 35 it works fine:
For cycle = 1 To 35
The phrase has 35 characters included the spaces
Post Reply