[Kst] New solution to the dependency problem?

George Staikos staikos at kde.org
Wed Mar 17 23:06:24 CET 2004


I just had a new idea for the dependency problem.  Basically I think I already 
solved it, I just didn't realise it and take it far enough!  Right now we 
lazy-load vectors in a single pass with loadInputs().  This could be extended 
to iteratively lazy-load until the next pass yields a result that is the same 
as the previous one:

NewObjects = KST::dataObjectList();
do {
	int cnt = NewObjects.count();
	/* This is the part I already did */
	for (object in NewObjects) {
		if (object->loadInputs()) {
			NewObjects.remove(object);
		}
	}
} while (!NewObjects.empty() && cnt != NewObjects.count());

Now we don't have to worry about the order of the Kst file or any cycles!  Any 
problems with this approach?  Barth?

-- 
George Staikos
KDE Developer				http://www.kde.org/
Staikos Computing Services Inc.		http://www.staikos.net/



More information about the Kst mailing list