1. RE: wxEuphoria version 0.3/wxedb
- Posted by Henri Goffin <H.Goffin at skynet.be> Nov 20, 2004
- 503 views
Hi! This is probably the message Ferlin was talking about when he launched wxedb for the first time: ..\common\menucmn.cpp(355): assert "wxAssertFailure" failed: invalid index in wxMenu::Insert Do you want to stop the program? You can also choose [Cancel] to suppress further warnings. It happened to me as well but not at the start of wxedb but at DB open. Instead of choosing Cancel like Ferlin did I clicked "No" just to see what happens. I got another similar message: ..\common\menucmn.cpp(703): assert "wxAssertFailure" failed: wxMenu::SetLabel: no such item Do you want to stop the program? You can also choose [Cancel] to suppress further warnings. Again choosing "No" led me back to the gui with the DB open. After that i could start wxedb again and open a DB without trouble. I noticed that a file wxedb.ini had been created in the meantime. If i delete it and start the program again the message boxes return. Also if i open a DB for the first time the error behaviour occurs even if wxedb.ini already exists. Conclusion: this happens when opening a DB that is not already registered in wxedb.ini. Hope this will help Matt remove this annoying "feature". Henri Goffin -----Original Message----- From: Ferlin Scarborough [SMTP:guest at RapidEuphoria.com] Sent: Saturday, November 20, 2004 12:51 AM To: EUforum at topica.com Subject: [euphoria] Re: wxEuphoria version 0.3 posted by: Ferlin Scarborough <ferlin1 at bellsouth.net> Matt Lewis wrote: > > Ferlin Scarborough wrote: > > > > Matt, > > > > Thanks for the very quick release of the wxedb and wxIDE programs after the > > latest release of your library. > > > > I have unziped the library to a directory, I unziped the wxedb and then the > > wxIDE into that same directory, I then went to that directory and unziped > > the eusql into that directory, but when I try to run wxedb or wxIDE I get > > messages about things not being declared, follows is the messages from the > > ex.err file. > > > > wxIDE returns this error: > > > > C:\wxEuphoria\wxIDE.exw:272 > > get_splitter_sash_position has not been declared > > ini:setValue("File List Sash Position", get_splitter_sash_position( > > main_splitter > > ) ) > > > > wxedb returns this error: > > ^ > > C:\wxEuphoria\wxedb.exw:5152 > > get_combo_item_string has not been declared > > if equal( odbc_db[ix], get_combo_item_string( odbc_combo, lx )) then > > ^ > > Any help in this matter would be highly appreciated. > > I'm not sure what the problem is, unless you have an older version of > wxEuphoria in an include directory. Those functions are new for v0.3.0, > so if you have v0.2.0, then that would cause the error. I put the > wxEuphoria include files in a subfolder off of my include folder, and > add "%EUDIR%\INCLUDE\wxEuphoria" to my EUINC environment variable. > > Do any of the newer demos work (ex22.exw or higher)? > > Matt Lewis > Matt, Examples 22-25 all ran, then I looked at the docs and found that it said version 2, I then looked for another version and did not find it, then when I went to your Web Site, I discovered that I had made a blunder. I downloaded the Bleeding Edge version when I downloaded it, which plainly has a date of May 24 on the link. (ooooops!) :( I downloaded the correct version this time, and wxIDE ran fine, wxedb gave a message window on startup, something about wxAssert or something lilke that I don't remember, after I pressed Cancel it brought up the GUI. I tried to run it again to see what the exact message was, and it did not do that message again. So, I guess all appears to be working fine now. Thanks for the quick response. Later. Ferlin Scarborough Learn To Program Games in Free Courses At http://www.gameuniv.net My Euphoria Home Page http://mywebpage.netscape.com/shadetreesoft
2. RE: wxEuphoria version 0.3/wxedb
- Posted by Matt Lewis <matthewwalkerlewis at yahoo.com> Nov 20, 2004
- 473 views
Ferlin Scarborough wrote: > > Hi! > > This is probably the message Ferlin was talking about when he launched wxedb > for the > first time: > > ..\common\menucmn.cpp(355): assert "wxAssertFailure" failed: invalid index in > wxMenu::Insert > Do you want to stop the program? > You can also choose [Cancel] to suppress further warnings. > > It happened to me as well but not at the start of wxedb but at DB open. > > Instead of choosing Cancel like Ferlin did I clicked "No" just to see what > happens. > I got another similar message: > > ..\common\menucmn.cpp(703): assert "wxAssertFailure" failed: wxMenu::SetLabel: > no such > item > Do you want to stop the program? > You can also choose [Cancel] to suppress further warnings. > > Again choosing "No" led me back to the gui with the DB open. After that i > could start > wxedb again and open a DB without trouble. > > I noticed that a file wxedb.ini had been created in the meantime. If i delete > it and > start the program again the message boxes return. > > Also if i open a DB for the first time the error behaviour occurs even if > wxedb.ini > already exists. > > Conclusion: this happens when opening a DB that is not already registered in > wxedb.ini. > > Hope this will help Matt remove this annoying "feature". Thanks for the error report. I'm able to duplicate the opening a db, although I don't have the problem on opening. I'll try to get this fixed over the weekend. Matt Lewis
3. RE: wxEuphoria version 0.3/wxedb
- Posted by Matt Lewis <matthewwalkerlewis at yahoo.com> Nov 21, 2004
- 510 views
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