From 132df685d8d9f516365fd73ed7dae98d3eef5cab Mon Sep 17 00:00:00 2001 From: "R. Tyler Croy" Date: Thu, 12 Apr 2012 20:28:50 -0700 Subject: [PATCH] Add the Despair-UI project to start building the necessary widgets --- js/Despair-UI.deploy.js | 27 +++++++++++++++++++++++++++ js/Despair-UI.js | 37 +++++++++++++++++++++++++++++++++++++ st/Despair-UI.st | 17 +++++++++++++++++ 3 files changed, 81 insertions(+) create mode 100644 js/Despair-UI.deploy.js create mode 100644 js/Despair-UI.js create mode 100644 st/Despair-UI.st diff --git a/js/Despair-UI.deploy.js b/js/Despair-UI.deploy.js new file mode 100644 index 0000000..f4af387 --- /dev/null +++ b/js/Despair-UI.deploy.js @@ -0,0 +1,27 @@ +smalltalk.addPackage('Despair-UI', {}); +smalltalk.addClass('Project', smalltalk.Widget, ['repo', 'pulls'], 'Despair-UI'); +smalltalk.addMethod( +unescape('_initialize'), +smalltalk.method({ +selector: unescape('initialize'), +fn: function (){ +var self=this; +(self['@repo']=nil); +return self;} +}), +smalltalk.Project); + +smalltalk.addMethod( +unescape('_withRepo_andPullRequests_'), +smalltalk.method({ +selector: unescape('withRepo%3AandPullRequests%3A'), +fn: function (aRepo, anArrayOfRequests){ +var self=this; +(self['@repo']=aRepo); +(self['@pulls']=anArrayOfRequests); +return self;} +}), +smalltalk.Project); + + + diff --git a/js/Despair-UI.js b/js/Despair-UI.js new file mode 100644 index 0000000..5dd8f73 --- /dev/null +++ b/js/Despair-UI.js @@ -0,0 +1,37 @@ +smalltalk.addPackage('Despair-UI', {}); +smalltalk.addClass('Project', smalltalk.Widget, ['repo', 'pulls'], 'Despair-UI'); +smalltalk.addMethod( +unescape('_initialize'), +smalltalk.method({ +selector: unescape('initialize'), +category: 'initializers', +fn: function (){ +var self=this; +(self['@repo']=nil); +return self;}, +args: [], +source: unescape('initialize%0A%09repo%20%3A%3D%20nil.'), +messageSends: [], +referencedClasses: [] +}), +smalltalk.Project); + +smalltalk.addMethod( +unescape('_withRepo_andPullRequests_'), +smalltalk.method({ +selector: unescape('withRepo%3AandPullRequests%3A'), +category: 'initializers', +fn: function (aRepo, anArrayOfRequests){ +var self=this; +(self['@repo']=aRepo); +(self['@pulls']=anArrayOfRequests); +return self;}, +args: ["aRepo", "anArrayOfRequests"], +source: unescape('withRepo%3A%20aRepo%20andPullRequests%3A%20anArrayOfRequests%0A%09%22Initialize%20this%20Project%20widget%20with%20aRepo%20and%20an%20Array%20of%20PullRequest%20objects%20%22%0A%09repo%20%3A%3D%20aRepo.%0A%09pulls%20%3A%3D%20anArrayOfRequests.'), +messageSends: [], +referencedClasses: [] +}), +smalltalk.Project); + + + diff --git a/st/Despair-UI.st b/st/Despair-UI.st new file mode 100644 index 0000000..d2373db --- /dev/null +++ b/st/Despair-UI.st @@ -0,0 +1,17 @@ +Smalltalk current createPackage: 'Despair-UI' properties: #{}! +Widget subclass: #Project + instanceVariableNames: 'repo pulls' + category: 'Despair-UI'! + +!Project methodsFor: 'initializers'! + +initialize + repo := nil. +! + +withRepo: aRepo andPullRequests: anArrayOfRequests + "Initialize this Project widget with aRepo and an Array of PullRequest objects " + repo := aRepo. + pulls := anArrayOfRequests. +! ! +