Re: OpenEuphoria All-in-One archives fro beginners
- Posted by jmduro May 22, 2015
- 3343 views
jmduro said...
I think I will write a library over wxEuphoria to have it as simple to use as can be, with for example only one setText covering set_text, set_label, set_string, set_combo_value, set_statusbar_text, etc.
I have started writing something but it can't be done as long as libwxeu*.dll does not wrap the wxClassInfo class which provides the function GetClassName().
Matt, Greg, could this function be included in libwxeu? It would help simplifying wxEuphoria usage for beginners as in this example.
public include wxeu.e public procedure setText(object id, sequence text) integer wxId, param if sequence(id) then wxId = id[1] param = id[2] else wxId = id end if sequence wxClass = get_class_name(wxId) if equal(wxClass, "wxListCtrl") or equal(wxClass, "wxListBox") then set_string( wxId, param, text ) if equal(wxClass, "wxFrame") or equal(wxClass, "wxButton") or equal(wxClass, "wxStaticText") then set_label ( wxId, text ) elsif equal(wxClass, "wxComboBox") then set_combo_value ( wxId, text ) elsif equal(wxClass, "wxStatusBar") then if sequence(id) then set_status_text( wxId, text, param) else set_status_text( wxId, text ) end if elsif equal(wxClass, "wxTextCtrl") then set_text( wxId, text ) end if end procedure
Regards
Jean-Marc