Re: Open command in wxEuphoria

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



procedure load_project(sequence filename)
integer fn
object in
	-- start with a quick sanity check
	if match(".WaX",filename)!=length(filename)-3 then
		puts(1,"not a project!\n")
		?9/0
	end if
	fn= open(filename,"r")
	while 1 do
		in = gets(fn)
		if atom(in) then exit end if
		in = in[1..length(in)-1]
		if match(".WaX",in)=length(in)-3 then
			-- it's a sub-project
			load_project(in)
		else
			-- it's something else
			load_file_or_something_else(in)
		end if
	end while
end procedure


The .WaX thing was what I was planning on calling the files later. The second
part of it checks by any file and still gives the same -1 error so, I don't 
think it's entirely the fault of the extension address.

Anyway, I just put in that code and modified the other half to fit it and now
it just blinks an error message at me. 

I took that ?9/0 out since that gave a division by zero error.

I changed the .WaX to something more common (.rtf). When I open an .rtf file 
with it looking for .rtf, it goes toward the else instead of just opening.

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

Search



Quick Links

User menu

Not signed in.

Misc Menu