Quick Links: Download Gideros Studio | Gideros Documentation | Gideros community chat | DONATE
Will Code Completion be improved in the near future? — Gideros Forum

Will Code Completion be improved in the near future?

ondesicondesic Member
edited May 2012 in General questions
I just realized that the Gideros IDE doesn't give me all the options (properties) for my objects. For instance, if I create a bitmap:

local bitback = Bitmap.new(Texture.new("image.png"))

Next I want to set the position it will appear at. If I type "bitback" and then ":" the colon, no options come up. This led me to believe there were no properties/methods for a bitmap. However, by chance I noticed an example code that used "setPosition()" so I tried it:

bitback:setPosition(50,0)

and even though it never gave me the option for "setPosition()", it works.

Just learning Lua and Gideros, I can't possibly know all of the methods for a bitmap by memory. Even if I could, I couldn't spell everything correctly by memory. Is there hope that this will be addressed anytime soon?

Comments

  • evsevs Member
    I know auto complete isn't perfect, but I do get the setPosition option showing up (unfortunately with all the other stuff that won't work in this context)


    cheers

    evs
    SS.png
    340 x 231 - 16K
    SS.png 15.9K
  • That's one of the risks of making an IDE, there is that extra piece of code to work on along with the core framework. @evs has the API list available for use with SublimeText2, so for the meanwhile if you want, you could use that to get all of the autocomplete API list.

    Likes: phongtt

    twitter: @ozapps | http://www.oz-apps.com | http://howto.oz-apps.com | http://reviewme.oz-apps.com
    Author of Learn Lua for iOS Game Development from Apress ( http://www.apress.com/9781430246626 )
    Cool Vizify Profile at https://www.vizify.com/oz-apps
    +1 -1 (+1 / -0 )Share on Facebook
  • ondesicondesic Member
    Would that also work with object I create? Like in me example, would SublimeText recognize my variable "bitback"?
  • ar2rsawseenar2rsawseen Maintainer
    well it usually recognizes my defined variables and methods, it's just does not use any semantics, like does this method belongs to this object or not
  • ondesicondesic Member
    So once more I would ask, (specifically to those directly involved in creating Gideros) Is this something that is planned for improvement anytime soon?
  • atilimatilim Maintainer
    edited May 2012
    @ondesic uh.. most probably not. it's really hard to implement correct autocompletion for dynamic languages. Because the type of a value stored at a variable is defined only at runtime. I don't have much information but afaik static analyzers can fail to detect the correct type for many cases.

    Therefore we provide only a static list of autocomplete keywords so that developers can type less.
  • Darn, I am sad to hear that. Unfortunetely all the environments I have worked with have had an editor with good code completion. I am looking at Monkey right now (they have a great editor called Jungle IDE with good code completion). I would subscribe to gideros in a heart beat if there was an IDE that solved this problem for me. I am aware that to some developers it's not a big deal. For me it is paramount.
  • evsevs Member
    @ondesic

    Install this:

    http://www.eclipse.org/koneki/ldt/

    and add this:

    http://benjamin-cabe.com/koneki/execution-environments/gideros.zip

    by doing - Preferences (Lua > Execution Environments > add > gideros.zip)

    and your dreams will come true ...

    cheers

    evs
    KonekiLDT.png
    1794 x 1073 - 187K

    Likes: atilim

    +1 -1 (+1 / -0 )Share on Facebook
  • So, I just install the above and we will have world peace?
    I'll try it out. Thanks

    Likes: gorkem, kartben

    +1 -1 (+2 / -0 )Share on Facebook
  • I have everything installed, however, how do I run my code? I have windows 7.
  • evsevs Member
    @onedesic

    I've written a little vbscript, much like my applescript, that can run code via Gideros Studio (which is used as just an intermediary and console output) on the Gideros Player (either on device or windows).

    I have attached the script (remove the .txt from filename) as well as pics of the setup and how my External Tools Configuration is set.

    Note: It works by running the most recent project in studio, so make sure you have LDT and Gideros pointing at the same thing, so that they are in sync!

    HTH

    cheers

    evs
    txt
    txt
    Gideros.vbs.txt
    828B
    Layout.png
    1680 x 1050 - 222K
    Setup.png
    611 x 689 - 62K
  • Hi evs,
    I just tried this but receive an error.
    "CreateProcess error=216, This version of %1 is not compatible with the version of Windows you're running. Check your computer's system information to see whether you need a x86 (32-bit) or x64 (64-bit) version of the program, and then contact the software publisher"

    I have a 64bit system. Do I need a 64bit version of this script?
  • evsevs Member
    @ondesic

    Try this (I can't test it myself)

    In External Tools change location from

    c:\Windows\System32\cscript.exe

    to

    c:\Windows\SysWoW64\cscript.exe


    cheers

    evs
  • Evs,
    Thanks for responding. It's still a no go. It tells me the exe is not compatible with my system.
  • evsevs Member
    edited June 2012
    @ondesic does it work if you start Gideros Studio etc manually and use a simplified script like
     
    Set objShell = CreateObject("WScript.Shell")
     
    objShell.AppActivate (" - Gideros")	' get focus for sendkeys
     
    objShell.SendKeys"^(r)"
    I believe the problem is that Gideros is a 32bit app which requires the 32bit Cmd.exe to
    run it from the command line (It's done automagically in the GUI) - not sure

    Still try the above

    cheers

    evs
  • evs,

    I couldn't get it to work. What I decided to do is :
    1)create a project in eclipse.
    2)create a project in Gideros.
    3)move all Gideros files to the new eclipse project folder I just created.
    4)open the project in Gideros but from the new eclipse location.
    5)open the main.lua in eclipse.

    Basically I edit the code in eclipse, save it, and press RUN from Gideros.
    Presto, the updated code runs. Ridiculous, but it works.

    Thanks.
  • evsevs Member
    edited June 2012
    In another thread


    These will be definitely implemented at the next version:

    - command line tools to export projects and control the player
    - AsyncLoader class to load textures at background thread
    - AlertBox and TextInput native UI classes (for all platforms)
    - LuaFileSystem plugin

    And most probably:
    - In-app Billing for Android

    Also there will be a couple of bugfixes and some small additions.
    So integration should be much easier


    cheers

    evs
  • gorkemgorkem Maintainer
    Yes, Koneki for example is a good candidate ;-)

    Likes: kartben

    +1 -1 (+1 / -0 )Share on Facebook
  • Ok, so here is where I am with this. After no luck, I installed the 32 bit version of LDT
    (I was using the Eclipse 64bit add on before, which gave me autocomplete, but no launching).
    Now using your script it works. The problem is, I now get no autocomplete whatsoever.

    Here is what I did:
    1) I downloaded the LDT file and unzipped it.
    2) I downloaded Gideros.zip (from benjamin-cabe.com)
    3) I opened LDT and did Preferences>Lua > Execution Environments > add > gideros.zip

    Finally, I created a new Lua Project in LDT named "Simple". I selected "gideros-2.2.1" as the Execution Environment. Then I created a new file in the Simple project called "main.lua"

    I opened main.lua I started to type, but cannot get any code completion.
    Is there an obvious mistake I have made?

  • Just figured it out. I need to manually go to Build Path and add gideros.zip as a library
  • For any of you using LDT, how do you create a new project? Do you create on in LDT first? Doing so creates a "src" folder which I suppose you have to the make a matching project in Gideros Studio, and save it in the LDT "src" folder?
  • talistalis Guru
    edited July 2012
    Edit: Ok nevermind about the question:D I just realized that this ss(screenshot) is not from gideros ide. So another lesson for me dont reply a topic without reading all.
    :)

    @evs maybe it is a noob question but can you please tell me how did you edit the colors in the gideros studio ide?
    I mean background is black and syntax highligting colors are also different. I couldn't find it because.
    I even asked before in this thread but no answers:)
    http://www.giderosmobile.com/forum/discussion/1334/gideros-studio-ui#Item_5

  • I opened main.lua I started to type, but cannot get any code completion.
    Is there an obvious mistake I have made?
    Did you create the project before or after setting up the Gideros Execution Environment? The project needs to be associated with the EE, and it is usually easier to do this at project creation time (in the creation wizard).
    Eclipse Koneki project lead | http://www.eclipse.org/koneki
Sign In or Register to comment.