CEImagesetEditor.scheme does not exist

Use this forum for:
- Discussion regarding unofficial CEGUI related tools, scripts and utilities.
- User to user help for the obsoleted CELayoutEditor and CEImagesetEditor tools.

Moderators: CEGUI MVP, CEGUI Team

cl781121
Just popping in
Just popping in
Posts: 18
Joined: Wed May 26, 2010 08:02

CEImagesetEditor.scheme does not exist

Postby cl781121 » Fri Jun 04, 2010 09:06

I'm going to be crazy!

It took me two days to complie CEImagesetEditor ,finally i can complie successfully , i found i can not run it ,i can not found the datapath (i already has resouse)

why i can not load resource??

and THANKS FOR YOUR ADVANCE!!!

User avatar
CrazyEddie
CEGUI Project Lead
Posts: 6760
Joined: Wed Jan 12, 2005 12:06
Location: England
Contact:

Re: CEImagesetEditor.scheme does not exist

Postby CrazyEddie » Fri Jun 04, 2010 10:58

I don't know. Have you moved the executable from it's original built location? If so you also need to ensure the 'data' directory is next to the .exe file. It might also be a working directory issue if you're running from within the debugger.

CE.

cl781121
Just popping in
Just popping in
Posts: 18
Joined: Wed May 26, 2010 08:02

Re: CEImagesetEditor.scheme does not exist

Postby cl781121 » Sat Jun 05, 2010 10:37

CrazyEddie wrote:I don't know. Have you moved the executable from it's original built location? If so you also need to ensure the 'data' directory is next to the .exe file. It might also be a working directory issue if you're running from within the debugger.

CE.



hi CE

thanks your help

i do nont move the executable,but i copy the cegui's dll to ceimageseteditor's bin folder by myself not use build event->post-build event,i don't think that is problem,

is it relationship between cegui's dll and data directory??

then i check ceimageseteditor's code step by step, i found the bug location,but i don't know how to fix it :oops: :oops:

here is location of bug


Code: Select all


...

bool CEImagesetEditor::OnInit( void )
{
    // Log some platform info
    wxLogDebug( wxT( "Default Gui font: %s, %d" ), wxSystemSettings::GetFont( wxSYS_DEFAULT_GUI_FONT ).GetFaceName().c_str(), wxSystemSettings::GetFont( wxSYS_DEFAULT_GUI_FONT ).GetPointSize() );

    // Create a document manager
    m_docManager = new wxDocManager;

    wxImage::AddHandler( new wxPNGHandler );
    // Create a template relating drawing documents to their views
    new wxDocTemplate( m_docManager, wxT( "imageset files" ), wxT( "*.xml;*.imageset" ), wxT( "" ), wxT( "xml" ), wxT( "Editor Document" ), wxT( "Editor View" ),
                       CLASSINFO( EditorDocument ), CLASSINFO( EditorView ) );

    // If we've only got one window, we only get to edit
    // one document at a time.
    m_docManager->SetMaxDocsOpen( 1 );

    try
    {

        // Create Single-Document main frame, just look default position and dimensions
        GlobalFrame = new EditorFrame( m_docManager, 0, wxID_ANY, wxT( "CEImagesetEditor" ), wxDefaultPosition, wxSize( 800, 600 ), wxDEFAULT_FRAME_STYLE );

        // Prepare for the rendering canvas
        // We need to show the frame otherwise the CEGUI opengl renderer won't
        // be able to initialze, because the opengl viewport is not valid then.*/
        GlobalFrame->Centre( wxBOTH );
        GlobalFrame->Show( true );
        // This needs to be in the try-block!
        GlobalFrame->AttachCanvas( 0 ); //--------------  from here  into  catch ( CEGUI::Exception & guiException ),so i go into this function :

        SetTopWindow( GlobalFrame );

        return true;
    }
    catch ( CEGUI::Exception & guiException )
    {
        // If something goes wrong, show user
        wxLogError ( wxT( "ImagesetEditor::OnInit - Error: %s" ), CEGUIHelper::ToWXString( guiException.getMessage() ).c_str() );
        return false;
    }

////////////////////////////////////////////////////////////////
here is that function:

...
EditorGLCanvas* EditorFrame::AttachCanvas( EditorView* view )
{
    // Create the GLCanvas. This apprauch provides MDI support maybe in the future
    EditorGLCanvas* canvas = new EditorGLCanvas( view, m_splitter, wxDefaultPosition, wxDefaultSize );   //---------------- ths is bug position!  it goto up(catch ( CEGUI::Exception & guiException ))

    // add the canvas to the frame
    // Tell it about the initial size
    m_splitter->SplitVertically( m_propsPanel, canvas, 250 );
    canvas->ClearBackground();
    canvas->Disable();
    canvas->setBackgroundColour( m_backgroundColour );

    // Copy into member
    m_glcanvasImageset = canvas;

    return canvas;
}
...



and thanks again

User avatar
CrazyEddie
CEGUI Project Lead
Posts: 6760
Joined: Wed Jan 12, 2005 12:06
Location: England
Contact:

Re: CEImagesetEditor.scheme does not exist

Postby CrazyEddie » Sun Jun 06, 2010 08:18

I don't necessarily agree there is a bug here - as far as I know the pre-compiled version of the editor works fine with this same code. However, any issue as regards to this will likely be related to the following code, which is around line 247 of EditorGLCanvas.cpp

Code: Select all

    // build string where our required files can be found.
    String dataDir(CEGUIHelper::ToCEGUIString(wxStandardPaths::Get().GetResourcesDir()));
    if ( !dataDir.empty() && ( dataDir[dataDir.length() - 1] != '/' ) )
            dataDir += '/';

    // on Windows, the datafiles here will be in a 'data' subdir
    #if defined(__WIN32__) || defined (_WIN32)
        dataDir += "data/";
    #endif

As you can see, we use the wxStandardPaths utility class to obtain a resource location appropriate for the platform. I wonder what this is returning for your version of wxWidgets?

CE.

cl781121
Just popping in
Just popping in
Posts: 18
Joined: Wed May 26, 2010 08:02

Re: CEImagesetEditor.scheme does not exist

Postby cl781121 » Mon Jun 07, 2010 03:22

i got it !!!!!

wxString gg = wxStandardPaths::Get().GetResourcesDir();

i found "gg == CEImagesetEditor\bin",but in post-build event " xcopy ..\data ..\bin\debug\data /S /I /Y"

therefore i should copy "data" folder to directory "CEImagesetEditor\bin", not "CEImagesetEditor\bin\debug"
:hammer: :hammer: :hammer:


Return to “Unofficial CEGUI-Related Tools”

Who is online

Users browsing this forum: No registered users and 4 guests