Re: Difference between compiled and translated code
- Posted by Derek Parnell <ddparnell at bigpond.com> Mar 04, 2001
- 397 views
Hi Alan, I can confirm your observations. I'm getting the same effect on my Windows Me machine. I have no explanation yet. But in a nutshell, the compiled version and translated version of the *same* source code give different results. In the meantime, you might like to try to experiment with creating Lists with the LBS_NOINTEGRALHEIGHT flag. This sets the size at exactly the height you specify, the default is to make the size a multiple of the text font height being used. constant List1 = create(List,"List1", Main,020,090,170,List1_vsize,LBS_NOITEGRALHEIGHT) ------ Derek Parnell Melbourne, Australia "To finish a job quickly, go slower." ----- Original Message ----- From: "Alan Oxley" <fizzpop at icon.co.za> To: "EUforum" <EUforum at topica.com> Sent: Sunday, March 04, 2001 11:12 PM Subject: Difference between compiled and translated code > Greetings fellow Euphorians, > This may be a win32lib problem, or a compiler problem... please see code > attached: > > -- > -- Demonstate Win32lib inconsistency between compiled > -- and translated code. > -- > -- When value of List1_vsize is less than 22, > -- the compiled version is too thin to have text font visible; > -- ie you cannot see "List 1 item" displayed. > -- The translated version is ok for values 14 and greater. > -- List2 is for comparison purposes. > -- > -- Environment: > -- Win32lib v055.1 David Cuny, Derek Parnell, et al, > -- "last change 3/01/2001 2:04:34 by Derek Parnell" > -- Euphoria v2.1 Licenced (not current v2.2) > -- Euphoria Translator Beta-1 (16th Feb 2001) Licenced > -- Compiler Borland v5.5 Public domain > -- OS: Win98 4.10.1998 > -- Display : 1024 X 768 X 16Bit > -- Hardware: > -- Voodoo3 3000 16Mb > -- Pentium II, 400Mhz, 64Mb > -- > -- Notes: bug occurs on other machines eg NT4 SP6 PII-300 laptop. > -- changing fontsize 10 to 12, or font to "Times New Roman" also > -- makes no difference to the problem. > -- I am not attempting anything Eu2.2 specific; v2.1 should be ok. > -- I have made no changes to win32lib. > -- The workaround is to increase List1_vsize; however this > -- does seem to be a difference between translated and compiled. > -- > with type_check > with warning > with trace > include win32lib.ew -- v055.1 3/01/2001 2:04:34 > > integer List1_vsize, List2_vsize > > List1_vsize = 22 > List2_vsize = 14 > > constant Main = create(Window,"Main title", > 0,Default,Default,600,550,0) > constant List1 = create(List,"List1", > Main,020,090,170,List1_vsize,0) > constant List2 = create(List,"List2", > Main,215,090,170,List2_vsize,0) > > procedure Program_start() > addItem(List1,"List 1 item") > addItem(List2,"List 2 item") > end procedure > > setFont(Main,"Arial",10,Normal) > setDefaultFont(Main) > setWindowBackColor(Main,{080,080,180}) -- nice blueish purple > onOpen[Main] = routine_id("Program_start") > WinMain(Main,Normal) >