MaxIDE Community Edition

BlitzMax Forums/BlitzMax Module Tweaks/MaxIDE Community Edition

skidracer(Posted 2005) [#1]
If you are looking for more features for the BlitzMax IDE or have already extended your own version and would like to share your enhancements please visit:

http://sourceforge.net/projects/blitzmax-ide/


Mark Tiffany(Posted 2005) [#2]
Many thanks for setting up this new thread skid. The most recent version (1.14) is now available as source and i386 binary, incorporating all known tweaks to date.

If anyone has any bugs to report, or changes to submit, please post them at SourceForge.


d-bug(Posted 2005) [#3]
Yesterday i've downloaded the source and was very impressed, that nobody splitted it until now. Didn't you think that this would make it more clearly to read for the developers ? Just thought that since it is OpenSource this would help to get a better entry to the code. Only my opinion ;)

Regards


Robert Cummings(Posted 2005) [#4]
Is there a changelog I can view to see what the differences are? Thanks.


Robert Cummings(Posted 2005) [#5]
You're either a genius or totally hardcore to be able to make something as big as an IDE in one file :)


Grisu(Posted 2005) [#6]
Great job guys! *hugs everyone*

Testing.... :)


Mark Tiffany(Posted 2005) [#7]
Yesterday i've downloaded the source and was very impressed, that nobody splitted it until now. Didn't you think that this would make it more clearly to read for the developers ? Just thought that since it is OpenSource this would help to get a better entry to the code. Only my opinion ;)

It does need to be broken down quite a bit! Skid started an axe.maxedit module, and we'd quite like to follow that model when breaking it up. I intend to have a go at this tonight (wife & daughter off with grandparents, so I have a full, free nights coding ahead, so long as I don't get distracted by Rome:Total War!)


Yan(Posted 2005) [#8]
Did you have any luck with merging that patch file I posted, or, should I just apply to become a developer. ;o)

Sorry if I appear to be bugging you about this, I just want to get the merging process sorted out before I start attacking the code. :o)

[edit]
I'll start bringing the SF bug reports up to speed later.
[/edit]


Chris C(Posted 2005) [#9]
or a patch in projects patch forum maybe?


Yan(Posted 2005) [#10]
Oh yeah, I hadn't noticed that.

So will this allow merging via the admins panel?


Mark Tiffany(Posted 2005) [#11]
Did you have any luck with merging that patch file I posted, or, should I just apply to become a developer. ;o)

Sorry if I appear to be bugging you about this, I just want to get the merging process sorted out before I start attacking the code. :o)

I too want to get to grips with mergeing, but if you want to do anything substantial, it's probably best if you sign up and become a member proper. Just let us know your SF.net userid by email.

I've kind of sussed that merging would be a piece of pea on linux, but how am I supposed to do this on Win? Although I have a Linux box, Windows is my main PC, and I want to get patching working on it. I have WinMerge and WinCVS and TortoiseCVS for good measure. Any advice as to how to apply a patch file to the originals *on Windows* ? Surely WinMerge should support patching too? confused...


d-bug(Posted 2005) [#12]
It does need to be broken down quite a bit! Skid started an axe.maxedit module, and we'd quite like to follow that model when breaking it up. I intend to have a go at this tonight (wife & daughter off with grandparents, so I have a full, free nights coding ahead, so long as I don't get distracted by Rome:Total War!)


So I'll wait for this version before I add the language thing and sign up as a developer.

It's running quite good until now, but to my surprise Labels won't work with it ?! All other gadgets worked fine, so this is cunfusing me. I will test it a bit more and if I don't find the bug I will ask for a solution.

Regards


Mark Tiffany(Posted 2005) [#13]
So I'll wait for this version before I add the language thing

You can probably knock the basics together in a sample app, ready to then plug in to the main code.

YCC, I've added you as a developer.


d-bug(Posted 2005) [#14]
You can probably knock the basics together in a sample app, ready to then plug in to the main code.


Shure i can do this, but i don't want to mess you up with this kind of stupid work :). But if you think this is ok for you, i will upload a basic example for you after a view fixes...

Regard


Mark Tiffany(Posted 2005) [#15]
Okay sussed the merge thing and add YCC's code to the source.


Perturbatio(Posted 2005) [#16]
Ok, I've placed a temporary holding page on the webspace:
http://blitzmax-ide.sourceforge.net/

Took me a while to figure out how to connect to it, SF don't like making things simple do they?


Mark Tiffany(Posted 2005) [#17]
Okay, I've split much of maxide.bmx into separate files broadly in line with skidracer's axe.maxedit. PLEASE test this lots. I've done little bits of spot checking as I've gone along, but I think it's working.

The main trick to watch out for now is that as all files are IMPORTed, I have introduced the (largely) abstract Type called THost (which TCodePlay extends) to remove cyclic dependencies - this is what skid did in his version. This won't affect most of the code, but pretty much anything not in the maxide.bmx file should reference and use abstract methods on THost, not TCodePlay directly.

The maxide.bmx file itself is still pretty big though; I will do more on this at some point, but probably not for a week or so. So please feel free to get hacking!


Yan(Posted 2005) [#18]
YCC, I've added you as a developer.
Okay, cheers. :o)

I'm unlikely to be adding large wodges of code ATM, but, I will be tweaking away and fixing the odd bug. :o)


Chris C(Posted 2005) [#19]
Took me a while to figure out how to connect to it, SF don't like making things simple do they?

LOL you noticed too!

if anyone uses cygwin heres a simple script to get the latest cvs version
cd /cygdrive/c/Documents\ and\ Settings/YourUserName/Desktop/maxide/
cvs -d:pserver:anonymous@... login
cvs -z3 -d:pserver:anonymous@... co -P maxide
echo "done!"

create a text file called getmax.sh in cygwin/home/username with the above and then run chmod +x getmax.sh


Mark Tiffany(Posted 2005) [#20]
LOL you noticed too!

Just a bit!

A few more tweaks to the source and a couple of extra files added. Anything more will require some major hacking (mainly to sort out how options are handled), so I'll be careful about how I do that - everyone else please feel free to hack.

I've also fixed the completely broken double click behaviour.


d-bug(Posted 2005) [#21]
Hey Mark, i've send you a mail to your sf-adress with the link to the translation thing...

hm, how do i use the url tags over here ? are they as usual [URL] or are they different ?

Regards


Perturbatio(Posted 2005) [#22]
I don't think that SF forums allow any sort of tags (or at least I can't find any reference to any). It certainly specifically states that HTML will be shown as text.


Jay Kyburz(Posted 2005) [#23]
Just to let you guys know i'm still working on my little project file side project.

Basically it will be little metadata file that sits in a directory with your source and remembers what the build file is for the project. Rather manually adding files to the project i decided what the IDE now is best, where you can simply do any file manipulation in explorer, but i do have and exclude list so you can hide away files you don't want to see.

It will be very easy to extend this to remember other bits of project data, what icon to use, scripts to run after build (for making installers and what not) etc..

I've also created a custom tree view for viewing the project with icons for various file types.

I've been developing it in a test app and should have it ready for you guys to review mid-late next week.

1.14 set me back a bit. Thee lines don't work anymore.. need to work out why
If EventSource() = Self.Menu Return True



Mark Tiffany(Posted 2005) [#24]
Ta for the translation stuff, don't have time to look at it now, but will take a look and may try to plug it in tomorrow unless someone beats me to it.

Jay, I think the error above is caused by an implicit cast to Int in order to compare those two objects (an Object - normally a TGadget compared to a TGadget). Try holding one or other in a temp TGadget, or explicitly cast EventSource to TGadget. You should also check out the recent mods to the codebase, as they're quite significant. The content of the project code is unchanged, but has moved (mostly) into its own file. This should in theory make your life easier going forwards, but it may be a bit awkward plugging in your changes now. Give us a shout on the forum over there if you need a hand.


Jay Kyburz(Posted 2005) [#25]
nar.. there was some change in how proxy gadgets function. I really should do some reading about them.


Mark Tiffany(Posted 2005) [#26]
I've started adding some Docs to the SF.net site which anyone wanting to contribute may find useful.

Skid, can you add something to your thread at the top asking people to read the (short) code related docs on SF.net before making /submitting changes.


Robert Cummings(Posted 2005) [#27]
A few cheeky feature requests:

1. folding for functions, rem blocks and loops :)

2. move the project view into it's own tab

3. a small [ ] text entry box, REALLY discreet, that prints the calculated result into the STATUS bar :) A mini always-on calculator for all those everyday simple divisions, additions etc... NO equations! simple calcs thats all :)


Mark Tiffany(Posted 2005) [#28]
Pop 'em on the SF.net site, I believe you can do so without registerring? function folding is already there though, and I've just been thinking about the "grouping" of "panels", i.e. tabs...


Robert Cummings(Posted 2005) [#29]
Is the IDE actually reliable / working and stuff? or too risky for use at the moment? As I have a project going and I can't risk losing any work :)

Will you be providing a compiled build on the sourceforge site?


Perturbatio(Posted 2005) [#30]
There is a win32 compiled build on the SF site already, I'm using that one and so far it works fine. You can always rename the old IDE before using it.


Robert Cummings(Posted 2005) [#31]
Thanks :)


Mark Tiffany(Posted 2005) [#32]
The downloadable releases should always be fully functional.

The only 'risky' versions would be if you log into the CVS and download the very latest code, compile that, and run it. (Which is of course what I'm doing!)


Robert Cummings(Posted 2005) [#33]
Thanks Mark. Just download the exe and it does not have folding or any changes, but I guess that is because it's a "stable" build ?


Mark Tiffany(Posted 2005) [#34]
yup. but function folding is just a feature req at the moment, not implemented yet - sorry if I misled you! Autocomplete is there, but a little annoying (looking at this right now in fact!).


Chris C(Posted 2005) [#35]
if the parsers gonna be over hauled, could it make a list of variables too for auto complete?

Anyone got any brain waves how to cope with local variables and scope's ???


Robert Cummings(Posted 2005) [#36]
I have an issue with the build I downloaded, and that is on the Code tab, there are unnecesary entries below my own code view. I do not think that the treeview should sandwich your own code because this makes it harder for me to find my own functions.

I think it would be better if your own functions are on the treeview code tab only.


Mark Tiffany(Posted 2005) [#37]
if the parsers gonna be over hauled, could it make a list of variables too for auto complete?

When the parser gets overhauled, it somehow needs to allow any number of 'parse modules' to hook into it, such that when the parse routine runs, it can highlight, populate autocomp, update code view, update todo, etc, etc.

I have an issue with the build I downloaded, and that is on the Code tab, there are unnecesary entries below my own code view. I do not think that the treeview should sandwich your own code because this makes it harder for me to find my own functions.

Agreed, I posted a feat request to be able to choose what you show, but I also think that if a particular 'branch' is unpopulated, it shouldn't be listed.


Robert Cummings(Posted 2005) [#38]
And a tab for projects ;)


grable(Posted 2005) [#39]
Great work guys =) just a side note though, you should keep an unstable compiled release up on the site aswell as the stable ones. since not everyone has got the maxgui module yet ;)

i REALY need the CTRL+LEFT/RIGHT tweaks, hehehe.


Perturbatio(Posted 2005) [#40]
I've just added CTRL+TAB/CTRL+SHIFT+TAB for switching pages to the code, this also rectifies the CTRL+LEFT/RIGHT issue.

It was annoying me too much

*EDIT*

Theres a download marked as unstable, incorporating these changes.


bregors(Posted 2005) [#41]
Great work on the IDE guys! Just wanted to let you know that I am getting an infinite loop error when I try to check out the MaxIDE source.

*EDIT*
cvs server: module `maxide' in modules file contains infinite loop
cvs checkout: module `maxide' in modules file contains infinite loop


d-bug(Posted 2005) [#42]
@BrEgOrS

Use the pserver instead of the secured one. This might fix this problem.


bregors(Posted 2005) [#43]
d:bug, I used same params to pull source anonymously a day ago. It worked then, but won't work now. :/


Mark Tiffany(Posted 2005) [#44]
I did add maxide to the modules list, in order for it to appear in the "Fetch List" in TortoiseCVS for example. I'm assuming that's what is now causing the "infinite loop", but no idea why...


bregors(Posted 2005) [#45]
Mark, this may just be a guess because I have no previous experience with CVS, but I did bring down the CVSROOT and looked at your modules list. Maybe the module line is referring to itsself?

---------
maxide -a maxide
---------

You seem to be declaring maxide as an alias of itself. Could this be causing the 'infinite loop'? Is anyone else having this problem? :/


Mark Tiffany(Posted 2005) [#46]
That would make sense. I wasn't entirely sure what should go in that line, but it worked with TortoiseCVS to bring back a list of modules, so I thought it was okay. Maybe it should just be "maxide" on it's own?? At work, so if anyone with dev access to the cvs can tweak this, please do!


Grisu(Posted 2005) [#47]
Ahm, something else:

Is it possible to get a newsletter?
So I know when a new version of the IDE comes out?


Mark Tiffany(Posted 2005) [#48]
The CVSROOT/modules file should simply read:
maxide maxide

i.e. remove the "-a" in the middle.

I can't do this right now (at work), but maybe one of the other registerred developers could go in and fix this please?

I think we'll post a new thread here for each 'stable' release, which we're thinking may be around once every couple of weeks, but will depend on activity levels really...I may take a look at the RSS and mailing list functionality of SF.net tonight though, maybe we can go down that route? RSS is something I'd like to find out a bit more about anyway...


d-bug(Posted 2005) [#49]
No, im sorry i'm on work too and will be until weekend. I can't do anything there becourse I only have read-access to this module (btw. was this meant to be as it is, Mark ?)...


MrCredo(Posted 2005) [#50]
hm... can i post a request?

have you interests to add new feature: Virtual Includes

Virtual Includes are saved in 1 file. The IDE should add only separators to this file. If you load a bmx-file, the IDE should split this file in many parts.

The best: you can define so many includes you want - and you can create hierarchically (!) includes in a tree.

Sample:


PROJECT

+Game
--->makegame()

+GUI
--->button
------>button.create()
------>button.delete()
------>button.draw()



etc...

and in file:

'<IDEINFO name="version" value="1.0">
'<IDEINFO name="name" value="PROJECT">
... more infos here...
... MAIN-Program-code here (project)...

'<IDEINFO name="separator" value="Game" depth="1">
Function makegame()
EndFunction
...


This could be a optional (!) to normal file includes.
If you ever used QUICKBASIC - you will know what i mean... QB display evere function (!!!!) separate at this way...
I would love to see the same in BB - this makes the programming more easier - and i wrote much cleaner codes...

I started year ago with my IDE (blitz+) - but the build-in-textarea was extremely slow - so i gived up...
But this virtaul includes are so cool...


Hotcakes(Posted 2005) [#51]
Grisu and Mark, there's no need to tell everyone that a new version is out - SourceForge will email you if you are monitoring the package (I got an email when the unstable build was added).


Perturbatio(Posted 2005) [#52]
Grisu and Mark, there's no need to tell everyone that a new version is out - SourceForge will email you if you are monitoring the package (I got an email when the unstable build was added).

You need to subscribe to it I believe, I sent that notification when I uploaded the build.


Hotcakes(Posted 2005) [#53]
Well of course you need to monitor the package, how else is it going to know you want an email about it ;] Or by subscribe did you mean sign up?

I have about 20 Sourceforge packages monitored so it was worth it for me =] I guess others wouldn't want to sign up just for one thing...

Although I don't know how anyone can get by without Shareaza and ScummVM, at least ;]


Perturbatio(Posted 2005) [#54]
Well of course you need to monitor the package, how else is it going to know you want an email about it ;] Or by subscribe did you mean sign up?


I have no idea, I've chosen to monitor the package as well to see if I get one when the next update happens.


grable(Posted 2005) [#55]
The unstable release works perfectly (win32) thanks a bunch! =)

cant wait til i get the maxgui module so i can start tweaking around myself ;) hehhe


Byteemoz(Posted 2005) [#56]
I've written a litte home-key-tweak:
If you press the home key now, the cursor jumps to the first non-space character in the line:

( to be inserted in TOpenCode, Function FilterEvent(...), just before "Return 1". )


-- Byteemoz


Hummelpups(Posted 2005) [#57]
Hi guys,

hm, i think posted in a wrong thread, i can't find it anymore ^^.

I have a feature request.
I created a project, if i open the main folder with the projct folder,
there are files like: gfx,share,sfx,plop.ini and the sources.

To find the right sources is really difficult. What do you think about
a sign, a prefix or another color for BMX files in the Projectfolder???

IMurDOOM


Mark Tiffany(Posted 2005) [#58]
Nide edit Byteemoz, will add once I've finished a few tweaks of my own.

To find the right sources is really difficult. What do you think about
a sign, a prefix or another color for BMX files in the Projectfolder???

Agree! I think icons in the tree list would really help, not just on the project folder to show icons for images, code, etc differently, but also on the code browser tab too. i.e. rather than prefixing / grouping by Function / Const / Method / etc, to have them colour coded, or different icons for each would be neat.


Jay Kyburz(Posted 2005) [#59]
I have icon support in the project stuff i've been working on for weeks. Things have been moving very slowly because I've been busy at work. ( This doesn't include any code browser stuff)

I'd like you guys to have a look at what i've done in a test app before i try and merge it into to IDE itself. You may not light what i've done. Ill try and post this this week.


Mark Tiffany(Posted 2005) [#60]
I've been doing quite a bit of "tidying up" in the code this past week, mainly to force the options stuff into a file on their own, and finally break the back of the remaining code in maxide.bmx. As such, I now have a better understanding of all the types & inheritance, and having tweaked them already, we could in theory have your mode, the old mode, another mode, no mode for project viewing hooked up, and allow the user to take their pick.

But it's definitely a good idea to put up a test app first. :-)

Personally I'd rather do away with the code browser on the right hand side in favour of just a list of files (i.e. current project browser) and function folding. So the ability to choose what tabs you have, and which variant of each tab is at the back of my mind already...


Mark Tiffany(Posted 2005) [#61]
Whilst I'm here, I'll also just say that once I've got all the tidying up done (hopefully by Sunday night), I'll post a new "unstable" release, and if it's looking good after a few days testing, I reckon we should post a new public version after that.


Jay Kyburz(Posted 2005) [#62]
Great idea about choosing your tabs. I'm working on a 12' i book and would actually like to get rid of the tans all together some times. They take up valuable realestate.


Mark Tiffany(Posted 2005) [#63]
And in theory, if somebody wrote a replacement for TNavBar (the thing that provides the tab control and groups those panels together), you could have new means of accessing them. Like roll-out versions of the tabs, rather than them being visible all the time. Or a TNavBar that lets you access them in a list. Oh, and instead of needing two sets of tabs, you could choose to just have everything on one set of tabs. or in one list. Or in several tabs. on the left, right and bottom of the screen.

Of course, the code isn't there yet for any of that, but that's clearly where some of the type structure / inheritance stuff was heading, and I'm making a stab at bringing some of those things closer to reality...

The tricky bit though is how you add functionality to the parser, based on what tabs you've got open. I think I need to add some code of 'ParserHook' system, whereby if you've chosen to show the code browser, it adds it's own parsing code in as function reference hook thing for the main parser to call. But I haven't even got that far yet! Just tidying up the options so that they are easy to plug and play has taken a while, but the new option stuff is almost all there now in a test app, I just need to back it into the main app...

Add to that the fact that what I really want right now is a gutter to put function folding in, and I think this'll take a while...


Perturbatio(Posted 2005) [#64]
I've been a little busy of late, but I am still working on the docs search thing.


Hummelpups(Posted 2005) [#65]
can anybody up the latest code for people like me who
wants to have a look at it?

i don't know where to get the latest version of it.

Or is this a privilege to only some of the members here?

Thanks

IMurDOOM


degac(Posted 2005) [#66]
Follow the white rabbit http://sourceforge.net/projects/blitzmax-ide (or read the first post :P)


d-bug(Posted 2005) [#67]
[GERMAN_SWITCH] Mensch Immy, du Depp :) [/GERMAN_SWITCH]

Hey Mark, sorry for my long delay. Would you please unscribe me as a developer ? There is no time left anymore to do something at it. Please take the last module, that I've send you, if you want to. There is nothing new at it over here. Thank you.

greetz


Hummelpups(Posted 2005) [#68]
[GERMAN_SWITCH] Hehe, so bin ich ^^ [/GERMAN_SWITCH]

hehe, thanks, i read it, but i didn't know
if that's the latest source. ;D

Thank's sry for my stupid question.

EDIT: Played a few minutes with the source.
if i activate the other moduleauthors, the buttons
reach the bottom of the window.
I changed the space between the checks but i think that isn't
a good solution.

But you can have a look at this
www.blitzhelp.net/personal/maxide001.bmx

EDIT2:
The windowsize changes of how many SyncMods authors are
activated.
www.blitzhelp.net/personal/maxide002.bmx
That is better.

IMurDOOM


Perturbatio(Posted 2005) [#69]
Hey Mark, sorry for my long delay. Would you please unscribe me as a developer ? There is no time left anymore to do something at it. Please take the last module, that I've send you, if you want to. There is nothing new at it over here. Thank you.

I've done that for you.


d-bug(Posted 2005) [#70]
@Perturbatio

thx


Mark Tiffany(Posted 2005) [#71]
IMurDOOM - I've added that mod into my copy of the source, will hopefully post the results of this in the next few days.

d:bug, cheers for what you have done so far - as I have been busy hacking some of the guts I hadn't had a chance to do much with your code for translation. I'll add the code that you've contributed into my next upload, although it's unlikely I'll get a chance to hook it up to get it working. At least it's in there for me or others to hook up later on.


Jay Kyburz(Posted 2005) [#72]
Any chance I could get write access to the repository. I'd like to start helping clean things up.
"cvs [server aborted]: "commit" requires write access to the repository"


Perturbatio(Posted 2005) [#73]
in order to get access to the CVS, you need to become a developer, sign up at sourceforge then post your username here


Mark Tiffany(Posted 2005) [#74]
Jay, before you do any major hacking, I've got a lot of cleaned up code myself that I need to check in once working. Little code tweaks here and there are no problem, but any major re-working might conflict.

I've been focusing on tidying up the code relating to storing options, the options screen, and a few of the underlying base Types that everything inherits from.

The main focus has been abstraction of options to a) enable the maxide.bmx file to be easily broken up some more, and b) make it as easy as possible to add more options. I'm almost there (the core code and testing framework is up and running), but I now need to back it all into the current codebase. I don't think it will take too long (I may be able to post up a version tonight).


Jay Kyburz(Posted 2005) [#75]
Oh.. I am a developer.. i think i need to work out how to get my cvs client to login before doing a commit or something. ?


Mark Tiffany(Posted 2005) [#76]
Check out the documentation on the SourceForge site, it's fairly comprehensive, if a little confusing at first.

I think you may need to set an SSH key first, again read the SF.net docs for details.

I'm successfully using TortoiseCVS in Win32, so if you're using that, and getting stuck at a particular point in the process, please shout and I'll try to help!


Jay Kyburz(Posted 2005) [#77]
Thanks Mark, I'll look into that.

Here is a example of what I've been playing around with. I compiled it on pc for the first time a few minutes ago. The icons are upside down because they need to be on mac. The files also seem to be saving without their extension.

www.jaykyburz.com/sampleapp.zip

There is not much too it but I've learnt allot.


Hummelpups(Posted 2005) [#78]
I have a feature request that i can't build in.
My poor BPlus knowledge ^^.

I miss the combination ctrl+ arrow left or arrow right to
jump through whole words.

Is there any way to build it in?
There was a release with this feature already!

It would be nice of you if someone add this feature again.

IMurDOOM


xlsior(Posted 2005) [#79]
I miss the combination ctrl+ arrow left or arrow right to jump through whole words.


Perturbatio figured out that one -- Two of the lines in the Maxide.bmx source need to be changed to:

CreateMenu "&Next File",MENUNEXT,file,KEY_TAB,MENUMOD
CreateMenu "&Previous File",MENUPREV,file,KEY_TAB,MENUMOD|MODIFIER_SHIFT



I think it's lines 4851 and 4852 in the official 1.14 IDE source, but that may be off a little, so make sure to save a backup copy of the original one first. :-?


Hummelpups(Posted 2005) [#80]
Thanks, it works.

Heres the Source, i changed it to KEY_TAB now.

I don't know, if you Mark want the whole code or
just the fixes in the thread here. What do you prefer?

Heres the Source:
www.blitzhelp.net/personal/maxide003.bmx

EDIT: The source is updatet, i had the same Buttons for next and
previous file. I changed the previous file to 0.
We should find a solution for that. Config Menu or sth like that.

IMurDOOM


Mark Tiffany(Posted 2005) [#81]
The changes relating to keys were backed out a while back, as we wanted to build in the ability for users to choose them themselves before we enforced different combos - mainly because we weren't sure how to reach consensus on such things, particularly in a cross-platform manner! But I think the ctrl-arror to ctrl-tab one probably should go back in (everyone seems to want it that way...).


Mark Tiffany(Posted 2005) [#82]
Okay, MAJOR UPDATE time. There should be just one more of these major changes after this, and even that should be relatively self-contained now that everything is nicely broken up.

My latest update, only in the CVS for now, affects a lot of code files. It makes a start at rationalising and standardising some of the core behaviour and base classes, and as a result renames some types and methods for consistency / understandability. The main code change is to break the options functionality out into the data storage and GUI to then enable some further separation.

In fact, the only functional change is to add an option for turning auto-complete on or off! But this version should significantly aid understanding, readability and maintainability moving forwards.

There are now two main areas that I need address:
1 Break TCodePanel into two:
- TCodePanel to contain all basic text editing functionality
- TBMXCodePanel to extend this and add in BlitzMax specific code
- T***CodePanels can then easily be added at a later date for other file formats, e.g. CPP, HTML, etc.

2 Clean up the TNavBar and general tabber / panel grouping functions such that these can be properly separated, and ultimately to ease into a model whereby we can have more than just two 'panes' shown, and that you can put whatever 'panels' you want in each.

I'll probably do the latter first.

I haven't fully tested this version, but it compiles, and appears to work. The things most likely to have broken are options, so if you want to try to break it, feel free. Even though they're pretty hefty changes, any genuine functional changes to code that actually does stuff should be fairly easy to plug back in, especially if you're using a compare tool.


Jay Kyburz(Posted 2005) [#83]
Mark:

attempt to access field or method of null object
line 671 char 1
>>SetTextAreaTabs textarea,options_code.tabsize

on mac.

there are a few other small mac things that i have fixes for that i will try and check in tonight.. if i can work out how. This one sounds like something you might want to look into.

I was simply trying to open a file.


Mark Tiffany(Posted 2005) [#84]
okay - will check this out later, although I'm sure I at least opened a code file! To be honest though I haven't really given it much of a thrashing, as I just wanted to get these major changes in before anyone else tried to hack away at it.


Hummelpups(Posted 2005) [#85]
Did you opened it out of the IDE?

It seems that theres an error if i open a *.bmx file over the Commandline.
The program closes immediateley.

IMurDOOM


Perturbatio(Posted 2005) [#86]
I get the same error as JK when opening a source file it's in the refresh method of TCodePanel

presumably it's trying to address the textarea before it's been created.

*EDIT*
at first glance, the offence seems to be occurring in the TCodePanel.Create() function


Mark Tiffany(Posted 2005) [#87]
Fixed - 'twas a silly (but obvious) one as I suspected.


Hummelpups(Posted 2005) [#88]
Hm, i need a button to refresh the files in the Treeview ^^
i created files while the IDE is runnning. I tried to refresh
the files in the projetviewer somewhere but i didn't find it

Is a feature like this already included?

IMurDOOM


Perturbatio(Posted 2005) [#89]
ok, the IDE no longer pays any attention to the cfg/ide.ini file (I had to reset the settings), it doesn't save window position and size, nor does it reload files you had open on close.


Mark Tiffany(Posted 2005) [#90]
There is no migration code in place to upgrade from the old cfg to new, should be simple to write, but wanted to get it all working first.

Once you are running the new version, all options should be remembered correctly, apart from reloading files - which I know I need to fix, along with remembering your syncmods id & password. Both should be fairly easy to fix, but aren't just simply a case of replacing the old option fields in TBMXCode with the new option types like most of the other were.

Window position and size *should* be working. I must admit to on occassion finding it reset back to the default, so there's some intermittent oddness going on that I need to understand.

IMUrDoom - yup, I've found that too - the refresh key on the project treeview ought to re-read the directory, but doesn't. But I'm thinking that we'll see what Jay's project stuff shows up first. Note to Jay (and self): sorry mate, haven't had a chnace to check out your sample app, will do tonight.


Hummelpups(Posted 2005) [#91]
I played with the sampleapp twice.
The first time i wanted to look at the gui and
closed the program.

The sec. time i tried to create a project.
There's is no information of which Filetype
the projects are. I searched around the folders
and didn't find a correct Filetype.

I canceled the AddProject Menu and had to restart
my Computer....

The textareas are to big in the ProjectProperties.
They should be smaller to see them in 100%.

Thanks,

IMurDOOM


Jay Kyburz(Posted 2005) [#92]
Thanks Doom, The project files seem to be saving without an extension at all on PC unless you specifically type one. I was suggesting '.prj'. There must be some inconsistency between Mac and PC as it works fine on my ibook.

I also noticed the too big text labels but didn't have time to correct it and recompile. This was just another Mac/PC inconsistency

I've been looking at the bmx source and thinking about how my code will fit in. I'm not sure if its just me but, krikey its a mess.


Mark Tiffany(Posted 2005) [#93]
yup, it's a mess! In the latest CVS version, you need to look at projects.bmx in the main, although there's an awful lot of file parsing for project stuff going on in maxide.bmx TBMXCodePanel. I need to find a neat way of abstracting those parsing hooks out such that it's easy to look at just projects.bmx on it's and see all the project code on it's own.

I'm also in the process of writing some brief documentation on the type structure, as it's quite important to understand this. Key types to get your head around:

TEventHandler - this is an abstract base class representing anything that can handle events.
THost Extends TEventHandler - this is the core code of the main window
TBMXHost Estends THost - this is where the BlitzMax IDE code tends to (or should) sit. Covers the tabs and navigation panels.
TRequester Extends TEventHandler - this is any requester window
TPanelRequester Extends TRequester - this is a special type of requester with tabs (e.g. options)
TPanel Extends TEventHandler - this is the base class for any standalone GUI element...
TCodePanel Extends TPanle - this is (should be, not yet)the basic text editing functionality
TBMXCodePanel Extends TCodePanel - this adds BMX specific stuff to the basic code panel. At the moment, there's an awful lot that needs to be moved back into TCodePanel.

Then we get to the bits that I haven't really tidied up, which you'l be interested in

TNavBar - this provides the nav bar on the right hand side. I want to make this much more generic so that that it is used by both the nav bar on the right, the code panels, and any other group of panels we might want. e.g. to have another set of panels on the bottom, as that's where I want my Output window to be. But make it generic enough that it can hold any TPanel and the user can choose what goes where.

TNodeView - these are what sit inside TNavBar at the moment and provide the treeview list of stuff. Again, this should just extend TPanel.

TDataNode - this provides the data storage that is then used by TNodeView. i.e. put your project info into a TDataNode structure, give it to a TNodeView, and it will display it for you.

Phew! I need to work on that, and draw some piccies, but hopefully that helps!


Jay Kyburz(Posted 2005) [#94]
Thanks Mark,

My Project Tree View Class just needs a parent gadget to sit inside. The Project Class works independently of any existing IDE code. The Project Tree View is designed to just call events when a user double clicks on a resource. Hopefully we can rig up an event handler in TCodePage to open the appropriate resource.

Last night I started writing a tCodePage from scratch. Its juts a little experiment, I don't expect it would be used in the IDE. I'm playing with having an array of text areas, one for each line.


I really should get back to working on my game. For some reason this stuff is more fun at the moment.

Jay.


RiK(Posted 2005) [#95]
I notice that the download from sourceforge is an EXE, what about us maccies?

If it's open source shouldn't the source be in the download too?


Perturbatio(Posted 2005) [#96]

I notice that the download from sourceforge is an EXE, what about us maccies?

If it's open source shouldn't the source be in the download too?



Click the plus next to 1.14 in the downloads section and you'll see blitzmax-ide-src-1.14.zip


Mark, I really think we should stop overriding default text editor behaviour. Can we change the CTRL+HOME thing to some other hotkey since I use that shortcut a lot (It jumps the text cursor to the top of the RichEdit).


RiK(Posted 2005) [#97]
Ahh, thanks for that :)


MrCredo(Posted 2005) [#98]
hey... the currrent executable file is very old

what is about newer build...?


Mark Tiffany(Posted 2005) [#99]
Mark, I really think we should stop overriding default text editor behaviour. Can we change the CTRL+HOME thing to some other hotkey since I use that shortcut a lot (It jumps the text cursor to the top of the RichEdit).

Agreed. I think the ctrl-arrow thing should also change back to ctrl-tab. But I'd rather not change too many others until we build in some user options for keys.
hey... the currrent executable file is very old

what is about newer build...?

As I have been making some semi-major re-structuring of code, there are still a couple of existing features that need to be hooked up again. I didn't see the point in putting out a build that in some ways is less functional than the current one. I think we should aim to get a new build up in the next week, or just into the New Year.


Grisu(Posted 2005) [#100]
Thanks Mark for the info.

A New Years present would be great! :D


Hummelpups(Posted 2005) [#101]
Yes.


Jay Kyburz(Posted 2005) [#102]
Guys, got a question for ya,

Where does the IDE get the list of language keywords and BRL module function names for formating in the code page.

Jay.


Perturbatio(Posted 2005) [#103]
commands.txt which is generated by the bbdoc program thingy.


Jay Kyburz(Posted 2005) [#104]
Hey thanks Pert,

Another question for you guys. Where/ how does the IDE receive the output generated by the compiler?

Do you have to hook up and event handler or something?


Mark Tiffany(Posted 2005) [#105]
I think most of that code is hidden away in TOutputPanel in debug.bmx. I think it's the Read/WritePipes methods that you need, but haven't delved into that area in any depth at all.


N(Posted 2006) [#106]
You've made the IDE better. Thank you very much and great job so far, folks.

Edit: And yeah, sadly I only just noticed this.


Chris C(Posted 2006) [#107]
managed to find out how to do a block cursor with rich text edit for all of us with bad eyes!!

It looks like the cursor would have to be resized every time its moved if your using a proportional font (or else size it to the smallest character)


hope this helps, keep up the good work!


MrCredo(Posted 2006) [#108]
i do not read complete topic - but what is new in the IDE?
i see only TODO-Tab and changed setup-window... nothing more???


Mark Tiffany(Posted 2006) [#109]
auto-complete on control+space. A few other tweaks, but not a lot else to be honest. So far, I've been concentrating on getting the code tidied up. And of course, if there's a feature you really want (or a bug you NEED to fix), you can always contribute yourself, and so long as it's well written and cross-platform, we'll almost certainly slot it in.

Re: the block cursor thing above - I haven't tried it, but we don't really want to put in changes that only work on one platform, so if anyone else can provide a Mac / Linux version of the above, that'd be great!


N(Posted 2006) [#110]
Just thought I'd mention this (since I can't really do a whole lot of good without buying the GUI), pressing Shift+Home doesn't select anything. However, Shift+End does. Not really a huge problem or in urgent need of fixing.


xlsior(Posted 2006) [#111]
Just thought I'd mention this (since I can't really do a whole lot of good without buying the GUI), pressing Shift+Home doesn't select anything. However, Shift+End does. Not really a huge problem or in urgent need of fixing.


Not high priority, but should be addressed none the less...


LethalFrog(Posted 2006) [#112]
On the Mac version if you have highlighted text in the help panel then apple+c does not copy the text, you have to right click and select copy. It looks like the context of the apple+c is not being sent to the correct gadget.


xlsior(Posted 2006) [#113]
Oh -- since we're on the subject of IDE enhancements anyway, something else I just thought of that has bothered me for a long time:

In many cases, when you copy code onto the clipboard (e.g. from this forum through Internet Explorer) and paste it in the IDE with Shift-Insert (rather than Edit -> Paste), the code will all run together onto a single line instead of being properly formatted.

If you use Edit -> Paste instead, it looks fine. Most likely this has something to do with the end-of-line characters not being in the expected format?

Would be great if that could be addressed.


Mark Tiffany(Posted 2006) [#114]
I'll do the bugettes abpove myself, but it would be great if people could post their bugs directly on the SF.net BlitzMaxIDE pages. You don't need to register to log a bug (although I'd appreciate it if you at least leave an email address if you are not logged in).

I'm guessing that the Mac help panel thing is probably a BlitzMax bug, not an IDE code bug. i.e. if you try the same from any html gadget in sample code, will you get the same issue?

(I also encountered the shift+Home bug the other day, but for some reason just ignored it!)


Perturbatio(Posted 2006) [#115]

(I also encountered the shift+Home bug the other day, but for some reason just ignored it!)

Could this be because of the (annoying) CTRL+HOME override?


Mark Tiffany(Posted 2006) [#116]
presumably. We need to get the key config sorted...I'm thinking that your key changes should go back in asap. Maybe if we create a new TKeyOptions (Extends TOptions) type that has the current settings hardcoded and not reading to / from the ini file for now, we can fix things up and build in the GUI to modify them later?


Perturbatio(Posted 2006) [#117]
Sounds good, I've been a bit distant from this recently, got a few freelance jobs to do (doing one today as well). I should be back to normality soon.


Mark Tiffany(Posted 2006) [#118]
I might take a stab at moving the key config into a TKeyOptions type tonight if I get time. Shouldn't take too long to set it up, then someone else can make use of it in the code / write the options screen.


Hummelpups(Posted 2006) [#119]
The build options in the IDE Options and Menus should be
Synchron or one of them should go ^^ I vote vor the Menu 2 go :)

What about the source? ;D

And can you activate all ModAuthors please?

Thanks.

IMurDOOM


Mark Tiffany(Posted 2006) [#120]
I agree with the build options being removed from menus, and being moved into options. I actually think it would be best if those options were saved per project, but that's a whole other topic....
What about the source? ;D

And can you activate all ModAuthors please?

The source is in the CVS. I don't understand about ModAuthors - do you want to sign up as a developer on SF.net? Or is it an IDE thing?


MrCredo(Posted 2006) [#121]
i posted this a time ago...

if i modify commands-file and add many thousands lines to this file. The IDE need long time to load this...

but i don't know why... this is also a problem from original-IDE

check this with demo of hotdocs - this create more lines... on some systems blitzmax start after 1 minute (!)


Mark Tiffany(Posted 2006) [#122]
Basic TKeyOptions added, and hooked up to help and auto-complete, although no GUI to configure them. There are other key combos that need to be added. Should be a fairly straightforward job for someone to hook up the remainder.

I've also fixed the Shift+Home problem. All of this is in the CVS code, not the downloadable EXE yet. I think I've also spotted and fixed the bug with the splitter sometimes forgetting it's place.

The slow loading is down to the parser. We've already tagged that for a rewrite at some point, but I don't fancy delving in there right now...


Mark Tiffany(Posted 2006) [#123]
ah, just realised you meant the commands.txt file. Not sure if this could be speeded up any, surely it's just a simple read?


Hummelpups(Posted 2006) [#124]
Hm, that would be nice if i could use the code in the CVS.
I am registered already as IMurDOOM.

I meant, the activation of all Authors of Modules stored on the modservers like
axe, birdie and so on. They are disabled in the exe.

IMurDOOM


Mark Tiffany(Posted 2006) [#125]
ah yes. The current CVS code (which absolutely anyone should be able to get out through anonymous login, see SF.net pages for details) turns all the checkboxes back on, and I think we should leave it that way.

However, a more flexible GUI would be nice here, e.g. a listbox of available modules and tickboxes for each that are remembered. It would make adding new modules (or even module servers?) that much easier...


Hummelpups(Posted 2006) [#126]
Hi,

i have no time to look at this yet but i downloaded the files.
The Projects aren't saved after closing the program.

IMurDOOM


MrCredo(Posted 2006) [#127]
Mark - can you tell me the file where i can find "commands.txt"-loading-routines... i could speed up this...


Mark Tiffany(Posted 2006) [#128]
help.bmx in TQuickHelp.Create

It looks like it reads the file in, and stores the contents in a bunch of other strings. Not sure it can be sped up that much, the If block can be restructed with ElseIfs to prevent checking q 7 times over. You could also re-order the checks to have the most common ones at the top (eg move : up the list).


MrCredo(Posted 2006) [#129]
oh hell what is this??????????????????

i do not understand this codes... is this true that all keywords are stored in one string - unbelievably :-)

wow wow wow

i recommend complete rewrite of this

->storing all commands in a list

Type TQuickHelp
Global command:string[]
Global lowcase:string[]
Global link   :string[]
...


->and using binary search to find a command (i think the editor need the same strings for highlighter???)
for binary search - you need sorted list - in a array (!).

Function binsearch:Int (value:String)
	Local high     :Int=TQuickHelp.lowcase.length
	Local low      :Int=1
	Local middle   :Int
	Local oldmiddle:Int

	value=Lower(value)

	Repeat
		middle=(high-low)/2+low
		If oldmiddle=middle Then low=high; middle=high Else oldmiddle=middle

		If value=TQuickHelp.lowcase[middle-1] Then Return middle-1
		If value<TQuickHelp.lowcase[middle-1] Then high=middle
		If value>TQuickHelp.lowcase[middle-1] Then low=middle
		If low=high Then Return -1
	Forever
EndFunction


i do not testet above code - but it should work...


Mark Tiffany(Posted 2006) [#130]
is this true that all keywords are stored in one string - unbelievably :-)

wow wow wow

i recommend complete rewrite of this

Agree! I thought the same thing when I saw it, but don't personally fancy pulling skid's code apart right now.


Mark Tiffany(Posted 2006) [#131]
I posted an updated Windows executable last night with quite a few bug fixes and tweaks in. Once I nail a few more bugs, I think it's time to release our first "proper" update.


Difference(Posted 2006) [#132]
Looking good!


MrCredo(Posted 2006) [#133]
ah... 1 month of clean up source codes?

i think in this time we could create new, faster IDE with better features :-)


klepto2(Posted 2006) [#134]
Why taking a list and do a binary search, I would take a Tmap as a hash table. I think this will be alot faster.


Mark Tiffany(Posted 2006) [#135]
I would take a Tmap as a hash table. I think this will be alot faster.

Agreed. There's quite a bit that could be improved in that area, but probably needs to be thought about along with adding further code highlighting (e.g. your own functions, types, etc.)
i think in this time we could create new, faster IDE with better features :-)

There is a lot of tidying up that has been, and is still to do. And you could argue that starting from scratch might result in a better IDE. But the key word in your statement above is *we*. Give or take a handful of other contributions, most of the coding so far has been done by me. I have very little time to spend on this, and could not build an IDE from scratch alone. If more people were contributing, then we'd no doubt have done more. It's very easy to say that we should start from scratch, but that would require an awful lot of development effort that we don't have available to us.

(I'm not trying to slate anyone for not contributing, I'm grateful for all contributions, and would appreciate more. I'm merely trying to explain why a complete rewrite is impractical at this time).


MrCredo(Posted 2006) [#136]

I would take a Tmap as a hash table. I think this will be alot faster.



hm? tmap? i don't know
how works TMap? - but don't you need to to run through complete table? or how work this?

a binary search do not run through complete table


edit: here something:
http://www.blitzbasic.com/Community/posts.php?topic=51627
http://www.blitzbasic.com/Community/posts.php?topic=49028

but this module-source

	Method FindNode:TNode( key:Object )
		Local n=key.Compare( _key )
		If n=0
			Return Self
		Else If n<0
			If _left Return _left.FindNode( key )
		Else 'If n>0
			If _right Return _right.FindNode( key )
		EndIf
	End Method


i don't think that this is faster - and it work recursive


Mark Tiffany(Posted 2006) [#137]
TMap is a BRL mod (map.mod) that provides a better approach than a simple string comparison. However, it appears to simply start "somewhere" in the list of values and just move in the correct direction, but still only one key at a time. I guess this will typically halve the search time for a given key? Your approach would on average be even faster as it jumps by more than one key each time. I must admit that I thought TMap used a tree (i.e. when looking for "Abc" it goes to node "a", then to node "b" within "a", etc, which would be even faster when parsing, albeit somewhat slower when constructing.

I haven't dealt with this kind of stuff for so long, I forget all the terminology!


MrCredo(Posted 2006) [#138]
soooooooo... i tested it:

and TMAP is very very slow - compared with binary search:

Time for creating 42
Time for sorting: 1529
Time for search (ARRAY): 6 (errors:0)
Time for creating (TMAP): 3630
Time for search (TMAP): 2731 (errors:0)

tmap is 450x slower than binary search - the overhead is too much - you have so many objects and recursive searches etc...
(i optimiced my binary search again)

NOTE! for binaray search (in blitzmaxIDE)you should use separate "lowcased" strings


Global map:TMap = New TMap
Global node:TNode
Global array:String[10000]
Global tmp:String


'create random strings
t1=MilliSecs()

For i=0 To array.length-1
	For j=1 To 10
		array[i]=array[i]+Chr(Rand(255))
	Next
Next

t2=MilliSecs()
Print ""
Print "Time for creating "+(t2-t1)



'sort array (slow!)
t1=MilliSecs()

For i=0 To array.length-2
	For j=i+1 To array.length-1
		If array[i]>array[j] Then
			tmp=array[i]
			array[i]=array[j]
			array[j]=tmp
		EndIf
	Next
Next

t2=MilliSecs()
Print "Time for sorting: "+(t2-t1)
Print ""



'and now do binsearch
t1=MilliSecs()

For i=0 To array.length-1
	value=binsearch(array[i])
	If value=-1 Or array[value]<>array[i] Then error=error+1
Next

t2=MilliSecs()
Print "Time for search (ARRAY): "+(t2-t1)+" (errors:"+error+")"
error=0



'store the same valueas in TMap
t1=MilliSecs()

For i=0 To array.length-1
	Map.Insert(array[i],"")	
Next

t2=MilliSecs()
Print "Time for creating (TMAP): "+(t2-t1)



'and now do tmap-search
t1=MilliSecs()

For i=0 To array.length-1
	node=map.FindNode(array[i])
	If node=Null Or node.key()<>array[i] Then error=error+1
Next

t2=MilliSecs()
Print "Time for search (TMAP): "+(t2-t1)+" (errors:"+error+")"




Function binsearch:Int (value:String)
	Local high     :Int=array.length-1
	Local low      :Int
	Local middle   :Int
	Local oldmiddle:Int=-1

	Repeat
		middle=(high-low)/2+low
		If oldmiddle=middle Then low=high; middle=high Else oldmiddle=middle

		If value=array[middle] Then Return middle
		If value<array[middle] Then high=middle
		If value>array[middle] Then low=middle
		If low=high Then Return -1
	Forever
EndFunction



Jay Kyburz(Posted 2006) [#139]
I was board the other week and did start my own IDE from scratch. I have been cutting and pasting many of feature from MaxIDE. I will probably will make it public at some stage but really its just a little project for me to do while waiting for the 3d module. Its fairly buggy at the moment but I'm almost ready to start "eating my own dog food". (ie use it actually write code?)

The biggest hurdle i hit so far was the undo/redo code. I wanted to make it calculate the diffs on generic strings rather than relying on a textareatext. I also only wanted it called onKeyDown(). It smashed my brain and is still not working.

I've been separating logical components and relying heavily on messages for these to communicate.

@Creedo - thanks for this binary search tip. I'll try an implement it in JIDE. ;)


MrCredo(Posted 2006) [#140]
@jay - make IDE opensource... ;-)


RiK(Posted 2006) [#141]
Any chance of the latest source in the download for us Maccies?


Mark Tiffany(Posted 2006) [#142]
You should be able to get the latest source from the CVS through anonymous login. I'll try to post a copy of the current source later though...


Jay Kyburz(Posted 2006) [#143]
@ Mr Creedo, My source is embarrassing.


skidracer(Posted 2006) [#144]
Continued here...