[69975] branches/gsoc10-gui/Pallet/MPActionsController.m
tzikis at macports.org
tzikis at macports.org
Sat Jul 24 14:31:07 PDT 2010
Revision: 69975
http://trac.macports.org/changeset/69975
Author: tzikis at macports.org
Date: 2010-07-24 14:31:04 -0700 (Sat, 24 Jul 2010)
Log Message:
-----------
Fixed a bug where the GUI would pre-select all variants if it received a nil object as the default variants array
Modified Paths:
--------------
branches/gsoc10-gui/Pallet/MPActionsController.m
Modified: branches/gsoc10-gui/Pallet/MPActionsController.m
===================================================================
--- branches/gsoc10-gui/Pallet/MPActionsController.m 2010-07-24 17:48:36 UTC (rev 69974)
+++ branches/gsoc10-gui/Pallet/MPActionsController.m 2010-07-24 21:31:04 UTC (rev 69975)
@@ -99,8 +99,10 @@
NSLog(@"Default variants count: %i", [defaultsArray count]);
for(UInt i=0; i<[[port valueForKey:@"variants"] count];i++)
{
+
+
//NSLog(@"%@",[[port valueForKey:@"variants"] objectAtIndex:i]);
- if([defaultsArray indexOfObject:[[port valueForKey:@"variants"] objectAtIndex:i]] != NSNotFound)
+ if(defaultsArray != nil && [defaultsArray indexOfObject:[[port valueForKey:@"variants"] objectAtIndex:i]] != NSNotFound)
{
//NSLog(@"Default %@", [[port valueForKey:@"variants"] objectAtIndex:i]);
[checkboxes[i] setState:NSOnState];
@@ -109,9 +111,10 @@
else
{
[checkboxes[i] setState:NSOffState];
- [checkboxes[i] setIsDefault:NO];
+ [checkboxes[i] setIsDefault:NO];\
}
+
[checkboxes[i] setAlphaValue:1];
NSAttributedString *tempString = [[NSAttributedString alloc]\
initWithString:[[port valueForKey:@"variants"] objectAtIndex:i]\
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20100724/8ed33e8d/attachment-0001.html>
More information about the macports-changes
mailing list