How to export to the Simulator from BBEdit?

Hi,

I just started to learn how this whole thing works. I have a problem though. I can’t figure out how to export a file from BBEdit to the Simulator. Does anyone else who uses BBEdit know the answer?

EDIT: The Getting Started Guide skips this step. It just says to use BBEdit then says to run it using the Simulator.

Thanks,
vinay427 [import]uid: 1644 topic_id: 98 reply_id: 300098[/import]

Hi,
I use BBEdit as my editor when I’m working (am using it now in fact). BBEdit won’t export straight to the Simulator to my knowledge. When I’m using BBEdit, I just save my main.lua file somewhere easy to find and point the simulator to it. I believe BBEdit will send perl files straight to the terminal (been a while since I’ve used perl), but other than that, the Simulator and BBEdit don’t otherwise talk to each other.

Does that make sense?

Thanks for the reference to our Getting Started Guide. We will update it as soon as possible! [import]uid: 5 topic_id: 98 reply_id: 50[/import]

Well, actually, that didn’t really sense.

  1. How do you save a BBEdit file as .lua?
  2. Don’t you need other resources to run the app like pictures and music? Where do you put those?
  3. If you don’t use perl often what do you use?

Thanks about updating it! [import]uid: 1644 topic_id: 98 reply_id: 54[/import]

Sorry,

1… So, create a folder somewhere, say on your desktop and call it ‘project’ or some such. Save what your working on in bbedit to that location and just name it main.lua. Once its saved, the syntax highlighting (all the nifty colors) will start working. You can then run the simulator and point it to that folder. You don’t actually select the main.lua file with the simulator, just point it to that folder and hit open and it will run (assuming your code is good).

  1. Put all your assets in that folder, so pictures, sounds music, whatever. When you refer to it, say you have an image named ‘foo.png’, you just refer to it as such:

local image = display.newImage(“foo.png”, 0,0)

This will place your picture “foo.png” at the screen coordinates 0,0 (x,y).

  1. Mostly I’ve just been using lua lately. Haven’t really had a reason to play with perl. BBEdit is pretty good for html as well, though dreamweaver certainly has its advantages…

So, I highly reccomend that you use the terminal to launch the simulator as any errors in your code will get displayed there. This part may be a bit confusing, but once you’ve done it a few times it’ll make more sense. There’s a file in your Ansca folder that’s just called ‘simulator’ (don’t confuse this with the file ‘corona simulator’). You can literally just drag this to the terminal and hit return and it will launch. Then you point it to your directory as usual. [import]uid: 5 topic_id: 98 reply_id: 55[/import]

If I understand correctly, you open your .lua file twice:

  1. Run Corona Terminal, which will launch Corona Simulator, which will prompt you to open your .lua file, and then:

  2. Open the same .lua file in BBEdit and edit away. It looks like every time you hit ‘save’ in BBEdit, the Corona terminal & simulator windows automatically refresh.

(let me know if I’ve got this wrong; I’m brand-new to this sort of thing) [import]uid: 16015 topic_id: 98 reply_id: 16935[/import]

That is correct. [import]uid: 12108 topic_id: 98 reply_id: 16938[/import]