Inheritance ?

Devin Asay devin_asay at byu.edu
Mon Apr 21 10:22:38 EDT 2008


Richmond,

I may not have the whole answers, but my 2 kopeks follow.

On Apr 18, 2008, at 3:27 AM, Richmond Mathewson wrote:
>
> Questions . . .
>
> 1. Do I have to set the backgroundColor in every text
> field so that it does not inherit from the stack/card
> backgroundColor?
>
> Why does this seem to behave differently on Mac and
> Ubuntu ???

Could it be an issue, not of backgroundColor and inheritance, but of  
the way opaque fields work on Mac vs. Ubuntu? When I set the bg color  
on a new stack on my Mac machine, the fields happily stay white. If I  
check 'the effective backgroundcolor' of the field in the message  
box, it happily reports "ugly purple". (Okay, 115,79,255 in this  
example.) Tthe opaque property of fields is set to true by default. I  
have no Ubuntu to check it against, but it may well be that due to OS  
HIG differences, opaque fields in Mac OS X are supposed to stay  
white, while there is no standard on this matter in Ubuntu, so Rev  
simply has them inherit the parent colors. My Win XP box shows the  
same behavio(u)r as the Mac, BTW. Or it could be a bug in Rev.
>
>
> 2. Short of porting Charcoal to Ubuntu, or BitStream
> Vera Sans to Mac (Sans much sense!), do I have to
> write lines of code for every text field so that when
> stacks are transferred to Ubuntu they adopt B... Vera
> Sans  ?

I have no firm answer to this one, but I have noticed this happening  
on Windows sometimes when I open a Mac-produced stack with a Mac-only  
font set to it. The font of course has defaulted to something else in  
Windows, but the font size is a miniscule 12 or 10 point. I often  
solve the X-plat font issues by including a simple if statement in my  
preOpenStack handler:

if the platform is "Win32" then
   set the textFont of this stack to "Some Beautious Windows Font"
   set the textSize of this stack to 32
else
   --whatever font and size for Mac
end if

Obviously you could add another else clause to set it for Linux.  
Sorry, I don't know how to specify Red Hat vs. Debian vs. Ubuntu vs.  
Silly Salamander.

Regards,

Devin

Devin Asay
Humanities Technology and Research Support Center
Brigham Young University




More information about the use-livecode mailing list