This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-(boolean)isEqual:(id)anObject{ | |
if([[anObject class] instancesRespondToSelector:@selector("ID:")]) | |
if([anObject ID]==[self ID]) | |
return YES; | |
else | |
return NO; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import <Foundation/CPObject.j> | |
import "Song.j" | |
var BotonMiListaIdentifier = "BotonMiListaIdentifier", | |
AddSongToolbarItemIdentifier = "AddSongToolbarItemIdentifier", | |
RemoveSongToolbarItemIdentifier = "RemoveSongToolbarItemIdentifier"; | |
@implementation AppController : CPObject |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-(void)removeSong{ | |
var indexSet = [[libraryCollectionView selectionIndexes] firstIndex]; | |
[librarySongs removeObjectAtIndex: indexSet]; | |
[libraryCollectionView reloadContent]; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if(colored){ | |
colored=NO; | |
[titleView setBackgroundColor:[CPColor whiteColor]]; | |
[authorView setBackgroundColor:[CPColor whiteColor]]; | |
alert("Pinte blanco"); | |
}else{ | |
colored=YES; | |
alert("Pinte azul"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import <Foundation/CPObject.j> | |
@implementation SFTable : CPView | |
{ | |
CPCollectionView collectionView; | |
CPPanel bgPanel | |
CPArray model; | |
CPArray title; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
Removes selected items | |
*/ | |
-(void)removeSelectedItems{ | |
var indexes= [collectionView selectionIndexes]; | |
var arr = [[CPArray alloc]init]; | |
var a = [[collectionView selectionIndexes] firstIndex]; | |
var b = [[collectionView selectionIndexes] lastIndex]; | |
[indexes getIndexes: arr maxCount: a inIndexRange: CPMakeRange(0, b)]; | |
for(var i=0; i< [arr count];i++){ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-(void)removeSelectedItems{ | |
var indexes= [collectionView selectionIndexes]; | |
var arr = [[CPArray alloc]init]; | |
var a = [[collectionView selectionIndexes] firstIndex]; | |
var b = [[collectionView selectionIndexes] lastIndex]; | |
[indexes getIndexes: arr maxCount: a inIndexRange: CPMakeRange(0, 10)]; | |
for(var i=0; i< [arr count];i++){ | |
[model removeObjectAtIndex: [arr indexOfObject: i]]; | |
[collectionView reloadContent]; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/*The Music browser*/ | |
@implementation SFBrowser : CPWindow | |
{ | |
SFTable libraryTable; | |
} | |
/*Una bonita contructora*/ | |
- (id)initWithSource:(CPArray)list{ | |
//Creamos un HUD como panel para que pueda esta arriba de todas las demas ventanas | |
self = [[CPPanel alloc] initWithContentRect:CGRectMake(400, 50, 800, 500)styleMask:CPHUDBackgroundWindowMask|CPResizableWindowMask]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import <Foundation/CPObject.j> | |
import "Song.j" | |
import "SFTable.j" | |
import "MyList.j" | |
import "SFBrowser.j" | |
import "SFColumnModel.j" | |
var BotonBrowserIdentifier = "BotonBrowserIdentifier" , | |
BotonMiListaIdentifier = "BotonMiListaIdentifier", | |
AddSongToolbarItemIdentifier = "AddSongToolbarItemIdentifier", | |
RemoveSongToolbarItemIdentifier = "RemoveSongToolbarItemIdentifier"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import <Foundation/CPObject.j> | |
import "Song.j" | |
@implementation SFTable : CPView | |
{ | |
/*Para las tablas*/ | |
CPCollectionView collectionView; | |
CPArray model; | |
/*Cosas para los titulos*/ | |
CPArray columnModel |
OlderNewer