|
Hi, I'm a python lover, so I'm trying to get started in Boo, but the compiler fails saying among other things that "GetClickedGameObject is not a member of class ClickEnterGUI". It's also complaining that GUIManager, Fader and OrtographicZoomer are unknown identifyers (they are behaviors defined in C#). Can someone give me a hand with this, please?
(comments are locked)
|
|
In actual Python you'd have to declare your method as def GetClickedGameObject(self): I LOVE Python more than any human alive. Boo is different enough I think it's a horrible language to use. Very inconsistent. I love python as well, and even if its true about Boo's problems, still being able to use some python idioms will be a relief while coding this stuff. OTOH, this does not answer my question at all...
May 17 '11 at 08:06 PM
Lacrymology
Do you need to use self.GetClickedGameObject() if 'self' is not required while declaring the method? I'm not on a Unity-friendly machine at the moment so I can't try it.
May 17 '11 at 08:08 PM
flaviusxvii
Boo isn't inconsistent or a horrible language. Boo is just a different language from Python. In Python, you can apply methods of one class to instances of another class, as a result of that syntax. In .NET CIL, that's not possible, which is why Boo instead makes 'self' a keyword meaning 'this'. It preserves the style of Python while unfortunately not being able to provide the same functionality.
Dec 05 '11 at 12:52 AM
ironmagma
(comments are locked)
|
|
Do you need to do some "import" statements to get access to the other C# stuff? Did you mean to spell OrtographicZoomer as OrthographicZoomer? (note the "h") I'm not a Boo user, but these are the things I see that are suspicious. I thought of this as well. The compiler complains at the import as well, I might be missing the path, but I'm not sure about this.
May 17 '11 at 08:07 PM
Lacrymology
Hmm... tricky. If I think of anything else, I'll update my answer and leave another comment so your mail icon turns blue. :)
May 17 '11 at 08:25 PM
almo
(comments are locked)
|
You don't need "self."; just leave it out. "
See here. While you don't need "self" in this instance, the keyword adds clarity to your code, and you should use it so other people (and you) know what you're doing when you call GetClickedGameObject().
Dec 05 '11 at 12:49 AM
ironmagma
(comments are locked)
|
|
Check your whitespace. Make sure that whatever form of spacing (spaces vs. tabs) that precedes your methods is the same for the whole document. Boo has a bug where it will not notify you if it encounters weird whitespace, and this sounds like the kind of problem that arises from that bug. I have notified the creator of Boo about it, but there is yet to be a patch for it.
(comments are locked)
|
