Re: Phix : Issue with EuWinGui

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

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 thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu