Revision: 29329
http://sourceforge.net/p/bibdesk/svn/29329
Author: hofman
Date: 2025-07-22 15:54:48 +0000 (Tue, 22 Jul 2025)
Log Message:
-----------
check cite key and crossref for chains and self reference in text import
controller
Modified Paths:
--------------
trunk/bibdesk/BDSKTextImportController.m
Modified: trunk/bibdesk/BDSKTextImportController.m
===================================================================
--- trunk/bibdesk/BDSKTextImportController.m 2025-07-22 15:26:09 UTC (rev
29328)
+++ trunk/bibdesk/BDSKTextImportController.m 2025-07-22 15:54:48 UTC (rev
29329)
@@ -1139,6 +1139,24 @@
// @@ should we do some more error chacking for valid entries and cite keys,
as well as showing warnings for formatter errors?
+- (BOOL)control:(NSControl *)control isValidObject:(id)obj {
+ if ([control isEqual:citeKeyField]) {
+ if (BDSKNoCrossrefError != [[self publication] canSetCiteKey:obj]) {
+ NSBeep();
+ return NO;
+ }
+ } else if ([NSString isEmptyString:obj] == NO) {
+ NSInteger row = [itemTableView rowForView:control];
+ if (row != -1 && [[fields objectAtIndex:row]
isEqualToString:BDSKCrossrefString]) {
+ if (BDSKNoCrossrefError != [[self publication]
canSetCrossref:obj]) {
+ NSBeep();
+ return NO;
+ }
+ }
+ }
+ return YES;
+}
+
- (void)controlTextDidEndEditing:(NSNotification *)notification {
NSControl *control = [notification object];
if ([control isEqual:citeKeyField]) {
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
_______________________________________________
Bibdesk-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bibdesk-commit