Bug 400865 - [enhancement] mixin type $me
Summary: [enhancement] mixin type $me
Status: NEW
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: VJET (show other bugs)
Version: unspecified   Edit
Hardware: PC Mac OS X
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Justin Early CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-02-14 19:28 EST by Justin Early CLA
Modified: 2017-04-11 15:12 EDT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Justin Early CLA 2013-02-14 19:28:51 EST
Support a mixed type and resolve the the mixer for $me placeholder

vjo.mtype('base')
.proto({
   //> public $me doWork() ; ***Note: $me is the placeholder type
   doWork: function() {
        return this ;
   }
})
.endType()

vjo.ctype('ABC')
.mixin('base')
.proto({
   other: function() { }
})
.endType() ;

var abc = new ABC() ;
var ret ;  //< ABC
ret = abc.doWork() ;  // ***Note: The mixed-in function doWork() returns type ABC