Skip to content

Instantly share code, notes, and snippets.

@Alos
Alos / Song.j
Created September 29, 2008 04:27
import <Foundation/CPObject.j>
SongDragType = @"SongDragType";
@implementation Song: CPObject
{
CPString songTitle;
CPString artist;
CPString time;
CPString genre
int ID;
BOOL selected;
/*El modelo de la columna es responsable de saber de que colo y tamaño se tiene que pintar cada columna de la tabla*/
@implementation SFColumnModel : CPTextField
{
}
-(id)initWithFrame:(CPRect)aFrame title:(CPString)aTitle color:(CPColor)aColor{
self= [[CPTextField alloc]initWithFrame: aFrame];
[self setStringValue:aTitle];
[self setTextColor: [CPColor colorWithHexString:"33FF00"]];
[self setBackgroundColor: aColor];
return self;
- (void)performDragOperation:(id <CPDraggingInfo>)aSender
{
// If this is us, don't add it.
if ([aSender draggingSource] == collectionView)
return;
var pasteboard = [aSender draggingPasteboard];
if ([[pasteboard types] containsObject:SongsDragType])
{
soundManager.domContentLoaded()
soundmanager2.js (line 512)-- SoundManager 2 V2.78a.20080920 (AS2/Flash 8) --
soundmanager2.js (line 512)soundManager._createMovie(): Trying to load ./soundmanager2.swf
soundmanager2.js (line 512)soundManager._initMovie(): Got EMBED element (created via JS)
soundmanager2.js (line 514)soundManager._initMovie(): Waiting for ExternalInterface call from Flash..
soundmanager2.js (line 514)soundManager.beginDelayedInit(): Document loaded
soundmanager2.js (line 514)(Flash): Flash -> JS OK
soundmanager2.js (line 514)soundManager._externalInterfaceOK()
soundmanager2.js (line 514)-- soundManager.init() --
soundmanager2.js (line 514)Attempting to call JS -&gt; Flash..
script.addEventListener("load", function()
{
soundManager.onload = function() {
[obj soundFinished:YES];
};
}, YES);
//
// Player.j
// XYZRadio
//
// Created by Alos on 10/2/08.
// Copyright __MyCompanyName__ 2008. All rights reserved.
//
import <AppKit/CPPanel.j>
import <AppKit/CPWindowController.j>
.
.
.
theSoundManager = [[SMSoundManager alloc]init];
[[CPNotificationCenter defaultCenter] addObserver:self selector:@selector(songDidFinishPlaying:) name:"SongEnded" object:theSoundManager];
[[CPNotificationCenter defaultCenter] addObserver:self selector:@selector(setTime:) name:"pos" object:theSoundManager];
local=true;
}
return self;
-(void)nextSong{
console.log("Clicked nextsong!");
if(local){
console.log("Mode is local");
if([theSoundManager isLoaded]){
if(playing){
//stop the currenly playing song
[theSoundManager stopSound];
//we get the currently playing song index and add one more
var index = [theUserList getSongIndex: currentlyPlayingSong];
//
// SFTable.j
// XYZRadio
//
// Created by Alos on 10/2/08.
//
import <Foundation/CPObject.j>
import "Song.j"
SongsDragType = @"SongsDragType";
import <Foundation/CPObject.j>
import "model/XYZSong.j"
import "view/DJList.j"
import "view/MainBrowser.j"
import "control/PlayerControl.j"
import "view/PreferencesWindow.j"
var BotonBrowserIdentifier = "BotonBrowserIdentifier" ,
BotonMiListaIdentifier = "BotonMiListaIdentifier",
AddSongToolbarItemIdentifier = "AddSongToolbarItemIdentifier",
RemoveSongToolbarItemIdentifier = "RemoveSongToolbarItemIdentifier"