• Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search
 

World: r4wp

[Ann-Reply] Reply to Announce group

Maxim
29-Jun-2012
[95]
assuming you are using faces for the text, in AGG its a bit more 
work.
Arnold
30-Jun-2012
[96]
Mmm, I wanted to change the font on  just 1 label, but ALL labels 
in the app now have font color white.
Kaj
30-Jun-2012
[97x2]
That's because font objects and other attribute objects are shared 
by widgets. It's one of the standard starter gotchas
To change specific faces, copy the font object
Arnold
1-Jul-2012
[99]
That crossed my mind too, using copy of something but I couldn't 
find it, probably because I don't have a suitable font object or 
two to copy yet :-)
Endo
2-Jul-2012
[100]
Very nice game! I got "Bad font style!" several times at the start. 
Which font is used?
Cyphre
2-Jul-2012
[101]
hmm, the game doesn't work here:
** Script Error: labelfont has no value
** Where: zet-label-kleur
** Near: panel-rechts/pane/:p/font: labelfont
either onoff [panel-rechts/pane/:p/font: lbl-r/font]
>>

Any ideas?
Endo
2-Jul-2012
[102x2]
there is "labelfont" word in the script? I think there is a end-of-line 
problem on your download.
** "there is NO labelfont word in the script"
Cyphre
2-Jul-2012
[104x2]
I didn't change anything with the source.  Even this doesn't work:
>> do http://arnoldvanhofwegen.com/stuff/mirror.rebol
connecting to: arnoldvanhofwegen.com
Script: "Mirrorgame" (none)
** Script Error: labelfont has no value
** Where: zet-label-kleur
** Near: panel-rechts/pane/:p/font: labelfont
either onoff [panel-rechts/pane/:p/font: lbl-r/font]
>>
I can see the labelfont variable in the script at least twice but 
without any definition
Pekr
2-Jul-2012
[106x2]
mine runs, but just complains about the bad font style ..
View 2.7.8 on Vista 32 bit here ...
Henrik
2-Jul-2012
[108]
I see labelfont	 twice in the source code, where neither is a definition.
Rebolek
2-Jul-2012
[109x2]
Cyphre, that's strange, I did the same (do http://arnoldvanhofwegen.com/stuff/mirror.rebol) 
and it works for me.
ah, now I get your error. Maybe Arnold changed something in the code?
Endo
2-Jul-2012
[111x2]
hmm, it wasn't there when I download it. Now I re-download and there 
is labelfont and it has no value.
but I simple removed it and it worked well.
now bad font style error gone too.
Cyphre
2-Jul-2012
[113]
removal
 of the labelfont worked, thanks Endo
Arnold
2-Jul-2012
[114]
I changed the version for the one I had this morning and it worked 
under winXP maybe something went wrong uploading. I'll have a quick 
look
Endo
2-Jul-2012
[115]
it is a bit difficult to see which one is solid, a different color 
might be better. It's a great game by the way.
Arnold
2-Jul-2012
[116]
I have to change it but first the kids to bed.
Endo
2-Jul-2012
[117]
:))
Arnold
2-Jul-2012
[118x4]
Remove the bad lines version 1.04 works for me here. Mailed and uploaded 
just in between some modifications to clean things up a bit. Sorry 
for the inconvenience!
I think I know the source of this problem! The script did work on 
my machine without ANY error!
Why?
Because on MY REBOL environment labelfont still had a valid definition! 
It was still in memory from the earlier execution of the script. 
If tomorrow I start it again it will fail too!
Where is everybody?? 
(-:
Rebolek
2-Jul-2012
[122]
Arnold, I looked at the script (btw very cool game!) and you can 
replace nested 'either in zet-label-kleur with 'case for better readability.
Arnold
2-Jul-2012
[123x7]
@Rebolek Thanks, that wil be on the list together with line width 
and color and font-size preferences, a multilingual help function 
and a resize mechanism. ((:
I am not fond of case/switch statements because for every language 
it is doing things differently then you expect, sometimes you need 
break statements because otherwise the next statement will perform 
too and other confusing stuff (not) happening. Rebuilding switches 
to nested ifs mostly solves these problems for me.
Of course REBOL's 'case you mean 'switch (REBOL 3 knows a 'case)
is pretty straightforward
To be honest, I liked the eithers better than the switch/default 
with an extra default block. I like the :p part of the script too, 
maybe it is better to rewrite this as :P
And switch is missing its case argument.. back to the eithers it 
is...
can't play the game like this :))
Henrik
2-Jul-2012
[130]
And switch is missing its case argument
 - what do you mean by this?
GrahamC
2-Jul-2012
[131]
Rebol2 has a pretty straight forward case construct
Rebolek
2-Jul-2012
[132]
you can use something like this:
case [
	n < 9 do-something
	n < 17 do-something-else
	n < 25 do-something-different
]
GrahamC
2-Jul-2012
[133x3]
From the docs:

num: 10000
case [
    num < 10 [print "small"]
    num < 100 [print "medium"]
    num < 1000 [print "large"] 
    true [print "huge"]
]
huge
http://www.rebol.com/r3/docs/functions/case.html
and switch is useful as it allows multiple tests

>> print switch 1 [ 2 1 [ "yes" ] 3 [ "no" ]]
yes
Maxim
2-Jul-2012
[136x2]
mirror is MUCH more fun now that the numbers on the edge react in 
real time.... really makes it one big step more playable.

its also much more obvious what the game is about.
it would also be much easier to help and add features if all the 
code where in english  ;-)
Kaj
3-Jul-2012
[138]
Not for Dutch kids :-)
Maxim
3-Jul-2012
[139]
got most of it understandable using google translate   :-)
Arnold
3-Jul-2012
[140]
This is the benefit of speaking another language than English that 
is the base for so many computerlanguages. You can say things like 
rij: array [100] where array: array [100] would be a sure syntax 
error, and rij means array in Dutch off course. If you are in need 
of additional translations, just say so. Next I will build a multi-lang 
support lbl-something/text: lbl-something-tekst and a preferences 
panel with file (mirror.ini or mirror-pref.ini) for language (En 
De Nl Fr Es Pt additional wishes?), mirror line-width normal(1)/bold(3 
wide) for placed or both kinds and/or the grid, color of added mirrors, 
color for ok color for not ok.
Maxim
3-Jul-2012
[141x2]
I'm adding a visual and interactive mirror tracing layer so that 
you can just hover over the numbers and they shoot a visible ray 
across the grid   :-)
(bouncing off the mirrors obviously)
Arnold
3-Jul-2012
[143]
Is yours also workig on android and iPhone yet? :)))
Maxim
3-Jul-2012
[144]
hehe  I wish  ;-)