BasEdit.NET

You need an actual VIC.

Moderator: Moderators

User avatar
Gurce
Vic 20 Drifter
Posts: 30
Joined: Wed Jul 18, 2012 10:37 pm

V1.4.4

Post by Gurce »

Hi Björg,

Hehe, understand, I imagine it is the same feeling a father feels when some guy starts going out with his daughter! :D So I promise I'll be nice to her and bring her home before midnight ;)

Changes in v1.4.4:
  • added some shift+home and shift+end selection support (again, not perfect, ok-ish)
  • Shift+Left arrow selection seems to work ok-ish now (not perfect)
I'll try make a habit of tackling a few incremental things like this per weekend, will be a good way to gain some confidence with the codebase, TortoiseHg and sourceforge.

So perhaps for next weekend:
- fix mouse selection to left of cursor
- allow deletion of selection with DEL or BACKSPACE keys
User avatar
Gurce
Vic 20 Drifter
Posts: 30
Joined: Wed Jul 18, 2012 10:37 pm

v.1.4.5

Post by Gurce »

Ok then, here's a few more updates in v1.4.5
  • Auto-swap filename from .txt to .prg when pressing F5 to save/run
  • Auto-swap filename back from .prg to .txt when saving as petscii
  • Added a few accelerator keys to menu items
  • DEL/BACKSPACE keys will delete selection (currently only works for single-line selections, will attempt multi-line later)
  • Initial effort at mouse-to-left text selection (as always, works ok-ish ;)
Hmm, pondering my pet-tasks for next week:
- US-101 keyboard key-map (perhaps some commodore key-positions of standard characters such as quotes, colon, semi-colon are a bit unusual for newbies)
- improve support multi-line selections
- an auto-updater?

With the auto-updater, thought it might be more convenient for users, rather than visiting sourceforge, manually downloading, manually unzipping. Probably will be a fairly heavy task (in comparison to the others so far), but once it's done, will be nice for contributors (their updates will get shared quickly) and users (they'll get the latest updates instantly).

Well, let's see if there's time for it next week then... :)
pallas
Vic 20 Devotee
Posts: 212
Joined: Mon Dec 24, 2012 2:38 am

Post by pallas »

Hello!

I was trying to run basedit on linux but it crashes with long stack traces whenever I do almost any task other than typing.
Any suggestion on how to debug? Should I post the stack traces or send them to someone?
Better run it with wine instead of mono?

Many thanks!
User avatar
Gurce
Vic 20 Drifter
Posts: 30
Joined: Wed Jul 18, 2012 10:37 pm

Post by Gurce »

Hi pallas,

I'm giving BasEdit.net a try on my Linux pc now. I see what you mean, with mono it is crashing a lot...

I tried it with wine, it seems to be performing better there.

If you have the appetite to do some debugging and resolve the mono issues, you're more than welcome to tweak the source code at sourceforge and upload a new version with some fixes.

http://sourceforge.net/projects/baseditnet/

This is Björg's creation, I just pushed it to sourceforge once he made it open-source and made a few tweaks. It's written in VB.Net 2010, we're using Mercurial version control. If you have mercurial installed, you can check it out with:

hg clone http://hg.code.sf.net/p/baseditnet/code baseditnet-code

I believe the project is open-access to everyone, but if you (or anyone else) have any issues pushing your changes back into the repo, let me know and I'll look into it.
pallas
Vic 20 Devotee
Posts: 212
Joined: Mon Dec 24, 2012 2:38 am

Post by pallas »

I'll be very glad to help!
Here some ideas:

I first tried to install mono runtime for VB 2010 but it said "unknown entry point" when starting basedit.
So I installed the runtime for VB 2005 and it started up, but with all the crashes.

Here is a sample trace clip (loading a prg):

Unhandled Exception: System.ArgumentException: Insufficient Space
Parameter name: bytes
at System.Text.UTF8Encoding.InternalGetBytes (System.Char* chars, Int32 count, System.Byte* bytes,

This may be related to running it on 64 bit instead of 32.

Another one (double click on a character of the map):

Unhandled Exception: System.IndexOutOfRangeException: Array index is out of range.
at BasEdit.frmMain.ShowOneLine

If someone has a 32 bit linux, it would be nice to try it there and see if it works.
Unfortunately I have no knowledge of visual basic, net or mono but I'll try to be of help ;-)
User avatar
Gurce
Vic 20 Drifter
Posts: 30
Joined: Wed Jul 18, 2012 10:37 pm

Post by Gurce »

I've tried it on a 32-bit linux pc, I have seen errors that sound similar to the ones you have described.

Like you, my mind is a bit blank when it comes to vb/mono. I did try install monodevelop and try re-build the app, but haven't had much luck, seems like a new learning curve that I don't have the stomach for just yet :D
pallas
Vic 20 Devotee
Posts: 212
Joined: Mon Dec 24, 2012 2:38 am

Post by pallas »

It runs fine on wine for me as well, just by installing mono for windows.
I suppose it's not worth learning C#, .NET etc just to fix it on mono :-)
User avatar
e5frog
Vic 20 Nerd
Posts: 551
Joined: Sat Feb 17, 2007 5:46 pm
Website: http://channelf.se
Location: Sweden
Occupation: Service Engineer

Re: BasEdit.NET

Post by e5frog »

Great program, this is what CBM prg Studio is missing, syntax highlight, editing basic with proper font and graphical characters. I just tried it, I haven't read the thread, sorry if I address issues already discussed. I'm also sorry if it seems a bit much it was just details that annoyed me when trying to use it for the first time a lot of things I'm used to being there in any PC text editing or C64.


Pushing left when at beginning of a row - I'd expect to end up after the last character of the previous row (if any).

Scroll bar sideways, please - or addition of row break, which would be nice to be able to view code as it looks on the real thing.

No abbreviated commands P(shift O) looks proper but it crashes the program upon a syntax check, .NET "Index was outside the bounds of the array." and program says "Syntax error in Line 10 PÏ53280,1 Continue with next line?" When I tried to P(shift O)53280,1

It doesn't remember the directory where I last fetched a program, seems to start in the installation directory every time, I guess I'll put a short cut there...

Why double click on insertion of symbol from "Character Set", single click would have been fine.

Seems there's a problem trying to open a file with emu placed at C:\Documents and Settings\name\Desktop\file.prg - as there's no "" it takes everything after the first space as extra argument and there's an error. It was solved by editing EmuParams to "%F"... perhaps a good default value including the "-signs ?

CTRL+Z (or undo), very good way to cancel something you did wrong, I miss it. :-(

If I change MaxLength to something shorter than what was used before there's no warning when loading, extra bytes simply disappear from that line if I try to edit. (CTRL+Z doesn't solve the problem), if a lot was edited before, not saved, and one of these long lines is partially deleted... You need to reload or try and copy the rest of that line over somehow.

Missing mouse to highlight a part and then drag and drop that part somewhere else - would have been handy if you just want to reorganize finished code.

CTRL+X after manually highlighting text with space and cursor keys doesn't cut that part out (clicking with mouse while holding shift doesn't work either). I guess the normal CTRL-functions have been replaced to function as the C= key - it took me that long to figure it out... ;-) At least with the CCS64 keymap that I activated in the ini - for some reason.

Highlight going left and holding shift doesn't work, only right.

I can right click manually highlighted text but only copy or insert text, not cut (copy and erase). Which is perhaps good when there's no undo.

I can't hold shift and press "end" button to highlight the rest of the line, nothing happens, shift + home also does nothing (wish that it would have highlighted from cursor to beginning of line)

I can move cursor far beyond the longest line of any, without adding characters or spaces... odd, should really stop at the longest line's last column IMHO or continue to the start of the next line when it reaches the end of the current line.

I noticed shift+insert is "paste", I accidentally pressed space as I tried pressing insert - and notice the cursor got more C64-like in the "write over mode". I like that mode but I need the shift+erase to make room sometimes. When trying shift+del strange things started to happen and suddenly all the code was gone...

I was checking to see if I could jump one "word" at the time with shift+cursor - no, when following that with Ctrl+cursor left I crashed the program, at least these are familiar from CBM prg Studio... "startIndex cannot be larger than length of string. Parameter name:startIndex".
Holding Ctrl and pressing right causes cursor to jump past DATA1,2,3,4,5,6: but then it was more random stopped in a PRINT"xxxxx" statement etc. trying Ctrl+left sometimes worked similar, sometimes odd, sometimes crashed.

Pressing F9 for save doesn't seem to do anything.




That's all my whining for now...
Despite this I guess I'll be trying this instead of CBM prg Studio for the Ten Line basic competition, program feels friendly with the C64 font and proper graphical characters, great work!
Last edited by e5frog on Thu Feb 05, 2015 5:48 pm, edited 1 time in total.
My other interest: http://channelf.se
User avatar
Gurce
Vic 20 Drifter
Posts: 30
Joined: Wed Jul 18, 2012 10:37 pm

Re: BasEdit.NET

Post by Gurce »

Hi e5frog,

I take your point on a lot of the issues you noticed. I also enjoyed Bjorg's program and felt motivated to fix a few of the niggling things that bugged me. I put that effort on sourceforge.

http://sourceforge.net/projects/baseditnet/

Since then, sadly I didn't have much time to spare to push any further with it, my work it sucking up all my spare time :(

But if you feel like you'd enjoy chasing up a few of niggling points that are bugging you, you're more than welcome to access the mercurial repo on the site, make some commits and release.

I haven't used the sourceforge site for a while, but I can still log-in and tweak any access-rights you need if there's any access probs.

I recall adding a few wiki-pages with information on how to do the mercurial checkout here:

http://sourceforge.net/p/baseditnet/wiki/Home/

I also did make a few blog posts at the time which had some info on various aspects: mercurial repo cloning info, how to monitor changes, pre-reqs (VB.Net 2010, .Net 3.5), sharing a release:

http://sourceforge.net/p/baseditnet/blog/

Hope that helps.

Regards,
Gurce
User avatar
e5frog
Vic 20 Nerd
Posts: 551
Joined: Sat Feb 17, 2007 5:46 pm
Website: http://channelf.se
Location: Sweden
Occupation: Service Engineer

Re: BasEdit.NET

Post by e5frog »

I wish I could help, I'm afraid I'll mess things up if I try to dive into that. Didn't know where to nag, this seemed like a place where someone would listen and maybe come up with a solution - which I did. Thanks Gurce!

Maybe Mr Jordison could have a look and maybe implement this excellent editor in the CBM prg Studio... he works with the same .NET solution.

I got my program pieced together, I thought it was hardest to get used to the copy and paste buttons.

My changing skills were limited to editing the keymap to be the same as in WinVICE that I have gotten used to but the reallocation of editor commands CTRL+Z,X,C,V messed it up a little, I'll try and choose better buttons later next time I need it (maybe another 10 liner for the competition). If I could choose I'd keep the common editor commands and perhaps use shift+ctrl for those four graphical characters or maybe Alt instead.

Checking the 1.4.5... do you remember what is changed - or will I notice? Thanks!
Last edited by e5frog on Sat Feb 07, 2015 4:17 pm, edited 1 time in total.
My other interest: http://channelf.se
User avatar
e5frog
Vic 20 Nerd
Posts: 551
Joined: Sat Feb 17, 2007 5:46 pm
Website: http://channelf.se
Location: Sweden
Occupation: Service Engineer

Re: BasEdit.NET

Post by e5frog »

I worked some more on the Keymap, it's as close to WinVICE now as I could get (skipping insert and delete), it's adapted to my Swedish keyboard as well. Example ini file also included.

I added Ctrl+1,2,3... as AltGr functions (colors in print statement etc), using alt makes the menu activate which is annoying and you have to release that grip before continuing typing. For some reason ctrl+4 is marked in blue... Perhaps the graphic symbol and the token are mixed up?

Also added Ctrl+F1-F8 to get the graphical characters for print statement, sometimes used to check if an F-button is pressed.

Also when in a print statement you can hold CTRL and make letters appear as reversed, I added that function as well on AltGr, most of them worked except reversed @ (0), I (tab), H (erase). But you can grab these from the Font box if you need them.
Other than that it's mostly positions of characters that I wasn't used to.

Looked some at the code, I see there's a lot of files, don't know where to start. I did figure out there's a TokenList-file, I tried changing some in i, tried to get the abbreviation of end working, noticed it doesn't accept two definitions of the same command (END didn't turn blue anymore) and I couldn't find any character that made the command in the editor (that looks like "E/" graphical character) to be interpreted as a command, tried eî, eÎ, eN and with E and combinations, nothing. Replacing print with ? seemed to work, but the syntax check complained. It was possible to save and after reloading they appeared as PRINT though so... it only seems to go one way. I guess an edited token list could be done if I knew how to properly write the shifted characters.

Dream scenario would be to be able to toggle code between normal view and abbreviations.
Attachments
BasEdit.Net.zip
(5.49 KiB) Downloaded 305 times
My other interest: http://channelf.se
User avatar
e5frog
Vic 20 Nerd
Posts: 551
Joined: Sat Feb 17, 2007 5:46 pm
Website: http://channelf.se
Location: Sweden
Occupation: Service Engineer

Re: BasEdit.NET

Post by e5frog »

BasEdit.Net needs a donation button, so people can show their gratitude. ;-)
My other interest: http://channelf.se
User avatar
Gurce
Vic 20 Drifter
Posts: 30
Joined: Wed Jul 18, 2012 10:37 pm

Re: BasEdit.NET

Post by Gurce »

Thanks for sharing your efforts with the WinVICE keymapping :)

Yep, I agree that if an editor like this got integrated into Mr Jordison's CBM prog studio, that would be a wonderful thing.

I'm afraid I haven't got a great deal of answers on where to hunt in the code, as I haven't looked at the codebase for quite a while. Bjorg is more intimately acquainted with the entire codebase and might have some tips for you on where to dig if he's got some time to spare, although I remember he's quite busy these days too. Alas, whatever happened to free-time! :)

As for what changed in V1.4.5, only incremental things, mainly to do with adding text-selection with the mouse, which was the gripe I wanted to address at the time.

If you wanted to study each incremental commit in the Mercurial repository history, you can do this online at:

http://sourceforge.net/p/baseditnet/cod ... log/?path=

(or via an alternate mercurial gui front-end / diff'ing tool you prefer, perhaps TortoiseHg or EasyMercurial).

Personally, I think sourceforge history looks a bit sloppy and hard-to-read, so if you go that path, here's some pointers to help get your bearings with it:
  • Try search the page for the term "Added tag", to see which commits are the version labels (eg, V1.4.5, V1.4.4, V1.4.3, etc).
  • Then study the individual commits between the version-labels you are interested in by clicking on those [123abc]-style links at front of each commit heading.
As for what you're trying to accomplish with the reading of the token file, I'll have a quick sniff around the code now see if I notice anything:
  • The "modUtility.vb" file mentions a "myConfig" object with a ".TokenFile" member which seems to hold the path to the token-file to be loaded.
  • In the "modUtility.vb" - LoadIni() sub, towards the end, I see a call to the LoadToken() sub
  • This LoadToken() sub seems responsible for parsing the token file, perhaps a study of it might reveal how it accomplishes the reading of shifted-characters.
  • Or if you find after studying the innards of this sub that it doesn't handle shifted-characters at all, perhaps it will be the right place to inject your own code to assure it does.
Anyway, that's my 'best guess' blind advice :)

All the best with it, hope you figure it out :)

As for the idea of a donate button, that sounds good too, if only I had time to figure out how to add such a button! :D
User avatar
e5frog
Vic 20 Nerd
Posts: 551
Joined: Sat Feb 17, 2007 5:46 pm
Website: http://channelf.se
Location: Sweden
Occupation: Service Engineer

Re: BasEdit.NET

Post by e5frog »

We're adults, we have a life - not so much time to spare. ;-)

I have e-mailed a bit with Arthur Jordison, he seems interested in the idea, at least grabbing some bits and pieces or get inspiration.

If I managed to find a place to edit, I edit it, how do I compile it to a runnable file? Do I need to download some 100GB development package to do that? I might experiment with it if I'm able to try the result. I have used that Tortoise program for when making changes to the 1541 Ultimate II firmware - that's one of those unnecessary huge development downloads...

PayPal donate button:
https://www.paypal.com/us/cgi-bin/?cmd= ... ro-outside
My other interest: http://channelf.se
User avatar
e5frog
Vic 20 Nerd
Posts: 551
Joined: Sat Feb 17, 2007 5:46 pm
Website: http://channelf.se
Location: Sweden
Occupation: Service Engineer

Re: BasEdit.NET

Post by e5frog »

Here's an example for HTML:

<form action="https://www.paypal.com/cgi-bin/webscr" method="post" target="_top">
<input type="hidden" name="cmd" value="_s-xclick">
<input type="hidden" name="hosted_button_id" value="C8Y5CZ6QH3CRY">
<input type="image" src="https://www.paypalobjects.com/en_US/SE/ ... eCC_LG.gif" border="0" name="submit" alt="PayPal - The safer, easier way to pay online!">
<img alt="" border="0" src="https://www.paypalobjects.com/en_US/i/scr/pixel.gif" width="1" height="1">
</form>

For e-mail:
https://www.paypal.com/cgi-bin/webscr?c ... 5CZ6QH3CRY
My other interest: http://channelf.se
Post Reply