forums

TNT Basic Forums > TNT Basic - The Open Source Edition
tbEdit-> code editor
< Last Thread     Next Thread >
Author
Thread        Post A Reply

10-06-2006 14:43

Posted by:
appleide

Click Here to Email appleide   Find more posts by appleide

geocities.com/appleide/tbEdit.zip Application
geocities.com/appleide/TNTGUI.rb.zip Source


Tool for my personal use. Organises my project into procedures, and emulate the OOP approach.

Cons:
Takes 30 seconds on a Macbook to load an 800 line project.

Released under GPL
http://www.gnu.org/licenses/gpl.txt

If I cannot name it "tbEdit", I will rename it immediately. (although tntbasic is under gpl...so...)

How to use:
Open up your .tbproj as a folder, go to the folder Basc and open that file within with tbEdit, and edit it. (although I recommend backing it up first... as I am not quite sure this is completely bugfree)

Screenshot:

10-06-2006 23:06

Posted by:
appleide

Click Here to Email appleide   Find more posts by appleide

TODO:
Add support for comments outside of procedures
More text editor features. (eg. Undo.)
Colour code.

10-07-2006 14:00

Posted by:
appleide

Click Here to Email appleide   Find more posts by appleide

TODO:
Add support for comments outside of procedures -completed
More text editor features. (eg. Undo.)
Colour code.
Save Load, In addition to export/import already in place.
open recent

HOWEVER:

Comments inside procedures cannot be on their own line, else your file will become bulkier and bulkier as you import and export. (no save load yet... exports and imports to textfiles.)

Click the link to the application to download. I will not update the source for now.

10-07-2006 14:01

Posted by:
appleide

Click Here to Email appleide   Find more posts by appleide

btw, Importing takes less than 20 seconds, and exporting is an instant now.

10-07-2006 14:08

Posted by:
appleide

Click Here to Email appleide   Find more posts by appleide

>>>>>
HOWEVER:

Comments inside procedures cannot be on their own line, else your file will become bulkier and bulkier as you import and export. (no save load yet... exports and imports to textfiles.
>>>>>


Work around: Put a space or a tab before the quote. (But I forgot to allow tabs in the text field.... doh!)

10-07-2006 14:10

Posted by:
appleide

Click Here to Email appleide   Find more posts by appleide

...
I will do it for the next release.

Mean while:

added to TODO list:
Automatically extract the code file from .tbproj

10-07-2006 14:33

Posted by:
appleide

Click Here to Email appleide   Find more posts by appleide

... In admiring how much this helps me programming my RTS... its pulling my interest into making this as well...

I'd better stop soon.

But mean while, I thought of another thing to add to TODO:

new command "add type of item". Creates templates for objects in games, using each array as property... and blablabla... you get the rest.

10-08-2006 10:27

Posted by:
appleide

Click Here to Email appleide   Find more posts by appleide

Undo is implemented.

10-08-2006 15:20

Posted by:
Jacob

Location:
San Francisco, CA

Click Here to Email Jacob   Find more posts by Jacob

In the procedures list you don't need to write 'procedure' every time.

10-08-2006 18:19

Posted by:
swagIT

Location:
Great Wet North (Vancouver)

Find more posts by swagIT

the app link doesn't seem to work =(

10-09-2006 00:59

Posted by:
Mark Tully

Location:
TNT HQ, England

Click Here to Email Mark Tully   Find more posts by Mark Tully

If you're interested in implementing colour coding / syntax highlighting, check out the tbformat tool that's part of the open source release of tnt basic. You run a text file of tnt basic code through it and it syntax highlights it for you. Feel free to incorporate the source code directly into your program.

Mark

10-09-2006 02:59

Posted by:
appleide

Click Here to Email appleide   Find more posts by appleide

>>
the app link doesn't seem to work =(
>>
I only get 4.2 mb of bandwidth every hour, so try again later.

10-09-2006 03:00

Posted by:
appleide

Click Here to Email appleide   Find more posts by appleide

>>
If you're interested in implementing colour coding / syntax highlighting, check out the tbformat tool that's part of the open source release of tnt basic. You run a text file of tnt basic code through it and it syntax highlights it for you. Feel free to incorporate the source code directly into your program.

Mark
>>
Thanks. I will look into it.

10-09-2006 03:01

Posted by:
appleide

Click Here to Email appleide   Find more posts by appleide

>>
In the procedures list you don't need to write 'procedure' every time.
>>
Comments are also placed in the same list. That was an old screenshot before I got comments in.

10-09-2006 03:55

Posted by:
appleide

Click Here to Email appleide   Find more posts by appleide

UPDATE!!!
You can now run the project from this app!

10-09-2006 14:01

Posted by:
someone

Location:
Quebec ( Canada )

Click Here to Email someone   Find more posts by someone

"You can now run the project from this app!"

How did you do it? I'd be interested in learning a bit how it works... (i think i hae a fairly good idea how it works but i never tried so...)

10-10-2006 00:07

Posted by:
Jacob

Location:
San Francisco, CA

Click Here to Email Jacob   Find more posts by Jacob

Broken Link

The link doesn't work because it needs a 'http://www.' before it.
When you click on it you get this:
http://tntbasic.com/community/forums/geocities.com/appleide/tbEdit.zip
Just use this for the app:
http://www.geocities.com/appleide/tbEdit.zip

10-10-2006 02:09

Posted by:
appleide

Click Here to Email appleide   Find more posts by appleide

>>
"You can now run the project from this app!"

How did you do it? I'd be interested in learning a bit how it works... (i think i hae a fairly good idea how it works but i never tried so...)
>>

It needs the alias of TNT Basic in the same folder.

When press "Run", TNT Basic Launches.

Then tbEdit saves, and sends a message to TNT Basic "Open the .tbproject here".

Sometimes it fails because TNT Basic launches too slowly, so press Run again and it should work.

>>
Just use this for the app:
http://www.geocities.com/appleide/tbEdit.zip
>>

Thanks very much!!

10-10-2006 02:10

Posted by:
appleide

Click Here to Email appleide   Find more posts by appleide

It also means I don't need to do a debugger, because TNT basic as one already.

Theoretically I could put a "debug" command in the app. When activated, it adds an "end" line on the first line, then sends it to TNT Basic, which will check the code before running it. hehehe.

10-10-2006 08:59

Posted by:
appleide

Click Here to Email appleide   Find more posts by appleide

Umm, updated it so that even if you computer is too slow to launch TNTbasic, the app will keep retrying to contact TNTBasic..


This also means no error message


No error message, and constantly retrying means that if you dont have an alias to "TNT Basic" in the same folder, it would result in a "Stackoverflow", crashing the application.

10-10-2006 14:45

Posted by:
someone

Location:
Quebec ( Canada )

Click Here to Email someone   Find more posts by someone

>
It needs the alias of TNT Basic in the same folder.

When press "Run", TNT Basic Launches.

Then tbEdit saves, and sends a message to TNT Basic "Open the .tbproject here".

Sometimes it fails because TNT Basic launches too slowly, so press Run again and it should work.
>

No, i didn't mean with your app, i meant the programmatical bit of it... What is this message it sends to TNT? open TNTBasic.app /user/foo/project.tbproj or something like that?

10-11-2006 01:57

Posted by:
appleide

Click Here to Email appleide   Find more posts by appleide

>>> When user clicks run>>>
dim f as folderItem

dim doc as folderItem
SaveFile Title, False
doc=getfolderItem(app.tbprojpath)
f=getFolderItem("TNT Basic")

f.launch False

RevealInFinder (doc) '''Links to a procedure
>>>>>>>>>>>>>>>>>>>

>>>>>>> RevealInFinder >>>>>>>>>>>>
Dim ae as AppleEvent
Dim obj as AppleEventDescList
'
'// tell TNT Basic to come to the front (actv)=activate
ae = NewAppleEvent( "misc" , "actv" , "TNTb" )
if not ae.send then
'beep
end if
'
// tell TNT basic to open the document (odoc)=open document
ae = NewAppleEvent( "aevt" , "odoc" , "TNTb" )
obj=New AppleEventDescList
obj.AppendFolderItem f
ae.DesclistParam( "----" ) = obj
>>>>>>>>>>>>>>>>>>>



Umm, its in realbasic... so...
But it uses Appleevents. (search on google), to talk to other applications. I assume you can do this in other apps too. Appleevent, I think, is not just in realbasic, but is used within the OS itself to communicate with everything.

10-11-2006 14:03

Posted by:
someone

Location:
Quebec ( Canada )

Click Here to Email someone   Find more posts by someone

oooh, AppleScript, i see... i'm sure you can do that from other languages, i just don't know how. Thanks for saying, anyway

10-11-2006 23:45

Posted by:
appleide

Click Here to Email appleide   Find more posts by appleide

its not apple script... = =...

its BASIC, calling upon "Apple Events".

10-13-2006 01:46

Posted by:
appleide

Click Here to Email appleide   Find more posts by appleide

http://www.geocities.com/appleide/tbEdit.zip

Umm, Find and Replace window implemented.

It seems development has slowed because I am now only implementing features as I need them, while developing my own game.

10-18-2006 10:21

Posted by:
appleide

Click Here to Email appleide   Find more posts by appleide

DIRECT SAVE AND LOAD IS HERE!!!

Which means, NO LOADING TIME!!!

This can (loading), however be done only on a TNT basic project.

But of course, you can make a file and then save as "local", then get hierogryph to make a .tbproj folder and put your files in there and open it... >.>

I want to make it able to create my own .tbproj with tbedit with the right folders next...

(this seems to be growing towards to being a direct clone... Though I am definitely sure I will be stopped by the map bits...)

www.geocities.com/appleide/tbedit.zip CARBON
www.geocities.com/appleide/tbeditOS9.zip CLASSIC
www.geocities.com/appleide/TNTGUI.rb.zip SOURCE

10-18-2006 10:24

Posted by:
appleide

Click Here to Email appleide   Find more posts by appleide

... I just realised broke Hierogryph compatibility when you do the direct save and load...

apprarently hierogryph does not tolerate extra folders in the .tbproj...

however, you can always take out the folder created in the "basc" folder in the .tbproj to fix it.

but it still works with TNT basic.

10-18-2006 10:26

Posted by:
appleide

Click Here to Email appleide   Find more posts by appleide

Also there is handful of bugs... I recommend against downloading for now...

(yes, you're right, I hacked the new ability into my app...)

10-18-2006 12:46

Posted by:
appleide

Click Here to Email appleide   Find more posts by appleide

umm, fixed the bugs that I can see... but still incompatible with hieroglyph with the direct save/load.

10-18-2006 12:47

Posted by:
appleide

Click Here to Email appleide   Find more posts by appleide

still one more bug.. actually. forgot about that one. (also to do with direct save/load)

10-18-2006 12:56

Posted by:
appleide

Click Here to Email appleide   Find more posts by appleide

SQUASHED! Go download the latest version at the named sites.

Note... Still in development, don't use this for something you can't be bothered to backup

10-18-2006 13:01

Posted by:
appleide

Click Here to Email appleide   Find more posts by appleide

Does not break incompatibility...

It was just that I forgot I had been messing around with Hieroglyphs files... I downloaded TNT Basic again and it -seems- fine

10-20-2006 10:30

Posted by:
appleide

Click Here to Email appleide   Find more posts by appleide

New release.

First Changelog:
Undo Enhancement
The Hack is nolonger a "hack"
Can now have comments on their own lines in procedures if you used the save and loading into .tbproj. NOT import/export to textfile.

I would call this a stable release RC1 before I try any of the more complex stuff (i.e coloring text and using mac resource)... if only I got some testers

10-20-2006 20:03

Posted by:
swagIT

Location:
Great Wet North (Vancouver)

Find more posts by swagIT

I'll give it a try over the weekend

=)

10-22-2006 09:29

Posted by:
appleide

Click Here to Email appleide   Find more posts by appleide

... Thz...


I need a way to modify the data files that stores the information of imagebanks... When I open with textedit I get gibberish... What exactly is stored inside?

(Once I find out... I can make a Complete hieroglyph replacement less the compiler... hehehe.... )

10-22-2006 10:03

Posted by:
appleide

Click Here to Email appleide   Find more posts by appleide

New Release.
The same as last release... But bundled with some new things.
"RapidTE"

A Feature Less text editor with no features.
Saves as TEXT, not "Plain text document"

Also has a readme.

Source code for tbEdit is bundled as well.

It's now a 2.5 mb download.

My website has only bandwidth of 4mb per hour... so...

10-22-2006 10:03

Posted by:
appleide

Click Here to Email appleide   Find more posts by appleide

ps:
I also have implemented a "Help" menu item for Language Reference for TNT basic...

10-22-2006 22:42

Posted by:
Jacob

Location:
San Francisco, CA

Click Here to Email Jacob   Find more posts by Jacob

My website has only bandwidth of 4mb per hour... so...

Use http://sitesled.com
- Free
- 250 megabytes storage
- 30 gigabytes/month transfer

10-23-2006 11:13

Posted by:
appleide

Click Here to Email appleide   Find more posts by appleide

Thanks.


I left something out of the release... you have to put a text file named "recentfiles.txt" in the same folder or it will crash on start.

10-23-2006 11:30

Posted by:
appleide

Click Here to Email appleide   Find more posts by appleide

http://appleide.sitesled.com/tbEdit.zip

There, Update.

Updates are now posted in this website.

10-28-2006 04:41

Posted by:
appleide

Click Here to Email appleide   Find more posts by appleide

>>
http://appleide.sitesled.com/tbEdit.zip
>>

Updated. Now has "String Maker"

Here's a screen shot, you'll see why I made it... I still got like 80 more of those globals to do. (yes I know you should keep as few globals as possible... but thats another matter).

Btw, in the listbox under "create", you have to note that the cells of listbox can only show you the first line, even though it can contain many.



11-01-2006 09:04

Posted by:
appleide

Click Here to Email appleide   Find more posts by appleide

It now colors comments.

Same link. go above post.

About to finish all my TODOs...

Only 1 left... (open recent)

11-11-2006 11:20

Posted by:
appleide

Click Here to Email appleide   Find more posts by appleide

Can count lines.
Fixed a bug, dealing with file names.
colouring comments are updated only when new line is made. (when you press return)

I won't upload these 'minor' changes. I only have a user base of 1 anyways.

11-16-2006 17:38

Posted by:
Wil Hostman

Find more posts by Wil Hostman

Question..

where do I enter the main body of the program?

Also, does it do syntax coloring yet?

11-17-2006 21:23

Posted by:
appleide

Click Here to Email appleide   Find more posts by appleide

It does coloring comments primitively. (i.e, On each line, every character between "'" and the line ending is colored.)

Also, to enter "main body", make a copy of your TNT project, or simply make a new TNT project. Then, double-click "tbEdit", then click file->open as tnt project", (or just Command-O) and find the folder that contains your project.

Click "Choose"

a list will come up. select your project's name, and click ok.
(This is to get around the limitations RealBasic's inability to have the open-dialog view bundled files as 'valid')

If your tnt project has any code in it, "tbEdit" will now import it.

Type (Command-S) after you loaded it the first time. Next time, it won't need to import.

11-17-2006 21:24

Posted by:
appleide

Click Here to Email appleide   Find more posts by appleide

Also, I just uploaded an important bugfix.

eg, if you accidentally had two "items" with the same name, they won't overwrite each other when you save.

04-27-2008 04:41

Posted by:
Harbinger

Location:
Florida,USA

Click Here to Email Harbinger   Find more posts by Harbinger

tbEDIT capabilities, in a nutshell?

Bumping this 2-yr-old thread because i'm considering using TNTBasic for my city simulation i discussed in an old thread. FutureBASIC just became open-sourced, and i'm weighing the option of using the limits but easiness of TNTBasic or learning the new syntax of FutureBASIC but be able to do a lot more. I'm not inclined to learn new tricks, but TNT may be too limited...

One of the features of my project will be the ability to trade code modules as developers (or myself) add or alter the original code. There will be a STARTUP module which retrieves from an .ini file all the modules and settings to use for the game-sim. THEN the RUNTHRU module runs the game, accessing different code modules (like INPUT, GRAPHICS, etc) to execute code. All modules use data and settings from various configuration files that can be altered as the game grows in features. I was wondering if tbEdit will enable me to run different modules from WITHIN a TNT program. Perhaps tbEdit can compile code modules into one large program (which will be fine for my purposes), then run that?

IOW, how can tbEdit help me?...

04-28-2008 06:36

Posted by:
appleide

Click Here to Email appleide   Find more posts by appleide

I made that when I was still in Junior high school, and used it myself to make a quarter of an RTS. =D All it does is allow you to split your source code into as many files as you like... So yeah, you could go into the document bundle and grab the textfile you want and 'trade' it with.

It gets TNTBasic to do the 'compiling' (more correctly, interpreting)
It exports a normal TNTbasic bundle, and can invoke TNTBasic to run it from within the app, but it doesn't add any new capabilities to TNTBasic interpreter itself, but rather as a partial replacement for hieroglyph.

If you're making a game as big as SimCity, I would agree TNTBasic 1 is too limiting and probably make your game seen to be 'based on obsolete technologies;'' because it doesn't make universal binaries.

If you want some new languages to use... FutureBasic IMO is _okay_... but as a BASIC variant, it too will be limiting, and slow, and non-crossplatform compared to not-so-proprietary languages. However, if you're already competent in BASIC but have non-existent experience with any other language then I suppose going this route will be relatively fast for you.

I am working on a project that will hopefully remedy this, based on a somewhat-basic-like language called Lua. It'll be months before a complete prototype will be finished, if at all, though.

04-28-2008 06:37

Posted by:
appleide

Click Here to Email appleide   Find more posts by appleide

Okay, this thread is embarrasing..... Let it die!!! I evidently have no idea what OOP means when I made it.

04-28-2008 13:59

Posted by:
Harbinger

Location:
Florida,USA

Click Here to Email Harbinger   Find more posts by Harbinger

It may be embarrassing but it may prove to be helpful. I will NOT be going to OS X or "universal binaries" whatever-that-is, and i do not want to go climbing the steep learning curves of even "less obsolete" languages. I remember a lot of my BASIC from the 80s and TNT may help me to get this project started. If i can compile the main program from various but requested code modules that's a large part of my dream-come-true.

I'ts amazing how the things you did when you were a *child* keep coming back when you're an adult, huh, appleide? ;D

04-28-2008 14:10

Posted by:
Harbinger

Location:
Florida,USA

Click Here to Email Harbinger   Find more posts by Harbinger

i'm having trouble getting that DL. The site is asking for info i either dont know or dont want them to know. can you send it or post it somewhere else? Your old site is dead too....

04-29-2008 11:05

Posted by:
appleide

Click Here to Email appleide   Find more posts by appleide

the sitesled link should be fine now.....

05-02-2008 00:55

Posted by:
Harbinger

Location:
Florida,USA

Click Here to Email Harbinger   Find more posts by Harbinger

Thanks, apps, i'll download and get back with you...BTW look at my newest thread. If you're still interested in TNTBasic, you might be interested in my upcoming project...

05-03-2008 04:07

Posted by:
Harbinger

Location:
Florida,USA

Click Here to Email Harbinger   Find more posts by Harbinger

Well, i got it home, and decompressed it, but OS 9.2.2 doesn't recognize the bundle. Are these universal binaries? How do i get the Finder to recognize it? I can use ResEdit or HexEdit if need be...

12-05-2009 16:00

Posted by:
soft

Find more posts by soft

site fermé

All times are GMT        Post A Reply

Forum Jump:
< Last Thread     Next Thread >

< Contact Us - TNT Basic >

Powered by: vBulletin Lite Version 1.0.1 Lite
Copyright © Jelsoft Enterprises Limited 2000.