Difference between compiled and translated code

new topic     » topic index » view thread      » older message » newer message

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)

new topic     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu