Titanium Community Questions & Answer Archive

We felt that 6+ years of knowledge should not die so this is the Titanium Community Questions & Answer Archive

Scite4Titanium - source code editor with Titanium API cooltips & autocomplete

Hi,

Appcelerator's titanium currently does not come with a decent text editor or a programming IDE in which the API syntax is available. For me, finding the right API functions was a lot of try & error or copy/paste from the web.

Maybe you try SciTe.

Scite IS an excellent (free) cross platform text editor. Scite can be used on Intel Win32 and Linux compatible operating systems with GTK+. It has been run on Windows XP and on Fedora 12 and Ubuntu 9.10 with GTK+ 2.18.

My project implements appcelerator titanium programming calltips (mobile API) and autocomplete into the editor. In short: You type 'Ti'. Press CTRL SPACE. Get a popup with all Titanium mobile API (1.2.0) functions. Select one, this enters the phrase into the document. Press '(', and get a popup with all function parameters available, in addition a short function description.

You can look at some images and download the freeware package at

http://docs.google.com/View?id=dfrprrw7_19cvmjqkck

Comments welcome.

rudolf

— asked May 6th 2010 by Rudolf Bumm
  • editor
  • ide
  • javascript
  • mobile
  • scite
  • scite4titanium
  • titanium
1 Comment
  • I have added the API reference who starts by "Ti." in addition to the one who starts by "Titanium.". In this way, the autocompletion will work even with "Ti." base named functions.
    You can found it here : http://niffo.free.fr/titanium/scite

    In order to implement the 1.5 API, is there a place where we can found the differences between the 1.3 and 1.5 Titanium API ?

    — commented January 10th 2011 by Nicolas GRESSARD

18 Answers

  • Silly question…
    What is "STRG" on an U.S. keyboard? I thought it was CTRL but that (or Shift, Alt, or the typical combos) don't work in SciTE to call up the popup menu.

    Anyone know how to get the SciTE/Titanium popup menu to appear?

    — answered May 6th 2010 by John Lullie
    permalink
    0 Comments
  • Sry you are right.
    Changed. For the popups, please enter one or two chatacters and press control and space key simultanusly. The function is case-sensitive. If you need the titanium functions, please enter 'Ti' and the key combination from above.

    One more: it is essential to open a *.js file first with the editor OR, alternatively, select 'Javascript' from the editor's language menu.

    — answered May 6th 2010 by Rudolf Bumm
    permalink
    0 Comments
  • Ok, it works but only at the beginning of a line. For example:

    Ti(and then CTRL+SPACE) works here.

    but not…

    var Foo = Ti(no popup at all with CTRL+SPACE)

    — answered May 6th 2010 by John Lullie
    permalink
    0 Comments
  • Try to open a *.js file first …

    — answered May 6th 2010 by Rudolf Bumm
    permalink
    0 Comments
  • I am using a .js file. Tried two different .js files. No popup inline.

    — answered May 6th 2010 by John Lullie
    permalink
    0 Comments
  • @John,

    Ok you are right.

    (1) var db = Ti -> CTRL SPACE does not work, but

    (2) var db=Ti -> CTRL SPACE does.

    I try to find a solution. Maybe you can use (2) in between.

    Thanks for your feedback.

    — answered May 6th 2010 by Rudolf Bumm
    permalink
    0 Comments
  • @John and all,

    Version 1.1 is online.

    Please go to to SciTe4Titanium project page at

    http://docs.google.com/View?id=dfrprrw7_19cvmjqkck

    I made a small change. Now, you can call autocomplete within SciTe as intendend:

    var db = Ti -> CTRL SPACE

    In addition, I noticed that pressing CTRL RETURN calls up a different list with expression already used in the current text.

    Have fun.

    — answered May 6th 2010 by Rudolf Bumm
    permalink
    0 Comments
  • Hi all,

    Scite4Titanium Version 1.2 is online.

    Changes:

    It was adjusted that all the file views that are open during a working session are automatically saved and restored.
    Scite now 'remembers' all recently open files.
    In addition, a modification was made to let Scite restore it's last window position.

    Go to project page and grab the windows update.

    Have fun coding

    — answered May 7th 2010 by Rudolf Bumm
    permalink
    0 Comments
  • Scite is very fast. Loads in about 2 seconds even on lame ducks.
    Many hidden goodies such as

    Code folding: if enabled, you can fold away complete functions.

    Indentation guides: If enabled, scolling to '(' or '{' will show the corresponding ')' or '}'

    Never seen elsewhere:
    CTRL D: Duplicate a line quickly, and CTRL T: exchanges two lines quickly

    Buffers: Several text files can be opened simultanously and you can quickly change between them by the help of tabs or key commands

    Session save & restore. Scite exports to PDF.
    Line numbers and status window (line and column) if selected.

    — answered May 7th 2010 by Rudolf Bumm
    permalink
    0 Comments
  • Awesome! Thanks Rudolf! Will definately use this.

    — answered May 8th 2010 by John Lullie
    permalink
    0 Comments
  • is there a Mac version for this? I don't see one, but would like to try it out.

    — answered May 25th 2010 by vincent youmans
    permalink
    0 Comments
  • Sorry I have no Mac.

    There is a lot of information about MAC OSX and Scite on google, so there must be a way of get it running. If you have, you should probably copy (from the download) the API folder, scite.properties and titanium.properties to Scite homedir or whereever the current scite.properties is located.

    http://forums.macosxhints.com/archive/index.php/t-32096.html

    I will post a way to use the SCITE calltips with Ubuntu in some days.
    Anybody out there has Scite on a MAC ?

    BTW: Scite4Titanium is now compatible with mobile API 1.3 (see webpage)

    regards

    rudolf

    — answered May 27th 2010 by Rudolf Bumm
    permalink
    0 Comments
  • All,

    I have downloaded and built the latest version of scite on my MAC OS X (I had to modify 2 or 3 things in the makefiles and installed 3rd party packages with macport).
    I have configured the necessary files (global scite for importing titanium, titanium.properties I had to modify for some unix paths and finally the api directory).

    Completion on "(" and "." work like a charm BUT control+space does not work, instead I am using Control+i and completion works fine.

    Thanks

    Olivier

    — answered May 28th 2010 by Olivier Brand
    permalink
    0 Comments
  • Wow.
    Sounds great.
    In the windows download, please use the scite.properties, titanium.properties (two files) and the complete api folder. Should go in scite homedir or the respective user directory (as in ubuntu).

    Maybe you must only edit the MAC scite.properties file according to the one in the download. Maybe you must set the one or the other path in the properties files.
    Please keep us update on this.
    Thanks a lot !

    rudolf

    — answered May 28th 2010 by Rudolf Bumm
    permalink
    0 Comments
  • Olivier,

    If you have a working solution for MAC I would like to include it with your reference on the web page.

    Thank you
    rudolf

    — answered May 28th 2010 by Rudolf Bumm
    permalink
    0 Comments
  • I have added the API reference who starts by "Ti." in addition to the one who starts by "Titanium.". In this way, the autocompletion will work even with "Ti." base named functions. You can found it here : http://niffo.free.fr/titanium/scite
    In order to implement the 1.5 API, is there a place where we can found the differences between the 1.3 and 1.5 Titanium API ?

    — answered January 10th 2011 by Nicolas GRESSARD
    permalink
    0 Comments
  • I am using a .js file. Tried two different .js files. No popup inline.

    — answered May 6th 2010 by John Lullie
    permalink
    0 Comments
  • I am using a .js file. Tried two different .js files. No popup inline.

    — answered May 6th 2010 by John Lullie
    permalink
    0 Comments
The ownership of individual contributions to this community generated content is retained by the authors of their contributions.
All trademarks remain the property of the respective owner.