resin 0.0.7 → 0.0.8

Sign up to get free protection for your applications and to get access to all the features.
@@ -528,11 +528,13 @@ smalltalk.addMethod(
528
528
  unescape('_asJSON'),
529
529
  smalltalk.method({
530
530
  selector: unescape('asJSON'),
531
- fn: function () {
532
- var self = this;
533
- return smalltalk.send(smalltalk.JSON || JSON, "_parse_", [smalltalk.send(self, "_asJSONString", [])]);
534
- return self;
535
- }
531
+ fn: function (){
532
+ var self=this;
533
+ var variables=nil;
534
+ (variables=smalltalk.send((smalltalk.HashedCollection || HashedCollection), "_new", []));
535
+ smalltalk.send(smalltalk.send(smalltalk.send(self, "_class", []), "_allInstanceVariableNames", []), "_do_", [(function(each){return smalltalk.send(variables, "_at_put_", [each, smalltalk.send(smalltalk.send(self, "_instVarAt_", [each]), "_asJSON", [])]);})]);
536
+ return variables;
537
+ return self;}
536
538
  }),
537
539
  smalltalk.Object);
538
540
 
@@ -626,11 +628,10 @@ smalltalk.addMethod(
626
628
  unescape('_asJSONString'),
627
629
  smalltalk.method({
628
630
  selector: unescape('asJSONString'),
629
- fn: function () {
630
- var self = this;
631
- return smalltalk.send(smalltalk.JSON || JSON, "_stringify_", [self]);
632
- return self;
633
- }
631
+ fn: function (){
632
+ var self=this;
633
+ return smalltalk.send((smalltalk.JSON || JSON), "_stringify_", [smalltalk.send(self, "_asJSON", [])]);
634
+ return self;}
634
635
  }),
635
636
  smalltalk.Object);
636
637
 
@@ -1818,6 +1819,17 @@ fn: function () {
1818
1819
  }),
1819
1820
  smalltalk.Number);
1820
1821
 
1822
+ smalltalk.addMethod(
1823
+ unescape('_asJSON'),
1824
+ smalltalk.method({
1825
+ selector: unescape('asJSON'),
1826
+ fn: function (){
1827
+ var self=this;
1828
+ return self;
1829
+ return self;}
1830
+ }),
1831
+ smalltalk.Number);
1832
+
1821
1833
 
1822
1834
  smalltalk.addMethod(
1823
1835
  unescape('_pi'),
@@ -2009,6 +2021,17 @@ fn: function (aBoolean) {
2009
2021
  }),
2010
2022
  smalltalk.Boolean);
2011
2023
 
2024
+ smalltalk.addMethod(
2025
+ unescape('_asJSON'),
2026
+ smalltalk.method({
2027
+ selector: unescape('asJSON'),
2028
+ fn: function (){
2029
+ var self=this;
2030
+ return self;
2031
+ return self;}
2032
+ }),
2033
+ smalltalk.Boolean);
2034
+
2012
2035
 
2013
2036
 
2014
2037
  smalltalk.addClass('Date', smalltalk.Object, [], 'Kernel-Objects');
@@ -2643,6 +2666,17 @@ fn: function (aString, aString2, aString3) {
2643
2666
  }),
2644
2667
  smalltalk.UndefinedObject);
2645
2668
 
2669
+ smalltalk.addMethod(
2670
+ unescape('_asJSON'),
2671
+ smalltalk.method({
2672
+ selector: unescape('asJSON'),
2673
+ fn: function (){
2674
+ var self=this;
2675
+ return (typeof null == 'undefined' ? nil : null);
2676
+ return self;}
2677
+ }),
2678
+ smalltalk.UndefinedObject);
2679
+
2646
2680
 
2647
2681
  smalltalk.addMethod(
2648
2682
  unescape('_new'),
@@ -3397,6 +3431,17 @@ fn: function () {
3397
3431
  }),
3398
3432
  smalltalk.Point);
3399
3433
 
3434
+ smalltalk.addMethod(
3435
+ unescape('_translateBy_'),
3436
+ smalltalk.method({
3437
+ selector: unescape('translateBy%3A'),
3438
+ fn: function (delta){
3439
+ var self=this;
3440
+ return smalltalk.send(((($receiver = smalltalk.send(delta, "_x", [])).klass === smalltalk.Number) ? $receiver +self['@x'] : smalltalk.send($receiver, "__plus", [self['@x']])), "__at", [((($receiver = smalltalk.send(delta, "_y", [])).klass === smalltalk.Number) ? $receiver +self['@y'] : smalltalk.send($receiver, "__plus", [self['@y']]))]);
3441
+ return self;}
3442
+ }),
3443
+ smalltalk.Point);
3444
+
3400
3445
 
3401
3446
  smalltalk.addMethod(
3402
3447
  unescape('_x_y_'),
@@ -740,15 +740,17 @@ unescape('_asJSON'),
740
740
  smalltalk.method({
741
741
  selector: unescape('asJSON'),
742
742
  category: 'converting',
743
- fn: function () {
744
- var self = this;
745
- return smalltalk.send(smalltalk.JSON || JSON, "_parse_", [smalltalk.send(self, "_asJSONString", [])]);
746
- return self;
747
- },
743
+ fn: function (){
744
+ var self=this;
745
+ var variables=nil;
746
+ (variables=smalltalk.send((smalltalk.HashedCollection || HashedCollection), "_new", []));
747
+ smalltalk.send(smalltalk.send(smalltalk.send(self, "_class", []), "_allInstanceVariableNames", []), "_do_", [(function(each){return smalltalk.send(variables, "_at_put_", [each, smalltalk.send(smalltalk.send(self, "_instVarAt_", [each]), "_asJSON", [])]);})]);
748
+ return variables;
749
+ return self;},
748
750
  args: [],
749
- source: unescape('asJSON%0A%09%5EJSON%20parse%3A%20self%20asJSONString'),
750
- messageSends: ["parse:", "asJSONString"],
751
- referencedClasses: ["JSON"]
751
+ source: unescape('asJSON%0A%09%7C%20variables%20%7C%0A%09variables%20%3A%3D%20HashedCollection%20new.%0A%09self%20class%20allInstanceVariableNames%20do%3A%20%5B%3Aeach%20%7C%0A%09%09variables%20at%3A%20each%20put%3A%20%28self%20instVarAt%3A%20each%29%20asJSON%5D.%0A%09%5Evariables'),
752
+ messageSends: ["new", "do:", "allInstanceVariableNames", "class", "at:put:", "asJSON", "instVarAt:"],
753
+ referencedClasses: ["HashedCollection"]
752
754
  }),
753
755
  smalltalk.Object);
754
756
 
@@ -878,14 +880,13 @@ unescape('_asJSONString'),
878
880
  smalltalk.method({
879
881
  selector: unescape('asJSONString'),
880
882
  category: 'converting',
881
- fn: function () {
882
- var self = this;
883
- return smalltalk.send(smalltalk.JSON || JSON, "_stringify_", [self]);
884
- return self;
885
- },
883
+ fn: function (){
884
+ var self=this;
885
+ return smalltalk.send((smalltalk.JSON || JSON), "_stringify_", [smalltalk.send(self, "_asJSON", [])]);
886
+ return self;},
886
887
  args: [],
887
- source: unescape('asJSONString%0A%09%5EJSON%20stringify%3A%20self'),
888
- messageSends: ["stringify:"],
888
+ source: unescape('asJSONString%0A%09%5EJSON%20stringify%3A%20self%20asJSON'),
889
+ messageSends: ["stringify:", "asJSON"],
889
890
  referencedClasses: ["JSON"]
890
891
  }),
891
892
  smalltalk.Object);
@@ -2532,6 +2533,22 @@ referencedClasses: []
2532
2533
  }),
2533
2534
  smalltalk.Number);
2534
2535
 
2536
+ smalltalk.addMethod(
2537
+ unescape('_asJSON'),
2538
+ smalltalk.method({
2539
+ selector: unescape('asJSON'),
2540
+ category: 'converting',
2541
+ fn: function (){
2542
+ var self=this;
2543
+ return self;
2544
+ return self;},
2545
+ args: [],
2546
+ source: unescape('asJSON%0A%09%5Eself'),
2547
+ messageSends: [],
2548
+ referencedClasses: []
2549
+ }),
2550
+ smalltalk.Number);
2551
+
2535
2552
 
2536
2553
  smalltalk.addMethod(
2537
2554
  unescape('_pi'),
@@ -2794,6 +2811,22 @@ referencedClasses: []
2794
2811
  }),
2795
2812
  smalltalk.Boolean);
2796
2813
 
2814
+ smalltalk.addMethod(
2815
+ unescape('_asJSON'),
2816
+ smalltalk.method({
2817
+ selector: unescape('asJSON'),
2818
+ category: 'converting',
2819
+ fn: function (){
2820
+ var self=this;
2821
+ return self;
2822
+ return self;},
2823
+ args: [],
2824
+ source: unescape('asJSON%0A%09%5Eself'),
2825
+ messageSends: [],
2826
+ referencedClasses: []
2827
+ }),
2828
+ smalltalk.Boolean);
2829
+
2797
2830
 
2798
2831
 
2799
2832
  smalltalk.addClass('Date', smalltalk.Object, [], 'Kernel-Objects');
@@ -3690,6 +3723,22 @@ referencedClasses: ["ClassBuilder"]
3690
3723
  }),
3691
3724
  smalltalk.UndefinedObject);
3692
3725
 
3726
+ smalltalk.addMethod(
3727
+ unescape('_asJSON'),
3728
+ smalltalk.method({
3729
+ selector: unescape('asJSON'),
3730
+ category: 'converting',
3731
+ fn: function (){
3732
+ var self=this;
3733
+ return (typeof null == 'undefined' ? nil : null);
3734
+ return self;},
3735
+ args: [],
3736
+ source: unescape('asJSON%0A%09%5Enull'),
3737
+ messageSends: [],
3738
+ referencedClasses: []
3739
+ }),
3740
+ smalltalk.UndefinedObject);
3741
+
3693
3742
 
3694
3743
  smalltalk.addMethod(
3695
3744
  unescape('_new'),
@@ -4747,6 +4796,22 @@ referencedClasses: ["String"]
4747
4796
  }),
4748
4797
  smalltalk.Point);
4749
4798
 
4799
+ smalltalk.addMethod(
4800
+ unescape('_translateBy_'),
4801
+ smalltalk.method({
4802
+ selector: unescape('translateBy%3A'),
4803
+ category: 'transforming',
4804
+ fn: function (delta){
4805
+ var self=this;
4806
+ return smalltalk.send(((($receiver = smalltalk.send(delta, "_x", [])).klass === smalltalk.Number) ? $receiver +self['@x'] : smalltalk.send($receiver, "__plus", [self['@x']])), "__at", [((($receiver = smalltalk.send(delta, "_y", [])).klass === smalltalk.Number) ? $receiver +self['@y'] : smalltalk.send($receiver, "__plus", [self['@y']]))]);
4807
+ return self;},
4808
+ args: ["delta"],
4809
+ source: unescape('translateBy%3A%20delta%20%0A%09%22Answer%20a%20Point%20translated%20by%20delta%20%28an%20instance%20of%20Point%29.%22%0A%09%5E%28delta%20x%20+%20x%29%20@%20%28delta%20y%20+%20y%29'),
4810
+ messageSends: [unescape("@"), unescape("+"), "x", "y"],
4811
+ referencedClasses: []
4812
+ }),
4813
+ smalltalk.Point);
4814
+
4750
4815
 
4751
4816
  smalltalk.addMethod(
4752
4817
  unescape('_x_y_'),