getting 'ObsoleteTrait' when adding a trait in a testCase - oop

I'm having a problem.
I'm using a code in a testCase
It starts like this
|mapeos obj myClass|
myClass := Smalltalk at: #ClaseForTesting.
myClass addToComposition: TraitPruebaCondicion1.
the #ClaseForTesting is an emptyClass
when smalltalk do
myClass addToComposition: TraitPruebaCondicion1
if I (Debugging) try to get the traits
myClass traits
I'm getting
an OrderedCollection(AnObsoleteTraitPruebaCondicion1)
why is adding AnObsolete in the string trait name?
If I run the same code in workspace, it works really fine.
Why is this happening? any ideas?
Please, its urgent :(

I can't believe that I was stuck with this a lot of time, and then when I FINALLY decided to ask to the people, I've solve it in two minutes. Shame on me. It must be some kind of mystical brainstorming with this site.
Anyway, the clue was to using
Smalltalk at: #
with the trait too! (I was only using it on the class)
so
myClass addToComposition:(Smalltalk at: #TraitPruebaCondicion1).
solve my problem.

Related

Java method not available in Kotlin?

I am using the ejml-library (written in Java) in a Kotlin project. I imported the library (everything seems to work fine) in IntelliJ. However, some methods which should be available (e.g. the inherited getDDRM() method of the class SimpleMatrix) are not recognized and I can't use them. Whats very weird is that the very same procedure used with Scala (also using IntelliJ) works. That is, in Scala I can access the method - with Kotlin I can't.
It would be great if someone could shed some light on this.
update:
the getDDRM() method is part of the abstract class "Class SimpleBase<T extends SimpleBase>" and has the following signature: "public DMatrixRMaj getDDRM()". In my code I call this method on an instance of class SimpleMatrix which is a concrete class inheriting the SimpleBaseClass –
I should also note that I rebuild it with gradle and the issue still persists.
IMPORTANT: I should add that I can access other methods defined in the very same class. For instance I can access the method getMatrix() which is just another method of the very same (abstract) class. In fact, IntelliJ's method completion shows me a whole list of methods - but the getDDRM() is missing. I really don't get the cause of this problem.
Update 2:
If it is of any help: When I do not use gradle but instead open a Kotlinproject in IntelliJ and add the libary jars manually then everything works fine. Can anyone explain this?
Thanks in advance!

References to a class just ported to Swift appear as forward class objects

I just ported a new class to Swift to overcome an issue with protocols I had encountered. Yet, after finally fixed all issues associating to the porting, all references to the methods of the class in other objective-c classes are reported as:
"Property ... cannot be found in forward class SwiftClass"
I found a few references to this problem on the web in which it seems the order of inclusion matters, but in all of my class the *-Header.h inclusion is the last one. What could be the problem and how to fix it?
In fact this time it was right even if the error reporting is sadistic. I had capitalized the class to adopt the Apple suggestion notation expecting the compiler to guide me in the renaming; instead all references to the old name, rather than reporting a normal error consequent to a missing class, reported that funny error taking very far away.
Yet now I get an even funnier error on the alloc operations:
No known class method for selector 'alloc'
... that weird component...!
This one is fixed by remembering to inherit from NSObject in the Swift class. In brief the lesson is to be absolutely not creative when porting classes to Swift, at least when not yet experienced, as the error messaging is misleading, to say the least.

RKObject subclassing

I've just started using RestKit, and got an issue when trying to create RKObject subclass; apparently, such class is not found, but this example http://mobile.tutsplus.com/tutorials/iphone/restkit_ios-sdk/ shows how to make it. I installed it and it seems to be working ok.
So I am wondering whether that class was removed and there is an alternative or am I doing something wrong here?
Yes, RKObject was removed. Here is an answer to the same question.

Incomplete Implementation and Missing Context for Method Decleration

I'm new to developing and I'm teaching myself based on tutorials online, and Stanford lectures on iTunesU (I'm only 15).
I'm having two problems with an email form I'm trying to implement into my app. I took a screenshot, here is the link to it: http://tinypic.com/r/2utq05c/5
I've tried everything and just can't seem to get it to work. Any help is GREATLY APPRECIATED.
Thank you.
See that #end line? That ends the class implementation. You can only implement methods within a class implementation—i.e., between the #implementation line and its corresponding #end.
That isn't the only syntax error in that file. You also haven't finished writing your email method, so the method that you have after it is technically within it. Methods can't go within methods, so that's another error. The solution to that one is simply to finish the email method.

How do you extend a C# interface in C++/CLR?

I'm really frustrated with this one. I'm trying to extend a C# created interface in C++/CLR. The interface has one method and I've declared it in my class, but the compiler keeps telling me that I must still provide an implementation for the interface method. What more can I do? What am I missing!?
Does anyone have any examples of how to extend a C# interface in CLR?
I figured it out! I needed to make the implementation of elements virtual. I hope this helps other people with this same issue.