RE: wxEuphoria version 0.3/wxedb

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

OK, I've found the problem with the warnings popping up.  I think I had
copied over some code from wxIDE that dealt with managing the recent files
menu, and didn't adjust the numbers in there, since the two programs have
different menu items in the file menu.

I'll try to upload a fixed version tomorrow, but for now, you can patch
your version by replacing the existing with the following procedure in 
wxedb.exw:

procedure update_recent( sequence file )
	integer last, add_sep, ix
	sequence split

	if length(file) then
		split = split_path(file)
		-- now, is it a recent file?
	
		ix = find( split, recent_files)

		if not ix then
			recent_files[2..4] = recent_files[1..3]
			recent_files[1] = split
			if recent_count < 4 then
				recent_count += 1
			end if
		else
			void = recent_files[ix]
			recent_files[2..ix] = recent_files[1..ix-1]
			recent_files[1] = void
		end if
		
	end if
	

	last = get_menuitem_count( file_menu )

	if last = 5 then
		void = insert_menuitem( file_menu, 4, -1, "", "", 0 )
		last += 1
	end if

	if last < 6 + recent_count then
	-- need to insert menuitems
recent_menu &= insert_menuitem( file_menu, recent_count + 3,
wxID_RECENT[recent_count], "", "", 0 )

	end if

	for i = 1 to recent_count do
		set_menu_label( file_menu, wxID_RECENT[i], recent_file_menu(i))
	end for
end procedure


Matt Lewis

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

Search



Quick Links

User menu

Not signed in.

Misc Menu