Adapting ofxControlPanel for OF 007 (ofDirectory issue)

Hi guys,

I’m adapinting ofxControlPanel for use with OF 007.
It’s running OK, but I’m not being able to solve the compatibility for the new ofDirectory.

I’ve cleaned the includes for ofxDirList, but I’m confused here on the simpleFileLister.cpp
I’ve changed the commented lines for the ones below them and I’m getting a SIGABRT error on running.
Any clues?

Thank you!

Alexandre Rangel

  
  
//	ofxDirList::reset();  
//	int numFiles = ofxDirList::listDir(directory);  
//	entries.assign(numFiles, entry());  
//  
//	for(int i = 0; i < numFiles; i++){  
//		entries[i].filename = ofxDirList::getName(i);  
//		entries[i].fullpath = ofxDirList::getPath(i);  
//	}  
//  
  
      
    ofDirectory().reset();  
    int numFiles = ofDirectory().listDir(directory);  
    entries.assign(numFiles, entry());  
      
    for(int i = 0; i < numFiles; i++){  
        entries[i].filename = ofDirectory().getName(i);  
        entries[i].fullpath = ofDirectory().getPath(i);  
    }  
  

Howdy Alexandre,

We recently made some updates to ofxControlPanel for 007. Please check it out here: http://forum.openframeworks.cc/t/ofxcontrolpanel-updates/7782/1

I merely replaced the inheritance from ofxDirList to ofDirectory. Can you test it?

Hi, Dan.

Thank you very much for the attention.
I’ve tested and it works like a charm. List the directories just fine.