Source

Kephra / lib / Kephra / API / Doc.pm

Diff from to

File lib/Kephra/API/Doc.pm

 	Kephra::Log::warning('need a ' . DOC_CLASS . " thats in stash, not $doc!", 1)
 		unless is($doc);
 	$document{'ID'}  {$lowest_free_ID} = $doc;
-	add_instance($doc, $_) for values $doc->panel;
+	add_instance($doc, $_) for keys $doc->editor;
 	if ($doc->file_path) {
 		$document{'file'}{$doc->file_path} = $doc;
 	} else {
 	my ($doc, $bar) = @_;
 	return Kephra::Log::warning('need as first parameter a'.DOC_CLASS.' thats in stash, not $doc!', 1)
 		unless is($doc);
-	return Kephra::Log::warning("need as second parameter a Kephra::App::Bar::Document instance")
-		unless blessed($bar) eq 'Kephra::App::Bar::Document';
+	#return Kephra::Log::warning("need a Kephra::App::Bar::Document instance as second parameter, not $bar")
+	#	unless blessed($bar) eq 'Kephra::App::Bar::Document';
 	$document{'panel'} { $doc->panel->{$bar}  } = $doc;
 	$document{'editor'}{ $doc->editor->{$bar} } = $doc;
 }
 	my ($doc, $bar) = @_;
 	return Kephra::Log::warning('need as first parameter a'.DOC_CLASS.' thats in stash, not $doc!', 1)
 		unless is($doc);
-	return Kephra::Log::warning("need as second parameter a Kephra::App::Bar::Document instance")
+	return Kephra::Log::warning("need a Kephra::App::Bar::Document instance as second parameter, not $bar")
 		unless blessed($bar) eq 'Kephra::App::Bar::Document';
 	delete $document{'panel'}{ $doc->panel->{$bar} };
 	delete $document{'editor'}{ $doc->editor->{$bar} };