Revision: 18266
          http://bibdesk.svn.sourceforge.net/bibdesk/?rev=18266&view=rev
Author:   hofman
Date:     2011-12-01 13:50:48 +0000 (Thu, 01 Dec 2011)
Log Message:
-----------
check cell class for custom controls

Modified Paths:
--------------
    trunk/bibdesk/BDSKAddressTextField.m
    trunk/bibdesk/BDSKFontWell.m
    trunk/bibdesk/BDSKImagePopUpButton.m
    trunk/bibdesk/BDSKRatingButton.m
    trunk/bibdesk/BDSKScrollableTextField.m
    trunk/bibdesk/BDSKStringEncodingManager.m

Modified: trunk/bibdesk/BDSKAddressTextField.m
===================================================================
--- trunk/bibdesk/BDSKAddressTextField.m        2011-12-01 13:45:51 UTC (rev 
18265)
+++ trunk/bibdesk/BDSKAddressTextField.m        2011-12-01 13:50:48 UTC (rev 
18266)
@@ -79,6 +79,7 @@
     if (self) {
                NSTextFieldCell *oldCell = [self cell];
         if ([oldCell isKindOfClass:[[self class] cellClass]] == NO) {
+            BDSKASSERT_NOT_REACHED("BDSKAddressTextField has wrong cell");
             BDSKAddressTextFieldCell *myCell = [[[[self class] cellClass] 
alloc] initTextCell:[oldCell stringValue]];
             
             [myCell setFont:[oldCell font]];

Modified: trunk/bibdesk/BDSKFontWell.m
===================================================================
--- trunk/bibdesk/BDSKFontWell.m        2011-12-01 13:45:51 UTC (rev 18265)
+++ trunk/bibdesk/BDSKFontWell.m        2011-12-01 13:50:48 UTC (rev 18266)
@@ -88,6 +88,7 @@
     if (self) {
                NSButtonCell *oldCell = [self cell];
                if (NO == [oldCell isKindOfClass:[[self class] cellClass]]) {
+            BDSKASSERT_NOT_REACHED("BDSKFontWell has wrong cell");
                        BDSKFontWellCell *newCell = [[[[self class] cellClass] 
alloc] init];
                        [newCell setAlignment:[oldCell alignment]];
                        [newCell setEditable:[oldCell isEditable]];

Modified: trunk/bibdesk/BDSKImagePopUpButton.m
===================================================================
--- trunk/bibdesk/BDSKImagePopUpButton.m        2011-12-01 13:45:51 UTC (rev 
18265)
+++ trunk/bibdesk/BDSKImagePopUpButton.m        2011-12-01 13:50:48 UTC (rev 
18266)
@@ -52,6 +52,7 @@
     self = [super initWithCoder:coder];
     if (self) {
                if ([[self cell] isKindOfClass:[[self class] cellClass]] == NO) 
{
+            BDSKASSERT_NOT_REACHED("BDSKImagePopUpButton has wrong cell");
                        id oldCell = [self cell];
                        id cell = [[[[[self class] cellClass] alloc] 
initTextCell:@"" pullsDown:YES] autorelease];
             

Modified: trunk/bibdesk/BDSKRatingButton.m
===================================================================
--- trunk/bibdesk/BDSKRatingButton.m    2011-12-01 13:45:51 UTC (rev 18265)
+++ trunk/bibdesk/BDSKRatingButton.m    2011-12-01 13:50:48 UTC (rev 18266)
@@ -59,6 +59,7 @@
     if (self) {
                NSButtonCell *oldCell = [self cell];
                if ([oldCell isKindOfClass:[[self class] cellClass]] == NO) {
+            BDSKASSERT_NOT_REACHED("BDSKRatingButton has wrong cell");
                        BDSKRatingButtonCell *newCell = [[[[self class] 
cellClass] alloc] init];
                        [newCell setBordered:[oldCell isBordered]];
                        [newCell setAlignment:[oldCell alignment]];

Modified: trunk/bibdesk/BDSKScrollableTextField.m
===================================================================
--- trunk/bibdesk/BDSKScrollableTextField.m     2011-12-01 13:45:51 UTC (rev 
18265)
+++ trunk/bibdesk/BDSKScrollableTextField.m     2011-12-01 13:50:48 UTC (rev 
18266)
@@ -51,6 +51,7 @@
     if (self) {
                NSTextFieldCell *oldCell = [self cell];
         if ([oldCell isKindOfClass:[[self class] cellClass]] == NO) {
+            BDSKASSERT_NOT_REACHED("BDSKScrollableTextField has wrong cell");
             BDSKScrollableTextFieldCell *myCell = [[[[self class] cellClass] 
alloc] initTextCell:[oldCell stringValue]];
             
             [myCell setFont:[oldCell font]];

Modified: trunk/bibdesk/BDSKStringEncodingManager.m
===================================================================
--- trunk/bibdesk/BDSKStringEncodingManager.m   2011-12-01 13:45:51 UTC (rev 
18265)
+++ trunk/bibdesk/BDSKStringEncodingManager.m   2011-12-01 13:50:48 UTC (rev 
18266)
@@ -79,6 +79,7 @@
     self = [super initWithCoder:coder];
     if (self) {
                if ([[self cell] isKindOfClass:[[self class] cellClass]] == NO) 
{
+            BDSKASSERT_NOT_REACHED("BDSKEncodingPopUpButton has wrong cell");
             BDSKEncodingPopUpButtonCell *newCell = [[[[self class] cellClass] 
alloc] init];
             [newCell setAction:[[self cell] action]];
             [newCell setTarget:[[self cell] target]];

This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.


------------------------------------------------------------------------------
All the data continuously generated in your IT infrastructure 
contains a definitive record of customers, application performance, 
security threats, fraudulent activity, and more. Splunk takes this 
data and makes sense of it. IT sense. And common sense.
http://p.sf.net/sfu/splunk-novd2d
_______________________________________________
Bibdesk-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bibdesk-commit

Reply via email to