• Print

Author Topic: The 1.95b version of my custom editor is done! (linux/mac compatible)  (Read 7214 times)

Cyperium

  • Hero Member
  • *****
  • Posts: 3285
  • Knowledge is good, but understanding is better
    • Cyperium
    • Email
The 1.95b version of my custom editor is done! (linux/mac compatible)
« on: May 31, 2010, 06:08:08 PM »
This download has been updated! The version is now 1.95b!

Download the .zip here: qb64editor.zip



It should be placed in the QB64 directory (where qb64.exe is at) otherwise you have to specify the qb64.exe location for compilation in the menu Options --> Paths. The QB64 runtime files are not included in the download so that's another reason for placing it in the QB64 directory.

Press F6 to search for errors, you can also set it to automatically search for errors previous to compiling. It could possibly find DO...LOOP errors that QB64 could reference wrong.


Try it! If you find any bugs please let me know!

New to 1.95b:
* Linux and Mac is now supported thanks to cr0sh!

cr0sh made the following changes:

Code: [Select]
Previous          Current     Usage
----------------- ------------------ ----------------------------------
CTRL + F          CTRL + SHIFT + F   Goto Highest Line + 5
 
F3  F3, CTRL + F       Find
   (updated menu to reflect)
 
CTRL + L          CTRL + G           Goto Line
   (updated Search menu to reflect)
 
CTRL + G          F9                 Graphical Analysis of Code
   (updated View menu to reflect)
 
For Linux/Mac:
 
   1. Added check for OS (windows vs everything else)
   2. Fixed renaming issue (ren to mv)
   3. Fixed forward/backslash directory issue
   4. Disabled option for mouse window resize - causes Linux to hang
(not sure about Mac)



« Last Edit: September 17, 2011, 05:44:02 PM by Cyperium »
Venture - New Prototype, QB64 Editor v1.95b (linux compatible, if you compile the source).

Lucid

  • Full Member
  • ***
  • Posts: 132
Re: The 1.0 version of my custom editor is done!
« Reply #1 on: June 02, 2010, 07:02:26 PM »
Looks great! All the options I missed are now in the editor. It works fast and the screen is bigger. But something went wrong. I don't know why, but I cannot open files. I can open them (Untitled changes into the new filename) but I don't see a source code. The syntax help doesn't work on my computer. It doesn't appear. Tomorrow I will download the files again and test it. Maybe it is my fault and has it something to do with the level of ethanol in my blood. One more thing. When I view the editor in full screen (with alt-enter) and I select "exit" I don't see a mouse cursor/block when the question "Are you sure..." appears. When I do this in Window-style, I do see a mouse cursor.

"QB64 is a compiler made by Galleon which translates BASIC code to C++"
This is true, but I wouldn't define QB64 like this. It is a programming language in the first place. I would write something like:
QB64 is a programming language for Windows and LINUX, based on QuickBASIC 4.5. It was developed by Galleon blablablabla...
(But in better English. :D)

If this is a stupid comment, I would also like to use the ethanol level in my blood as an excuse. :D
squirrel-monkey.com
freedutch.nl
igodu.org

Cyperium

  • Hero Member
  • *****
  • Posts: 3285
  • Knowledge is good, but understanding is better
    • Cyperium
    • Email
Re: The 1.0 version of my custom editor is done!
« Reply #2 on: June 03, 2010, 10:49:19 AM »
Lol, I'm glad that you commented! I think I'll change it to a better description, the bug that the mouse cursor isn't seen on fullscreen inside dialogs has simply been overseen by me, it is a easy fix and will be done as soon as possible!

It seems weird that it can't open files...hmmm...it works for me so I expected it to work for you too...what is your OS?

Try associating .bas files with it and double-click on a .bas file, let me know if that works.

Does regular help work? (shift + f1)

Also make sure that all files are in the same directory as the program.

I will do anything to solve these errors :) almost...lol
« Last Edit: June 03, 2010, 11:22:32 AM by Cyperium »
Venture - New Prototype, QB64 Editor v1.95b (linux compatible, if you compile the source).

Pete

  • Moderator
  • Hero Member
  • *****
  • Posts: 6240
  • Cuz I sez so varmint!
Re: The 1.0 version of my custom editor is done!
« Reply #3 on: June 03, 2010, 11:08:10 AM »
Vista does support the /b switch for bare file directory reporting but if I remember right, the output format is not the same as XP or WIN 98. That means if you are using positions in the output to find the result, like a$ = mid$(x$, 42), the variable you are searching for in the string might not be at position 42 in the string. It might be at position 50, instead! Because of these undependable differences, I recommend using INSTR to find what you need in the file, instead of using exact file output string positions.

Now maybe that is not the problem, because I haven't read your code, but if it sounds like ii might be, you might want to try a small code snippet that could be tested by Lucid and see what the results are.

Pete
It's only rocket science; it's not Linux!

Cyperium

  • Hero Member
  • *****
  • Posts: 3285
  • Knowledge is good, but understanding is better
    • Cyperium
    • Email
Re: The 1.0 version of my custom editor is done!
« Reply #4 on: June 03, 2010, 11:25:24 AM »
Yeah, just figured out that if he indeed can use the open dialog to open a file then the file listing should work at least...hence /b is working as it should...


One more thing, check to see if you can set the directory to QB64, if there is a error dialog then the problem is in the file exist checker.
Venture - New Prototype, QB64 Editor v1.95b (linux compatible, if you compile the source).

Cyperium

  • Hero Member
  • *****
  • Posts: 3285
  • Knowledge is good, but understanding is better
    • Cyperium
    • Email
Re: The 1.0 version of my custom editor is done!
« Reply #5 on: June 03, 2010, 12:39:52 PM »
I've found that dir/b doesn't find the file if there is a space in the pathname, I don't know right now how that is solved...the filename is still set, but since dir/b doesn't find it, it doesn't attempt to open it...I'll make it so that it attempts to open it and goes to a error handler if not found...that should solve most issues, but I'm perplexed as to why it doesn't display the syntax help, it should display even if the file is not found, I'll see what I can do about that.
Venture - New Prototype, QB64 Editor v1.95b (linux compatible, if you compile the source).

Cyperium

  • Hero Member
  • *****
  • Posts: 3285
  • Knowledge is good, but understanding is better
    • Cyperium
    • Email
Re: The 1.0 version of my custom editor is done! (download it again)
« Reply #6 on: June 03, 2010, 02:16:22 PM »
Updated it and most bugs should now be fixed. I haven't changed the version number, it is still 1.0, this will change whenever I update in the future though.

The bug were probably because the file checker didn't find the file since there was a space in the pathname. I will try to find a different method than SHELL in later versions. It has now been temporarily fixed using ON ERROR and you should be able to open files, running them might prove to be a problem though, I had to keep the SHELL in order to find if the renaming of your source was successful! Otherwise it might delete your sourcefile!! Done. (this has been fixed)

Also; in fullscreen when SHELL is used the program might hang! This is no good of course, but is solved by using the _HIDE option in SHELL. Running a file in fullscreen might be a bad idea though as the current version of the editor doesn't change from fullscreen when opening it, if a program hangs, use CTRL+ALT+DEL and close the editor manually. I haven't got time to fix this right now but will be able to fix it on sunday. Done.
« Last Edit: July 09, 2010, 08:24:12 AM by Cyperium »
Venture - New Prototype, QB64 Editor v1.95b (linux compatible, if you compile the source).

Lucid

  • Full Member
  • ***
  • Posts: 132
Re: The 1.0 version of my custom editor is done! (download it again)
« Reply #7 on: June 03, 2010, 04:57:30 PM »
I've found a bug. If you open 'help' and then open a file, the program ends (see (A) in http://img291.imageshack.us/img291/2218/qbedit.jpg).
And what is that character (B) in http://img291.imageshack.us/img291/2218/qbedit.jpg? Was this also there in the original QB45 editor?

I have downloaded your files again. I can open files now, but the compiling doesn't work. Even a simple program of one line gives an error as you can see here: http://img204.imageshack.us/img204/6541/qb64editor.jpg. All the menu's work, but the Syntax Help menu still doesn't open.

I use Windows XP professional (Dutch language pack, but that shouldn't be a problem) and I have stored your files in the same directory as QB64. Tomorrow I will reinstall QB64 with your editor in a clean directory and test it again.

PS: Can you also offer the files as one ZIP-file?  ;)

One more thing... If you need more details about my computer, directory setup, etc. to test your software, just ask.
« Last Edit: June 03, 2010, 05:20:35 PM by Lucid »
squirrel-monkey.com
freedutch.nl
igodu.org

Cyperium

  • Hero Member
  • *****
  • Posts: 3285
  • Knowledge is good, but understanding is better
    • Cyperium
    • Email
Re: The 1.0 version of my custom editor is done! (download it again)
« Reply #8 on: June 05, 2010, 10:35:35 AM »
Thank you for the bug-report, the error with help while loading a file is because the tfy (text field y) position has changed due to help being up and weirdly enough the formatting hasn't been updated, this will probably be a easy fix. Done.


Also the strange character (B) is supposed to be a 'hook' which you can use to resize the window, click on it with the mouse and move the mouse to change the window size and press 'ESC' when you are done (the info on pressing ESC is displayed at the statusbar), it works best if you move the mouse slowly (it takes some time for the window to update) - at least when you increase the size.

It doesn't surprise me that the compiling didn't work as I couldn't disable the file-exist-checker for compiling as it checks to see if the renaming of your file went ok, if it didn't check that and it didn't rename your file it could be deleted or overwritten. done (this is fixed)


The bugs you had will be fixed today, I will also see if I can fix the load-file/help-window bug.

It will involve:

1) Adding chr$(34) (") around the path and filename in the SHELL statement so that spaces in the path are dealed with correctly (easy). This will also solve the compiling error you got. Done.
2) Normalizing the window if running a file in fullscreen (easy). Will fix the program hanging when running in fullscreen bug. Done.
3) Update changedline to reflect the change of position of the textfield (easy). Will fix the help-error. Done. (closes help when resizing to solve the error).

Yes, I can offer them as a ZIP file (I already do offer them as a single RAR file though, but both options may be good to have and doesn't require much extra work). To recognise the RAR file SkyDrive has this map with a zipper icon, I don't know if you can differentiate between ZIP and RAR with the icon though, I will probably add (zip) and respectively (rar) in the filename. Done.

Could you post the path to QB64 and the path to your sourcefiles, it would be good just to see that they actually has a space within them, or if there is another character that it is unable to read correctly in the path.

Thank you for your engagement in this!

Edit: The bugs have now been fixed. I hope it works for you now, if not let me know :)
« Last Edit: July 09, 2010, 08:26:28 AM by Cyperium »
Venture - New Prototype, QB64 Editor v1.95b (linux compatible, if you compile the source).

fc00c

  • Newbie
  • *
  • Posts: 28
Re: The 1.1 version of my custom editor is done!
« Reply #9 on: June 07, 2010, 12:58:43 AM »
This program is amazing! :)

Well, I had a couple of problems with it. Firstly, the "custom font" option doesn't seem to be ready yet. I try to choose the "[...]" in the dialog to see if I could select a font, but the program crashes with the red "an error has occured".

As the package comes, the editor window is too tall for my laptop screen. There's no way to put in the coordinates from within the editor, so I had to go modify "editor.cfg". At first, I crashed the program doing it improperly, that is, focusing only on the width and height area of the "editor.cfg".

It's a bit clumsy having to call up QB64 to compile, and then run a program. But this occurs at every time, even when the program was never modified and the user only wants to run it again.

Nevertheless, this is just minor grumbling. This editor moves fast, how I like it! I got spoiled by the QB45 editor (except it doesn't have the cut/copy/paste keystrokes I came to expect with Windoze), but that's another story.

I also found the keywords text file useful for recalling the syntax of some of the BASIC built-in procedures and functions. There's a program that I wrote which I couldn't understand why it worked, because it used CIRCLE(x, y), r, c, but I had r and c switched and I had to be reminded about it!

Keep up the good work!

Cyperium

  • Hero Member
  • *****
  • Posts: 3285
  • Knowledge is good, but understanding is better
    • Cyperium
    • Email
Re: The 1.1 version of my custom editor is done!
« Reply #10 on: June 07, 2010, 03:30:41 AM »
Thanks :)

In the next release I'll add that it runs the program directly if it was never modified since last compilation (done). I'll also add the capability to put in the width and height of the window in the Options menu (done). I'll also make the window smaller to the minimum requirement to display help (done).

QB64 has to do the translation and compile it, I can't get around that, QB64 does the translation of the BASIC code and I can't compile it without that translation (and even with it it would probably be very complicated).


About the bug you are experiencing, can you post the path to your fonts?
...and check out this little program:

Code: [Select]
print environ$("windir") + "\fonts\"
Tell me what it returns :)


I'll add so that the error report gives more detailed information also :), when you see the 1.2 version most of these issues will be fixed.

The 1.2 version will also include;

* CTRL + E = go to the end of main (just before the subs and data) Changed to "jump to the first sub" done
* CTRL + R = jump to the last sub. done
* CTRL + A = go to the beginning of file. done (CTRL + A has been changed as of version 1.5 to select all text as in QB 4.5, to go to the beginning of the file press CTRL + T)
* CTRL + F = go to the end of file (after all the subs). done
* CTRL + Q = jump to the previous sub/function. done
* CTRL + W = jump to the next sub/function. done
* CTRL + N = Normalise (use this if you set a font you can't read/etc. to make the editor revert to the default settings, you have to update editor.cfg to save settings). done
* CTRL + S = Force subinfo (sometimes it may take a long time for the editor to find which sub you are currently in, this forces it to display it instantly). done

Added a list of all characters, if you rest the mouse on them you get ASCII code and Scancode, the list is hidden behind the textbox (just move it to view the list). If you click the mouse on a character it will simulate a keypress of that character. done

Progress:
(note that this is only "behind the scene" info, nothing has been updated in the download yet)
Better error handling (input in the error handler didn't work before) and better description of error is completed for version 1.2.
Also look after the bold done in the posts.

PS. Check out this thread from time to time to see if the version number has changed. I will only post a new thread for really big changes.
DS.
« Last Edit: July 21, 2010, 11:23:46 AM by Cyperium »
Venture - New Prototype, QB64 Editor v1.95b (linux compatible, if you compile the source).

fc00c

  • Newbie
  • *
  • Posts: 28
Re: The 1.1 version of my custom editor is done!
« Reply #11 on: June 08, 2010, 09:23:06 PM »
Quote from: Cyperium on June 07, 2010, 03:30:41 AM
... About the bug you are experiencing, can you post the path to your fonts?
...and check out this little program:

Code: [Select]
print environ$("windir") + "\fonts\"
Tell me what it returns :)
...
"C:\Windows\Fonts\" what else?  :P

I ran that 1-line program in QB64, though, not using your program.

I'm on a Sony laptop running 64-bit W7. I don't think the path to the fonts should be problem...

Cyperium

  • Hero Member
  • *****
  • Posts: 3285
  • Knowledge is good, but understanding is better
    • Cyperium
    • Email
Re: The 1.1 version of my custom editor is done!
« Reply #12 on: June 09, 2010, 05:10:04 AM »
Ok, exactly where does the program crash? Do you get to select a font even?

Also what is the size of the editor window? (you can find out by clicking the hook symbol at the bottom right - press ESC after you've seen the window size). If the window is too small to display the Open font dialog then there should only be a clicking sound


I will look into this, in the meanwhile I'll be completing the 1.2 version (perhaps tomorrow) and then you'll get more precise error message so we know what's going on (done).

The 1.2 version will also have support for _MOUSEMOVEMENTX and _MOUSEMOVEMENTY of course (in the syntax help and formatting)(done). Also a bug involving exit when screen is too small will be solved (done).
« Last Edit: June 11, 2010, 09:35:56 PM by Cyperium »
Venture - New Prototype, QB64 Editor v1.95b (linux compatible, if you compile the source).

Clippy

  • Hero Member
  • *****
  • Posts: 16431
  • I LOVE π = 4 * ATN(1)    Use the QB64 WIKI >>>
    • Pete's Qbasic Site
    • Email
Re: The 1.1 version of my custom editor is done!
« Reply #13 on: June 09, 2010, 09:53:33 AM »
_MOUSEMOVEMENTX and _MOUSEMOVEMENTY are not in the WIKI yet. All I know is that they hide the cursor. What exactly do they return and how are they used?

Ted
QB64 WIKI: Main Page
Download Q-Basics Code Demo: Q-Basics.zip
Download QB64 BAT, IconAdder and VBS shortcuts: QB64BAT.zip
Download QB64 DLL files in a ZIP: Program64.zip

Cyperium

  • Hero Member
  • *****
  • Posts: 3285
  • Knowledge is good, but understanding is better
    • Cyperium
    • Email
Re: The 1.1 version of my custom editor is done!
« Reply #14 on: June 09, 2010, 03:17:39 PM »
Yes, that would be my question also. I would guess the number of pixels since the last read (much like _MOUSEWHEEL). It also hides the mousecursor.

I would think that it returns -num for x to the left and +num for x to the right, 0 for no movement (always relative to the last read).

Galleon mentioned the main purpouse was games. 3D games to be exact (he's using it in his 3D game).


I wonder if it was a bad move to hide the cursor at the same time, I mean, it could be used for other things than games...but I guess you can always show the cursor again with _MOUSESHOW...
Venture - New Prototype, QB64 Editor v1.95b (linux compatible, if you compile the source).

  • Print