which version of eclipse should i download?

Monkey Targets Forums/Android/which version of eclipse should i download?

c.k.(Posted 2012) [#1]
The eclipse web site has a lot of different versions (see http://www.eclipse.org/downloads/ ). Which one should I get?


FelipeA(Posted 2012) [#2]
For developing for Android I downloaded the classic version.
I would recommend netbeans though.


c.k.(Posted 2012) [#3]
OK, ilovepixel, which Netbeans bundle? :-)

http://dlc.sun.com.edgesuite.net/netbeans/7.2/beta/


therevills(Posted 2012) [#4]
Are you planning on coding in Java? If so, I prefer Eclipse ;)

http://www.eclipse.org/downloads/moreinfo/compare.php

You don't need Eclipse or Netbeans if you are just using Monkey...


c.k.(Posted 2012) [#5]
therevills, what if I want to integrate external APIs that aren't yet available to Monkey?

Thanks for the info... :-)


therevills(Posted 2012) [#6]
You can code them just using Notepad++, that's what I used for Diddy ;)


c.k.(Posted 2012) [#7]
I also want to integrate something like Scoreloop into my final product. Doesn't that require I have a Java IDE?


therevills(Posted 2012) [#8]
An IDE will only make your development easier and quicker - as long as you know how to use the IDE ;)

I don't know Scoreloop, but I guess its just a set of APIs which you can just include and code with Notepad++ or you could use an IDE.


c.k.(Posted 2012) [#9]
So, you're saying once monkey spits out the Java for the Android platform, I can modify it in my chosen editor and incorporate Scoreloop that way.

Ahhhh!

Thanks! :-)

Or is there some way to program the use of Scoreloop in the monkey code?


therevills(Posted 2012) [#10]
Both ;)

Check out how Diddy accesses external functions which you can then access with Monkey.


c.k.(Posted 2012) [#11]
Ultimately, that's what I'd like to use: a monkey interface to _Your-Favorite-External-Code-Lib-Here_.


therevills(Posted 2012) [#12]
Then your best exposing the external code, as if you edit the compiled Monkey code, then next time you compile in Monkey you will lose your changes.

You need to wrap the external code functions and then tell Monkey about them.

Diddy does it this way:
Monkey code:
[monkeycode]Import "native/diddy.${TARGET}.${LANG}"

Extern
#If LANG="cpp" Then
Function RealMillisecs:Int() = "diddy::systemMillisecs"
#Else
Function RealMillisecs:Int() = "diddy.systemMillisecs"
#End
[/monkeycode]

Then in the native code:
Java:
class diddy
{
	static int systemMillisecs()
	{
		int ms = (int)System.currentTimeMillis();
		return ms;
	}
}

C++
#include <time.h>
#include <Shellapi.h>

class diddy
{
	public:

	// only accurate to 1 second 
	static int systemMillisecs() {
		time_t seconds;
		seconds = time (NULL);
		return seconds * 1000;
	}
}


So now in Monkey we can call "RealMillisecs" which calls the native function "systemMillisecs".


c.k.(Posted 2012) [#13]
Thanks, Steve! I get to study some diddy source...


therevills(Posted 2012) [#14]
And if you want you can do it the "Mojo" way:

MonkeyCode:
[monkeycode]Strict

Import "ExternTest.${TARGET}.${LANG}"

Extern

Class ExternStuff = "ExternCommands"
Method GetAnInt:Int()
End

Public

Class InternalAccess extends ExternStuff

End

Function Main:Int()
Print "Starting..."
Local internalAccess:InternalAccess = New InternalAccess()
Local externalAccess:ExternStuff = New ExternStuff()

Print internalAccess.GetAnInt()
Print externalAccess.GetAnInt()

Return 0
End[/monkeycode]

And within the same folder as your monkey file:
ExternTest.html5.js
// ExternCommands Class

function ExternCommands() {
	this.anInt = 5;
}

ExternCommands.prototype.GetAnInt=function(){
	return this.anInt;
}


ExternTest.android.java
class ExternCommands {
	int anInt;
	
	public ExternCommands() {
		anInt = 5;
	}
	public int GetAnInt() {
		return anInt;
	}
}


ExternTest.flash.as
class ExternCommands {
	internal var anInt:int;
	
	function ExternCommands() {
		anInt = 5;
	}
	
	internal function GetAnInt():int {
		return anInt;
	}
}


ExternTest.glfw.cpp
class ExternCommands
{
public:
	ExternCommands();
	
	int GetAnInt();
	
private:
	int anInt;
};

ExternCommands::ExternCommands()
{
	anInt = 5;
}

int ExternCommands::GetAnInt()
{
	return anInt;
}


Edit: Opps, forgot about XNA, but you get the picture ;)