Re: Phix simple_paint demo crash

new topic     » goto parent     » topic index » view thread      » older message » newer message
euphoric said...

When I run simple_paint.exw from pdemo, I get this output:

C:\Phix\demo\pGUI\pGUI.e:3284 in function IupConfigLoad() 

Ah, there was something introduced in IUP 3.24, try this:

procedure ensure_config_file_exists() 
    -- Bugfix for 3.24 (reported) [remove when >3.24 is released] 
    string f = join_path({getenv("HOMEDRIVE"),getenv("HOMEPATH"),"simple_paint.cfg"}) 
    if not file_exists(f) then 
        integer fn = open(f,"wb") 
        close(fn) 
    end if 
end procedure 
 
    config = IupConfig() 
    IupSetStrAttribute(config, "APP_NAME", "simple_paint") 
 
    ensure_config_file_exists() 
 
    {} = IupConfigLoad(config) 

Technically 3.25 has just been released, this week, but I have not downloaded it or anything yet.

Regards,
Pete

PS: I wouldn't get that problem here, because I've already got a simple_paint.cfg file

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

Search



Quick Links

User menu

Not signed in.

Misc Menu