April 18, 2024, 03:39:27 PM

News:

IonicWind Snippit Manager 2.xx Released!  Install it on a memory stick and take it with you!  With or without IWBasic!


Andy's editor Q & A

Started by Andy, November 08, 2020, 03:40:07 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Egil

Hi Andy

When starting this version of the editor for the first time, the welcome text was shown whithout scrollbars. No file name was shown in lower left corner.

Then I opened Brian's code, and both scrollbars where shown, but I was only able to scroll horizontally. Now the filename was shown in lower left corner.

After exiting the program whithout closing the edited file, and then restarting the program, I was able to scroll up/down and left/right. The filename shown in lower left corner.

Hope this worked on my system as intended.

Good Luck!

Egil
Support Amateur Radio  -  Have a ham  for dinner!

Andy

November 20, 2020, 02:30:38 AM #26 Last Edit: November 20, 2020, 02:35:42 AM by Andy
Egil,

Thanks for that.

With the welcome screen up, there is no scroll bar or tab name - so that's correct at that point.

Can I ask, before opening Brian's code, did you do both tests?

The editor needs to purge some of it's internal work files before opening a file on your machine for the first time.

Both Test 1 & Test 2 purge these files for you.

Andy.
Day after day, day after day, we struck nor breath nor motion, as idle as a painted ship upon a painted ocean.

Egil

Sorry, forgot to mention the tests.

After both tests I saw the filename in lower left corner after loading, but was only able to scroll horizontally in both cases.

Now I'll stay at home the rest of the day, so if you want me to test more, just give me a word.


Egil
Support Amateur Radio  -  Have a ham  for dinner!

Andy

November 20, 2020, 04:20:35 AM #28 Last Edit: November 20, 2020, 04:23:58 AM by Andy
Thanks Egil,

It would be a help!  :)

1. Can you go to the "Res" folder please, and delete out all *.txt & *.pth files.
2. In the same folder, please create a new text file simply called first.txt - just a simple empty file.

Then run the program again for me & try one of your files (one that I don't have here).

On opening a file, or clicking on a tab the scroll range should be updated to the number of lines the rich edit has, so you should always be able to scroll whatever the file.

Thanks,
Andy.
Day after day, day after day, we struck nor breath nor motion, as idle as a painted ship upon a painted ocean.

Egil

Deleted the files you mentioned and made a new empty text file.
Then I loaded my own file called skeleton.iwb. The filename was shown in lower left corner, and was able to scroll both horizontally and vertically.

Then I closed the file, and tried to load it a second time. Now the filename was shown in the corner, but no file was loaded into the edit window.


Egil
Support Amateur Radio  -  Have a ham  for dinner!

Egil

Forgot to say that when loading my own source file the second time, I clicked the icon "open file".
When trying to use the file menu, nothing happened.

egil
Support Amateur Radio  -  Have a ham  for dinner!

Andy

November 20, 2020, 05:21:12 AM #31 Last Edit: November 20, 2020, 05:26:54 AM by Andy
Thanks Egil,

Think I'm getting closer.

In the "Res" folder, do you see / can you open skeleton.pth & skeleton.txt? (open with notepad)

Can you paste in what they both say in the files please.

The .pth file should give you the full file path name.
The .txt file will have some details about what skeleton.iwb subs, windows has etc.

These files are an old hangover from when loading files took "some time", and I think I can bin these now. If that's the case I will work on that tomorrow - started at 5 am this morning!

Thanks,
Andy.
Day after day, day after day, we struck nor breath nor motion, as idle as a painted ship upon a painted ocean.

Egil

I attach both files in a zip-file.

Egil
Support Amateur Radio  -  Have a ham  for dinner!

Andy

November 20, 2020, 05:53:53 AM #33 Last Edit: November 20, 2020, 05:55:30 AM by Andy
Egil,

Supremely helpful.

In the txt file you have

:sr-0!1  = Scroll range.

From zero to line 1.

It should be how ever many lines are in the rich edit, and as you say the rich edit is empty, that makes my mind up - these files are going to be binned.

I simply don't need them anymore after implementing fast loading of files.

I will remove the creation of these files, and test tomorrow without them and see how I get on.

Thank you so much my friend for taking the time!

Most helpful...

Andy.
:)
Day after day, day after day, we struck nor breath nor motion, as idle as a painted ship upon a painted ocean.

Andy

Well,

Woke up this morning with what I think is the answer to the first time scrolling problem.

Before I used the fast loading of a file code (which I need), I was adding a CHR$(13) + CHR$(10) to every line before setting the rich edit with the file.

The fast loading code doesn't (or rather I can't) add these to every line.

I remember in the dark and dim past why I was adding these to every line...

I had the same initial problem with some files.

So I need to test a file.

If you are able to, can you send me a file that you could not scroll with the first time you loaded it into my editor please?

It's the only way I can test this theory out.

Many thanks,
Andy.
:)
Day after day, day after day, we struck nor breath nor motion, as idle as a painted ship upon a painted ocean.

Egil

Hi Andy,

Attaching the file I used for testing.


Good Luck!

Egil
Support Amateur Radio  -  Have a ham  for dinner!

Andy

Egil,

Thanks for the file.

After testing it I realised what I was asking!

As this file has been loaded before in my editor, even if you could not scroll, on exit the file will have been corrected.

Seems there are differences between the IWB editor and mine.

Any chance of a different file or a couple of files you didn't try to load into my editor?

I'm sure I'm correct on what dawned on me this morning...

Thanks,
Andy.
 :)
Day after day, day after day, we struck nor breath nor motion, as idle as a painted ship upon a painted ocean.

Egil

Here are two more files to try.


Egil
Support Amateur Radio  -  Have a ham  for dinner!

Andy

Thanks so much Egil,

I will have a look at them.

Thanks again for all your help!

Andy.
 :)
Day after day, day after day, we struck nor breath nor motion, as idle as a painted ship upon a painted ocean.

Andy

December 14, 2020, 04:11:32 AM #39 Last Edit: December 14, 2020, 04:41:30 AM by Andy
I was going to post the new version of the editor yesterday, but found a problem with a variable called Ucase.

Bill explained why it was happening, so after fixing that I came up with another feature:

Wouldn't it be nice if we could pick a program's window, and list all the controls with their creation line number and where applicable, their case statement. When you're working on a program, especially a larger one its another huge time saver.

Just create the list, save it somewhere for reference, or make a new one at anytime...

This I've put into place, so it only take a couple of clicks to do it.

Just checking everything and dotting the I 's.

Attached is what I can produce for my main window w1.

Keep watching please...
Andy.
Day after day, day after day, we struck nor breath nor motion, as idle as a painted ship upon a painted ocean.

Andy

The new editor version is now available to download.

http://www.ionicwind.com/forums/index.php?topic=6448.msg47254;topicseen#msg47254

Thanks,
Andy.
Day after day, day after day, we struck nor breath nor motion, as idle as a painted ship upon a painted ocean.

Andy

December 28, 2020, 05:56:39 AM #41 Last Edit: December 28, 2020, 05:59:13 AM by Andy
Hi,

Well it's all quiet on here as expected, but I thought I would just let you all know about two new features coming before the year is out.

1. I've been asked about a stand alone version of the editor, so I have now made it. All you will have to do is to double click the exe file (when copied to a new folder) and it will do any setup required for you.

2. Another idea was to be able to group controls together (your choice).

Take this scenario:

You have an edit control, surrounding it is a static, some buttons like "Add", Edit","Delete" etc...

When you type something in the edit control, you want the buttons to appear, and when the edit control is empty, you want them hidden.

So now you can create a group name "Edit control 1", and add in the above controls to this group.

Next, you can then select what typical command line you want like .... @SWSHOW ...

Finally, just click on create code, and all the controls in your group have the command line ....@SWSHOW... sent to the clipboard.

You can then just paste that into your code.

I will add a user defined command before posting.

Another time saver!

See attached.

Andy.
:)
Day after day, day after day, we struck nor breath nor motion, as idle as a painted ship upon a painted ocean.

Andy

December 31, 2020, 03:38:27 AM #42 Last Edit: December 31, 2020, 04:07:13 AM by Andy
The final version of the editor for this year is now complete.

I have added in to grouping controls and creating code windows the ability to search by:

Windows
Control types
Control groups

There is now a user defined edit box for adding in your custom commands:

MaskEditControl(w1,Button1,Something) would be entered as
MaskEditControl(w*,c*,Something) - w* for the window, c* for the control.

All controls selected will be added to this custom command, replacing W* with the window it resides in, and c* with the control name.

It's taken a couple of days longer than I thought (of course), and because it's New Years eve today I think I will post this on the 2nd or 3rd of January as it's likely to get lost in the Happy new year's day messages.

Due to upload limits, I will post this in two parts:

1. The source code.
2. A stand alone exe file.

Thanks,
Andy.
:)
Day after day, day after day, we struck nor breath nor motion, as idle as a painted ship upon a painted ocean.

Andy

Hi,

Just thought I would bring anyone who is still interested in the editor as to  what I am doing at the moment.

Thanks to Aurel & LarryMc, I have now been able to use a tab control in this new version, I had a horrible feeling it was going to be a huge re-write, but thankfully it's not.

At the moment I have set the maximum tabs to 50, but it will be up to you to decide.

And all seems to be working well.

The other thing I touched on was a debug function, I think it would be a great addition to do a "pre-compile" check of your code.

I very often type a full stop instead of a comma, and also miss one or more ")' closing brackets on a line.

Any suggestions for what you would like to check for please let me know here.

Thanks,
Andy.
 :) 
Day after day, day after day, we struck nor breath nor motion, as idle as a painted ship upon a painted ocean.

Andy

January 16, 2021, 11:11:32 PM #44 Last Edit: January 17, 2021, 04:43:23 AM by Andy
Welcome back Hecktor,  :)

It's been a while so I thought I would bring you up to speed on my editor, I hope you have a look at it.

Maybe it might give you some ideas for yours...

A short summary:

1. I continued to work on this all year, usually around 8 hours a day.
2. It is much much more than just an editor now, more like a new programming tool.
3. It eventually got to 28,000 + lines of code.
4. You can list all controls in any window.
5. You can jump straight to a control's creation line, or it's CASE statement.
6. It has the ability to search an open file for not just an exact search but
also multiple words on a line e.g. IF THEN GOTO.
7. You can create and drop in pre-made lines of code.
8. You have the ability to copy whole subroutines and windows.
9. You can easily jump to a subroutine or window.
10. You can easily jump to a window's handler.
11. You can enter line numbers to jump straight to.
12. Auto complete of IWB key words is included.
13. It has it's own built in tailor made undo & redo functions.
14. Included is my Win API search program containing 4,000 + messages, notifications & values etc.
15. A nice surprise - I found using both mine & LarryMc's editors together meant that I could actually program much faster.

The link below is the final version of 4.x - there are no doubt still some bugs in it which will be fixed in version 5.x

I'm now working on version 5.0, which includes unlimited number of tabs / open files.

Version 5.0 will also include a "pre-compile" check for an opened file,
e.g. if you have missed a " ) " on a line and how many etc.

Here is Version 4.x (scroll to the end of the thread):
http://www.ionicwind.com/forums/index.php?topic=6448.0

I would be interested to see what you think of it.

Nice to see you back.

Andy.
:)
Day after day, day after day, we struck nor breath nor motion, as idle as a painted ship upon a painted ocean.

Andy

Hi,

For those of you who are still interested, I have now completed the transition to tab controls with all the file functions working.

As promised, I have now begun the debug section.

Here you can click on a button and a new window will open.
In that new window, I will add buttons / check boxes etc with specific debug tests.

I already have one, "Syntax", which checks the number of (, ), [, ], brackets on each line. If there is an imbalance, it will be listed in a listview control.

I will now move on to full stops, which I am always typing instead of a comma etc...

To test this, I deliberately made some typing mistakes.

Please see attached.

Thanks,
Andy.
:)
Day after day, day after day, we struck nor breath nor motion, as idle as a painted ship upon a painted ocean.

Andy

I was wondering if you have had a look at my editor Hecktor?

Yes, we do like to share code on here, in fact many of the people here have helped me with the editor e.g. testing, help out with difficult problems etc.

Each and every one of them giving their time to help.

I think you must have some extra ideas no one has mentioned yet?

Any ideas would be great.

Thanks,
Andy.
:)
Day after day, day after day, we struck nor breath nor motion, as idle as a painted ship upon a painted ocean.

Andy

January 27, 2021, 03:45:23 AM #47 Last Edit: January 27, 2021, 04:41:12 AM by Andy
Well,

Brian sent me some code that was driving him round in circles, (and let's face it, we've all been there).

This was what the compiler said:

(449) Error: syntax error
(450) Error: syntax error
(412) Error: unexpected end of sub: missing ENDIF
(412) Error: unexpected end of sub: missing ENDIF

He suspected it was something to do with a SELECT / ENDSELECT or an IF statement, and from what I could see there were no syntax errors in the code...

Now by a strange coincidence I was working on adding other features to my debug function in the editor, so I decided to see if it could make any more sense of things.

It told me there was a missing ENDSELECT and a missing ENDIF (see attached).

Now, armed with these facts, I was able to firstly work through the IF's / ENDIF's and then the SELECTS's.

It helped me to fix the compile error, but of course I don't know if I have ended up changing the logic of the program - that's a different matter.

The debug buttons added so far do the following:

Syntax, checks each line for things like ( ) [ ].
For, checks for FOR / NEXT blocks.
Select, checks for SELECT / ENDSELECT blocks.
IF, checks for IF / ENDIF blocks.
Do, checks for DO / UNTIL blocks.
While, checks for WHILE / ENDWHILE blocks.

It might not sound much, but you can really "zoom in" to a problem quickly rather than pulling your hair out!

Any more debug check suggestions would be very welcome.

Andy.
:)
Day after day, day after day, we struck nor breath nor motion, as idle as a painted ship upon a painted ocean.

Brian

Andy,

I tried your program first before I sent it to you, but I couldn't make out which was the debug button. I knew you had put some code in for debugging

Brian

Andy

January 29, 2021, 04:37:25 AM #49 Last Edit: January 29, 2021, 04:44:22 AM by Andy
Brian,

The debug function you will have will be for the previous version (version 4.x).

The new debug function (in version 5.x I'm working on now) is different.

Version 4.x was just to check the line you are on for ( ) [ ] brackets, and it would tell you if there was an imbalance.

I put on hold (removed the debug option on screen) so I could concentrate on posting the final 4.x version.

The new debug function checks for quite a few things more now.

I can send you a copy if you like...

Andy.
Day after day, day after day, we struck nor breath nor motion, as idle as a painted ship upon a painted ocean.