Request : Include within Types

BlitzMax Forums/BlitzMax Programming/Request : Include within Types

Gabriel(Posted 2006) [#1]
I'm barely scratching the surface of my current project and I've already got a type which is 1000+ lines long. Now this wouldn't be a problem if every single IDE didn't mangle the code once it starts getting over 1000 lines long, but they all do, regularly and I'm sick of losing my work, quitting, and starting all over again every time.

If I could split a type up over several include files, it would go someway toward mitigating the posterior pain this is causing me.

Having said that, an IDE which doesn't use whatever rich edit control is responsible for this code mangling would be great. I never seem to get this in, for example, Dev C++.


REDi(Posted 2006) [#2]
could use Extends, you can split it all up into seperate types.


Dreamora(Posted 2006) [#3]
Use Blide, it doesn't use RichEdit

Or wait for HydraMax which doesn't use it as well as it is scintilla based


LineOf7s(Posted 2006) [#4]
...if every single IDE didn't mangle the code...


Based on previous posts, this includes Blide.


Dreamora(Posted 2006) [#5]
He mentioned rich edit and Blide isn't using it, its using .NET 2.0


Gabriel(Posted 2006) [#6]
Blide does mangle the code. I don't know if it's related but official Blitz IDE's hae always done it. Blitz3d, BlitzPlus and BlitzMax on ever computer I've ever owned. Blide has done it on the last two computers. They' both do it in a pretty similar manner, so I just assumed it was something they had in common.

could use Extends, you can split it all up into seperate types.


Uh huh.. wish I could really, but I've already split this thing down a lot. I've got it down to a separate include file for every tab of the application. Can I break it down more than that? Yeah, but it's really going to be inconvenient going back and forth between tabs in the IDE for items which are on the same tab of my application. Also the vast majority of the code comes as one huge function which won't split, even with extends. ( So I guess include within functions would be nice too :P )


ziggy(Posted 2006) [#7]
Just a question, what are your systems specs?


Gabriel(Posted 2006) [#8]
I can't see that offering a solution, since the problem has persisted over five PC's, none of which shared a component.

Currently running an Intel 830, GF 6600, Gig of ram. XP Pro.

Previous system which suffered exactly the same way was Athlon XP 2700+, Radeon 9700 Pro, Gig of ram. XP Pro and XP Home ( dual boot. )


Gabriel(Posted 2006) [#9]
He mentioned rich edit and Blide isn't using it, its using .NET 2.0


You might want to check the "Is there a better IDE" thread, because according to Ziggy ( who I really think should know ;) ) it IS using it.


Smurftra(Posted 2006) [#10]
i have code that is way longer than 1000 lines in blide, and have never had any problems.


H&K(Posted 2006) [#11]
You know in VC when you give a template, them give the actuale code somwhere else.

Can Bma do that, or can it be made to do that.


Dreamora(Posted 2006) [#12]
No
BM (as many other languages) does not support separation of declaration and implementation


Damien Sturdy(Posted 2006) [#13]
Blide has this habbit of just not rendering the text im typing, though its much better than before, and its never ruined my code. I've heard reports of it doing so,


This one time, in band camp..... I wrote some code in Blide, and opened the code in the official Max IDE, and all I saw was alittle "Y" character.

All would have been find, but because i hit f5, it saved the Y to disk, over my source.

The new version of blide seems to make code that does load in the maxide though, so thats great :)


Yan(Posted 2006) [#14]
@Gab - Sounds a bit weird to me. I've regularly worked with code well over 1K lines over the years, in the B2D, B3D and Max IDEs and I've *never* experienced the problems you've described.

Logic would suggest that were this a common problem, the bug forums would be awash with reports, it's obviously not so this must be an extremely rare occurrence at best and can't just be 'a problem with Windows riched box' without other factors being involved.

Even though you've tried it across several PCs, doesn't mean there aren't common factors involved. Is there a particular app you always install for instance, or do you never install SP1/2?

Have you tried using the IDE on a fresh install of windows, without installing anything else?

Sounds like a pretty frustrating problem to be having. :o/


Dreamora(Posted 2006) [#15]

Logic would suggest that were this a common problem, the bug forums would be awash with reports, it's obviously not so this must be an extremely rare occurrence at best and can't just be 'a problem with Windows riched box' without other factors being involved.


Actually it is. IDE and/or MaxGUI bugs fill the bug bin to a quite high percentage given the fact that the GUI only makes a small part of BM.


Tachyon(Posted 2006) [#16]
10k lines of code in the largest .bmx of my project and the default IDE crashes on me regularly. Blide crashed on me within 10 minutes of starting it for the first time. I'm desperately wanting a stable environment to work in.


ziggy(Posted 2006) [#17]
There will be some stability fixes in next BLIde version, spetially regarding the text rendering routines (now a simple GDI+ rendering mode will be available, I hope this will solve a lot of stability issues).

It would be very very helpful if those who have tried BLIde, and have experienced any problem, report them to me, in order to fix them. If you don't do it, it's just impossible.

It seems to be a bug in the Microsoft RichTextBox control when used in dual core computer on windows XP SP2 I'm trying to find a way to solve it as soon as possible.


Yan(Posted 2006) [#18]
Actually it is. IDE and/or MaxGUI bugs fill the bug bin to a quite high percentage given the fact that the GUI only makes a small part of BM.
All these reports are for the same thing?..And what of B3D and B+?..Me thinks you've missed the point, yet again, Dreamora. ;o)


Gabriel(Posted 2006) [#19]
i have code that is way longer than 1000 lines in blide, and have never had any problems.

Great! All my problems are solved if you don't have any problems then.

Logic would suggest that were this a common problem, the bug forums would be awash with reports, it's obviously not so this must be an extremely rare occurrence at best and can't just be 'a problem with Windows riched box' without other factors being involved.

Logic would suggest that people would have noticed all the people who have reported experiencing it over the years too, but apparently it passes them by if it doesn't affect them, leading them to believe it's an extremely rare occurrence ;)

Even though you've tried it across several PCs, doesn't mean there aren't common factors involved. Is there a particular app you always install for instance, or do you never install SP1/2?

No, there is nothing in common between all of the computers I've had this on. I first experienced it with Windows 98, so I think we can safely rule out SP1 and SP2 for XP ;) I've had PC's with 98, XP Home SP0, SP1 and XP Pro with SP0, SP1 and SP2 over that time, and always have had whatever is the latest installed. Never makes any difference though. As you might imagine there is nothing installed on my current PC ( hardware, software or firmware ) which is the same as a machine from six or seven years ago.

I think more likely is that the thing in common is coding style. Perhaps it's related to whitespace, any of a hundred little habits one might develop over the years and not even notice which - if not a trigger - make it more likely to happen. Lots of copying and pasting, or none. Could be almost anything, but I'm pretty sure it's this rich edit control, because it never happens in Apps which don't have it. ( And I didn't even know Blide had it when I first started reporting the same problems with Blide, so that's no coincidence. )


Yan(Posted 2006) [#20]
Logic would suggest that people would have noticed all the people who have reported experiencing it over the years too, but apparently it passes them by if it doesn't affect them, leading them to believe it's an extremely rare occurrence ;)
Definitely not 'awash with reports' though, which, considering the number of years and users involved, suggests a relatively rare occurrence to me. ;op

You're probably right about the coding style being the main contributory factor. Still, pretty weird all the same. :o)


Gabriel(Posted 2006) [#21]
Well I can't speak for anyone else, but I got bored of reporting it years and years ago. Mainly because it was always my fault or my imagination or something wrong with my computer. You tend not to find anyone admitting they've suffered from it until someone stupid ( IE: me ) starts a thread like this.


ziggy(Posted 2006) [#22]
Just to mention, I've been making test with bmx files of over 12000 lines of code in BLIde without any problem, This doesn't mean the problem doesn't exists. This means the problem happens in a not so easy to find circumstance. I let you know any progress.


Mordax_Praetorian(Posted 2006) [#23]
I conclude that there is some sort of psychic interface you have with your computer that causes the problem


cloned(Posted 2006) [#24]
use extends and include, keep the bulk of the type in a seperate file.


Gabriel(Posted 2006) [#25]
use extends and include, keep the bulk of the type in a seperate file.

This was already suggested and rejected for a good reason.


Mordax_Praetorian(Posted 2006) [#26]
Y'know, there is 1 code editor that is 100% reliable on absolutly all computers, and you can find it on every single PC that runs windows

To find it click:
Start->All Programs->Accessories->Notepad

You wont get any of the snazzy features of other editors, but at least your code wont dissapear

With problems like this I might actualy consider using it


Gabriel(Posted 2006) [#27]
To quote myself from another thread :

What with that and BMax's copy and paste ( which contrary to my initial impressions isn't fixed ) I end up coding in wordpad half the time :/


So not quite notepad, but yes, I have to sometimes.


Tachyon(Posted 2006) [#28]
Skid is aware of problems with the IDE.

http://www.blitzbasic.com/Community/posts.php?topic=62866


kenshin(Posted 2006) [#29]
Might be worth sending one of these crash prone files to the ide authors. It's probably going to be quicker for them to fix the bug that way. I'm not having this problem and I tend to use heaps of whitespace, indenting, and comments. It's probably something simple to fix, if it can be repeated. I vaguely recall someone posting a few lines (<10) that could crash the ide every time, but I think this was fixed. Maybe there's still a problem thats related to that though.


Leiden(Posted 2006) [#30]
Dont know if this is any help but highlighting is causing most of the problems for me. For instance If I open a file with 10,000 lines and no keywords that would be highlighted its fine, opens quick and scrolls fine. But, If I change that 10,000 line file to be full of keywords the ide just lags up, crashes, and tries to send an error report (which would probably crash too knowing windows).


ziggy(Posted 2006) [#31]
@Leiden: Wich IDE are you talking about? If it's BLIde, can I get this file? (I promisse I will delete your source code after making all tests and improvements to BLIde, and your code will not be used in any way)

If anyone else (Gabriel?) can provide a file that is causing this on BLIde, please feel free to send it to me. I will delete the files after the testing process and I will not use any of the code in those files. I think the comunity can take proffit of it, if this is arranged.


Tachyon(Posted 2006) [#32]
Ziggy: that's what happened to me as well. Blide locked up while I was highlighting a block of code.

No, I can't send you the file that caused this, but all my code is written clean with proper use of indents and empty space.


Fetze(Posted 2006) [#33]
I'd like to add that, generally, a "DirectInclude" which just copies the content of the specified file to the Includes position, would be very nice.

So you can include *anywhere*, know what I mean?


Leiden(Posted 2006) [#34]
Nah it was just with the default IDE, it was just the same line of keywords copied over and over again. Blide is great, I have no problems with large source files.