1. Phix : Issue with EuWinGui

Hi

Started a new thread, as I've determined this is not a Phix issue, rather an EuWinGui one.

EuWinGui (Andrea Cini's original) ran nicely under Phix 0.7 (the version before the current one), so something changed. But the fault does not lie in Phix, per se, the fault is in EuWinGUI dll wrappers, as far as I can tell. I'm working my way thorugh various combinations of tracing and swapping. I though I had it nailed with group control types, but then othe ones popped up. I'll keep plugging away though.

Cheers

Chris

new topic     » topic index » view message » categorize

2. Re: Phix : Issue with EuWinGui

A new issue has just been raised: https://bitbucket.org/petelomax/phix/issues/32/tinewg-that-comes-with-phix-is-a-little

I have no plans to do anything about it just yet

new topic     » goto parent     » topic index » view message » categorize

3. Re: Phix : Issue with EuWinGui

So this is what I've determined so far.

The error is this

Fatal run-time error: 
C routine SetPicture() needs 3 arguments, not 0 

This produces it

SetPicture(Button02,PictureButton,"Icons\\ewgdbk.tf3") 

This does not

SetPicture(Button02,PictureButton,"ewgdbk.tf3")  --file in same directory 

and This produces it

Button01 = Control(Button,"Control's",20,20,80,25) 

This does not

Button01 = Control(Button,"Controls",20,20,80,25)  --no apostrophe 

except the error is

Fatal run-time error: 
C routine Control() needs 6 arguments, not 0 

SetPicture calls, in EuWinGUI

global procedure SetPicture(atom ctrl, atom ctrltype, sequence imagepath) 
    sgv() 
    v3_c_proc(setpicture,{ctrl,ctrltype,imagepath}) 
    ggv() 
end procedure 

and Control() calls in EuWinGUI

global function Control(atom controltype, sequence caption, atom posx, atom posy, atom dimx, atom dimy) 
    sgv() 
    return v3_c_func(control,{controltype,caption,posx,posy,dimx,dimy}) 
end function 

both of those call sgv

procedure sgv() 
    v3_c_proc(setglobalvars,{{CloseEventEnabled,UseTransparentPics,WinOnTop,WindowType,ShowFlag,EWG}}) 
end procedure 

which might indicate that v3_c_proc is the culprit, as this requires 6 parameters, and somehow it isn't getting any

v3_c_proc is in euconvertinc.e

public procedure v3_c_proc(integer func, sequence args) 
        sequence all = sprint(args) 
        atom addr = allocate_string(all) 
        c_proc(v3_c_proc_, {func, addr}) 
        free(addr) 
end procedure 

and the c functions and procedures are defined here in euconvertinc.e

constant thedll = open_dll("euconvert.dll"), 
v3_define_c_func_ = define_c_func(thedll, "v3_define_c_func", {C_POINTER}, C_INT), 
v3_define_c_proc_ = define_c_func(thedll, "v3_define_c_proc", {C_POINTER}, C_INT), 
v3_c_func_ = define_c_func(thedll, "v3_c_func", {C_INT, C_POINTER}, C_POINTER), 
v3_c_proc_ = define_c_proc(thedll, "v3_c_proc", {C_INT, C_POINTER}), 
v3_free_ = define_c_proc(thedll, "v3_free", {C_POINTER}) 
 

Now, at this point I'm stuck. Bearing in mind that this worked before the Phix changes (from 0.7xx to 0.8), what changed so that parameters passed to the dll was corrupted by the presence of a ' or a \\

Any help pointers as ever gratefully accepted.

Cheers

Chris

new topic     » goto parent     » topic index » view message » categorize

4. Re: Phix : Issue with EuWinGui

Also there might be an issue with inproc or infunc, so

global procedure SetPicture(atom ctrl, atom ctrltype, sequence imagepath) 
    sgv() 
    v3_c_proc(setpicture,{ctrl,ctrltype,imagepath}) 
    ggv() 
end procedure 

calls

setpicture =            inproc(EWG,"SetPicture",{AM,AM,SQ}) 
function infunc(atom dll, sequence name, sequence args, atom result) 
integer handle 
    -- INSERT THIS --  
    --handle = machine_func(51, {dll, name, args, result})  
    handle = v3_define_c_func(dll, name, args, result) 
    -- END OF INSERT --  
    if handle= -1 then 
        infail(name) 
    else 
        return handle 
    end if 
end function 
 
function inproc(atom dll, sequence name, sequence args) 
integer handle 
    -- INSERT THIS --  
    --handle = machine_func(51, {dll, name, args, 0})  
    handle = v3_define_c_proc(dll, name, args) 
    -- END OF INSERT --  
    if handle= -1 then 
        infail(name) 
    else 
        return handle 
    end if 
end function 
 

The inserts I think were done By Jim Brown (I think) who created euconvert.dll to shim some changes that were needed to allow euwingui to run with the uewingui.dll

As I said, I'm stumped now.

Cheers

Chris

new topic     » goto parent     » topic index » view message » categorize

Search



Quick Links

User menu

Not signed in.

Misc Menu