Forums

Search found 35 matches: mixin

Return to advanced search

Re: RFC for suggestion: setting access rights to added mixin

... (or struct), so they become protected and private members of what they are added to. There is currently no way to make a member private to the mixin. We can leave that as is or try to address it. As you use mixins, keep sharing whatever issues you run into.
by Charles
Wed Nov 07, 2012 11:17 am
 
Forum: Discussion
Topic: RFC for suggestion: setting access rights to added mixins
Replies: 3
Views: 13322

Re: support for namespace enclosed mixin?

Just for the record in case someone finds this thread, this problem was fixed some time ago and is covered by the test suite. I just didn't respond to this message.
by Charles
Wed Nov 07, 2012 10:36 am
 
Forum: Discussion
Topic: support for namespace enclosed mixin?
Replies: 1
Views: 8048

Re: Decorator idea

... cases. I'd prefer a specific keyword introduction syntax for it rather than an addition to is-names. We've already chosen that path with mixin syntax ( adds ) - having this doesnt preclude an inheritance clause as well ( ... inherits ... decorates .... ) - currently I see is-names as ...
by hopscc
Wed Nov 07, 2012 5:40 am
 
Forum: Discussion
Topic: Decorator idea
Replies: 12
Views: 27169

Re: RFC for suggestion: setting access rights to added mixin

"is protected" This almost works: mixin A def one as int return 1 def two as int is protected return 2 class B adds A def foo trace .one trace .two class P def main b = B() b.foo b.one # b.two I had to comment out the last line ...
by Charles
Tue Nov 06, 2012 11:47 am
 
Forum: Discussion
Topic: RFC for suggestion: setting access rights to added mixins
Replies: 3
Views: 13322

RFC for suggestion: setting access rights to added mixins

Hi, I have a class, that adds a mixin. I would like to hide a few of the mixin public members/methods so as to only use them internally, but have them be invisible (private) to the outside consumer. (the hiding happens in the class, doesn't ...
by kobi7
Tue Nov 06, 2012 12:55 am
 
Forum: Discussion
Topic: RFC for suggestion: setting access rights to added mixins
Replies: 3
Views: 13322

Re: mixins: problem with variables?

... thanks for the quick fix. That's enough to help me move forward. For the record, local variables still cause problems if within other blocks. e.g. mixin MyCode def hi myvar = 0 if myvar < 10 inner = 2 print "a [inner]" else print "b" mixin.cobra(3): warning: The value of variable ...
by callisto
Sun Nov 13, 2011 3:48 am
 
Forum: Discussion
Topic: mixins: problem with variables?
Replies: 4
Views: 10300

mixins: problem with variables?

Hi, I have started to look at mixins. What I am aiming to do is add some implemented methods and perhaps state to a couple of otherwise independent classes. I've hit a problem, which suggests it is not possible to define local variables ...
by callisto
Fri Nov 11, 2011 3:12 pm
 
Forum: Discussion
Topic: mixins: problem with variables?
Replies: 4
Views: 10300

Re: Mixins

A partial class is just a class that is split up into multiple files. A mixin can be mixed into many classes similar to an interface which can be implemented by many classes.
by helium
Sat Jan 30, 2010 12:18 pm
 
Forum: Discussion
Topic: Mixins
Replies: 12
Views: 49016

Re: generic mixin

I missed the wiki page, sorry about that.

So I updated it to state theses limitations, I'm going to work arround theses in my code :)
by gauthier
Tue Nov 03, 2009 4:38 pm
 
Forum: Discussion
Topic: generic mixin
Replies: 2
Views: 11608

Re: generic mixin

As you've discovered, the mixin support is incomplete. Some of this is documented at the mix-in wiki page. Nevertheless, thanks for the reports.

I probably won't get to this soon as there are a number of small items and patches I'll attend to first.
by Charles
Mon Nov 02, 2009 10:15 pm
 
Forum: Discussion
Topic: generic mixin
Replies: 2
Views: 11608
PreviousNext

Return to advanced search

cron