Using NetRexx Eclipse Plugin with Android.

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Using NetRexx Eclipse Plugin with Android.

Jason Monroe Martin
I have been using the Eclipse NetRexx Plugin for a few weeks for Android
development. Before the update today to 2.05, I used a modified Run
Configuration. I did a duplicate of the NetRexxCompile one and modified
it to my liking (Under Run > Run Configurations >) . I have not tested
the latest update but the only problem I did have was trying to break up
a really, really long string that had some mixed code (tokens) in it
using the continuation character to make the code readable.  It caused
an Exception and got confused. I just closed the editor and reopened it.

Some notes for people starting with the Android SDK that helped me.

1) Start with the lowest API if you plan to have the App available for
many API's.

     If you don't, you just have to go back and remove or redesign some
feature that was added later.

2) At a certain API you can handle clicks and events in the XML (No
extra coding for you, just one NetRexx Method in your code for that click.

3) Using Null in some places helps on some callbacks :

     
AlertDialog.Builder(this).setTitle(R.string.txt_alert_title).setMessage(R.string.txt_warn_01).setNeutralButton(R.string.txt_ok,
Null).show()

     I did not really need a method to do anything, just pop up the message.

4) Also note in the above line.

     All strings are stored in strings.xml and called from the R.java
that is generated automatically. Easy translation for you.

5) I turn off automatic build when I do the the NetRexx Run As. When it
is finished I rename java.keep's and turn it back on. I am using old
NetRexx version currently. (There is probably a better way!)

6) Before you ship the final product. Clean, Compile, remove the nrx
files in the src directory, and Compile the java code without them. They
are not really needed and anyone can extract your code.

Like Kermit's IDE the plugin is great. (Sorry Bill, I wanted to test the
Run As solution awhile before I said anything.)

Extra example method of Button clicks.

   method onClick(v=View)

     select case v.getId()

         when R.id.button1 then this.somemethod(v)

         when R.id.button2 then this.calculate(v)

         when R.id.button3 then this.onReset(v)

         otherwise
             nop
     end
_______________________________________________
Ibm-netrexx mailing list
[hidden email]
Online Archive : http://ibm-netrexx.215625.n3.nabble.com/

Reply | Threaded
Open this post in threaded view
|

Re: Using NetRexx Eclipse Plugin with Android.

billfen
Jason,

I am just in the process of updating the download site again - There was
an inadvertent bug that I missed when a jar file is specified on the
classpath.  The problem should be fixed within a relatively short time
in version 2.0.6.  Sorry about that - continue to use your modified Run
Config and do not use the Classpath preference page.

Thanks for the suggestions regarding Android - I may try to develop an
example which can be contributed.

Bill

On 10/26/2011 4:58 PM, Jason Monroe Martin wrote:

> I have been using the Eclipse NetRexx Plugin for a few weeks for
> Android development. Before the update today to 2.05, I used a
> modified Run Configuration. I did a duplicate of the NetRexxCompile
> one and modified it to my liking (Under Run > Run Configurations >) .
> I have not tested the latest update but the only problem I did have
> was trying to break up a really, really long string that had some
> mixed code (tokens) in it using the continuation character to make the
> code readable.  It caused an Exception and got confused. I just closed
> the editor and reopened it.
>
> Some notes for people starting with the Android SDK that helped me.
>
> 1) Start with the lowest API if you plan to have the App available for
> many API's.
>
>     If you don't, you just have to go back and remove or redesign some
> feature that was added later.
>
> 2) At a certain API you can handle clicks and events in the XML (No
> extra coding for you, just one NetRexx Method in your code for that
> click.
>
> 3) Using Null in some places helps on some callbacks :
>
>    
> AlertDialog.Builder(this).setTitle(R.string.txt_alert_title).setMessage(R.string.txt_warn_01).setNeutralButton(R.string.txt_ok,
> Null).show()
>
>     I did not really need a method to do anything, just pop up the
> message.
>
> 4) Also note in the above line.
>
>     All strings are stored in strings.xml and called from the R.java
> that is generated automatically. Easy translation for you.
>
> 5) I turn off automatic build when I do the the NetRexx Run As. When
> it is finished I rename java.keep's and turn it back on. I am using
> old NetRexx version currently. (There is probably a better way!)
>
> 6) Before you ship the final product. Clean, Compile, remove the nrx
> files in the src directory, and Compile the java code without them.
> They are not really needed and anyone can extract your code.
>
> Like Kermit's IDE the plugin is great. (Sorry Bill, I wanted to test
> the Run As solution awhile before I said anything.)
>
> Extra example method of Button clicks.
>
>   method onClick(v=View)
>
>     select case v.getId()
>
>         when R.id.button1 then this.somemethod(v)
>
>         when R.id.button2 then this.calculate(v)
>
>         when R.id.button3 then this.onReset(v)
>
>         otherwise
>             nop
>     end

_______________________________________________
Ibm-netrexx mailing list
[hidden email]
Online Archive : http://ibm-netrexx.215625.n3.nabble.com/