Home
JAQForum Ver 20.06
Log In or Join  
Active Topics
Local Time 05:16 04 May 2024 Privacy Policy
Jump to

Notice. New forum software under development. It's going to miss a few functions and look a bit ugly for a while, but I'm working on it full time now as the old forum was too unstable. Couple days, all good. If you notice any issues, please contact me.

Forum Index : Microcontroller and PC projects : MMEdit V5

     Page 18 of 19    
Author Message
TassyJim

Guru

Joined: 07/08/2011
Location: Australia
Posts: 5912
Posted: 08:26pm 23 Dec 2022
Copy link to clipboard 
Print this post



I just forgot to mention it in the help files.

Quick help for merge:
Any line that starts with any of "'$INCLUDE:","'#INCLUDE" or "'#INCLUDE" will be replaced with the file name following the INCLUDE directive. Quote should be used if the filename includes spaces.
The new file will open in a new tab with "_Merged" added to the filename. The original file will not be altered.

Thanks for drawing it to my attention.

and Ho Ho or Baa Humbug, depending on your preferences...

Jim
VK7JH
MMedit   MMBasic Help
 
Turbo46

Guru

Joined: 24/12/2017
Location: Australia
Posts: 1593
Posted: 08:45pm 23 Dec 2022
Copy link to clipboard 
Print this post

  Quote  and Ho Ho or Baa Humbug, depending on your preferences.

That did make me laugh  

Should the full pathname be used or must the file be in the same folder? (either/or probably). I did ask about a default folder in preferences for insert file but you suggested pinning it to 'quick access' which I have done.

Merry Christmas

Bill
Keep safe. Live long and prosper.
 
TassyJim

Guru

Joined: 07/08/2011
Location: Australia
Posts: 5912
Posted: 09:00pm 23 Dec 2022
Copy link to clipboard 
Print this post

I just checked, there is a reference to 'merge' in  the help under 'Program" but it is not very informative and well hidden.

If the include file is in the same folder as the main file, full path should not be needed. Relative paths 'should' work but file systems work in mysterious ways so the full path with quotes is safest. I might make a helper in the right click menu to add the file for you. Saves spelling mistakes.

Some versions of MMBasic have their own INCLUDE so using the one within a comment is safest. I left the reference to INCLUDE without the comment out of the help file for that reason.

Jim
VK7JH
MMedit   MMBasic Help
 
Turbo46

Guru

Joined: 24/12/2017
Location: Australia
Posts: 1593
Posted: 09:33pm 23 Dec 2022
Copy link to clipboard 
Print this post

Hi Jim, As I said I have not used the INCLUDE function and wrongly (I think now) assumed that it would insert the file at loading time. It seems to be a perhaps more involved method to insert file.

A 'helper' function to browse and select the file would be nice like the insert file. but I will be sticking to the insert file method. Pinning that 'functions' folder makes it an easy option for me to use. Any effort put into gilding the INSERT function would be wasted for me.  

Bill
Keep safe. Live long and prosper.
 
disco4now

Guru

Joined: 18/12/2014
Location: Australia
Posts: 844
Posted: 03:37am 07 Jan 2023
Copy link to clipboard 
Print this post

Hi Jim,
I have setup Mint 21.3 and installed MMEdit5. Only addition needed to your install instruction was from page 9 on this post, the command to install webkit5

sudo apt-get install libqt5webkit5

The only other trap I fell for was not logging out after adding myself to the dialout group.
Regards
Gerry
Latest F4 Latest H7
 
disco4now

Guru

Joined: 18/12/2014
Location: Australia
Posts: 844
Posted: 03:53am 07 Jan 2023
Copy link to clipboard 
Print this post

I am getting MMReplace to work with the Linux version.
I noticed one thing that happens on both Windows and Linux. When I send the same file back to MMEdit a second time it opens a new tab with the same name for the updated copy. The original tab has the same name but has the previous code loaded.
Not sure if it can be fixed but would be good if the existing tab was just refreshed with the new file.

On Linux when sending from MMReplace to MMCC is works as expected if MMCC is shutdown.  i.e opens up and loads the code, however if MMCC is open already nothing seems to happen.

Also on LINUX adding to the Actions menu via the GUI doesn't seem to allow moving to the second entry. Not a priority as adding to MMEdit.inf with MMEdit shut down is my preference anyway.

Also very minor, Shift + click on Action doesn't make it the default as for Windows, again can be done directly in MMEdit.inf.

Regards
Gerry
Latest F4 Latest H7
 
TassyJim

Guru

Joined: 07/08/2011
Location: Australia
Posts: 5912
Posted: 04:43am 07 Jan 2023
Copy link to clipboard 
Print this post

  Quote  I am getting MMReplace to work with the Linux version.

Be prepared for an interesting ride.

  Quote   When I send the same file back to MMEdit a second time it opens a new tab with the same name for the updated copy.

That is by design. I was too afraid to start overwriting user files until I was confident that I wouldn't destroy too much. I will look at it again 'soon'

  Quote  On Linux when sending from MMReplace to MMCC is works as expected if MMCC is shutdown

This is the routine I use for sending the file to MMCC.

 CompilerIf #PB_Compiler_OS = #PB_OS_Windows
   RunProgram("MMCC.exe",qt+Filename+qt,qt+programfolder+qt)
 CompilerElse
   Result = OpenNetworkConnection("localhost", MMCCcontrolPort)
   If Result
     SendNetworkString(Result, "/load "+Filename+#CR$, #PB_UTF8)
     CloseNetworkConnection(Result)
   Else
     RunProgram(programfolder+"./MMCC",qt+Filename+qt,qt+programfolder+qt)
   EndIf
 CompilerEndIf
 

It tests to see if it responds to a TCPIP connect and if not, use the command-line method.
I don't know of a reliable way to pass a command-line to a running instance of a program in Linux so I stuck with TCPIP.
(I should check and make sure my method still works)

  Quote  Also on LINUX adding to the Actions menu via the GUI doesn't seem to allow moving to the second entry.

I will check that, thanks.

  Quote  Also very minor, Shift + click on Action doesn't make it the default as for Windows

That's why I added the 'set as default' button to the preferences page.

You will also notice that the F1 help doesn't show in the popup box, only on the status line. That is something that I hope PB people can fix. I do like the status line help staying visible until you leave the current line. Much nicer than disappearing as soon as you start using it.

Jim
VK7JH
MMedit   MMBasic Help
 
disco4now

Guru

Joined: 18/12/2014
Location: Australia
Posts: 844
Posted: 07:09am 07 Jan 2023
Copy link to clipboard 
Print this post

Thanks Jim,
That does the trick for sending to an open MMCC in linux.
Regards
Gerry
Latest F4 Latest H7
 
Volhout
Guru

Joined: 05/03/2018
Location: Netherlands
Posts: 3556
Posted: 08:12am 26 Jan 2023
Copy link to clipboard 
Print this post

Hi Jim,

I have 1 thing that I find anoying, but not to the level that I complain.
Just want to mention it.

Combination MMEdit5 (linux) and picomite.

When I write code in MMEdit, lines tend to becom longer than 80 characters, especially comment lines (I do a lot of comments, because it makes me clear my mind).

Sending this code to the picomite works fine. Picomite accepts the longer lines (does not show them in EDIT mode, but the program works).

Sometimes I do some mino changes to the program in build in editor.

Then I read back the code to MMEdit using MMCC Action.

Now I have a corrupt program. The long lines are cut to length by this process, and a <CR> is added at the end of the cut line.
BUT: The remainder of the long line is not discarded, but becomes a new line in the program. So a comment text, becomes a (in)valid program command.

I would have expected either:
- discard the rest of the line
or
- keep the line as is, even if it is too long.

Volhout
PicomiteVGA PETSCII ROBOTS
 
TassyJim

Guru

Joined: 07/08/2011
Location: Australia
Posts: 5912
Posted: 08:46am 26 Jan 2023
Copy link to clipboard 
Print this post

What happens if you set wordwrap in MMCC setup menu?
VK7JH
MMedit   MMBasic Help
 
Volhout
Guru

Joined: 05/03/2018
Location: Netherlands
Posts: 3556
Posted: 08:50am 26 Jan 2023
Copy link to clipboard 
Print this post

Hi Jim,

Word wrap ON/OFF makes no difference.
b.t.w. wordwrap is volatile. Restarting of MMCC resets to OFF.

Volhout
Edited 2023-01-26 18:52 by Volhout
PicomiteVGA PETSCII ROBOTS
 
TassyJim

Guru

Joined: 07/08/2011
Location: Australia
Posts: 5912
Posted: 08:06pm 26 Jan 2023
Copy link to clipboard 
Print this post

WordWrap is not functional. It must be one I was intending to get back to. I will grey the menu item out until I complete it.

Long lines work for me.

What device are you using picomite or picomiteVGA?
Can you list your options. I think the 80 character line limit is due to a setting on the pico, not MMCC.

Check OPTION DISPLAY ...


Jim
VK7JH
MMedit   MMBasic Help
 
TassyJim

Guru

Joined: 07/08/2011
Location: Australia
Posts: 5912
Posted: 06:57am 01 Feb 2023
Copy link to clipboard 
Print this post

MMEdit has had an update. Now version 5.0.4

Things fixed include Tab spaces in MMCC now work as they should.
Hex, binary and exponential numbers are now recognized in the editor.
plus many more tweaks...

Quick Find: Highlight a word then select 'Quick find' to search the current document and list all occurrences of the selected word. This is similar to "Find in all" but quicker to do.
The word can be a command, variable or user function.

Uncrunch: adds space characters to make code easier to read. The Uncrunched code will open in a new tab so it is safe to experiment.

MMReplace now has it's own sub-menu under the "Action" menu. This should make it easier for Gerry to maintain his program without worrying about me upsetting his installation routines. There is no need to change anything if you already have MMReplace linked to MMEdit using "the old way"

And because I am such a hopeless typist I added this:

Prefill start of line: If you need to add the same text at the start of a series of lines such as when entering DATA or POI ASSEMBLE etc, select the desired text and copy it to the clipboard then select "Prefill". Whenever <ENTER> is pressed, a new line starts with the selected text. If you select a series of lines after saving the prefill text but before selecting "prefill", the prefill text will be added to those lines as well as any new line.

Postfill end of line: This works the same as Prefill but inserts the saved text to the end of the line(s). This is not as useful as Prefill.

I am also using a new beta of PureBasic so there might be a few gotchas but I haven't found any yet.

Downloads from the usual place.

Jim
VK7JH
MMedit   MMBasic Help
 
Volhout
Guru

Joined: 05/03/2018
Location: Netherlands
Posts: 3556
Posted: 07:30am 01 Feb 2023
Copy link to clipboard 
Print this post

  TassyJim said  WordWrap is not functional. It must be one I was intending to get back to. I will grey the menu item out until I complete it.

Long lines work for me.

What device are you using picomite or picomiteVGA?
Can you list your options. I think the 80 character line limit is due to a setting on the pico, not MMCC.

Check OPTION DISPLAY ...


Jim


Hi Jim,

Sorry for the late reply, it got for some reason to the bottom of the stack.
I can confirm it is not MMEdit cutting the lines. It is the pico, and it can be influenced by display options.

Thanks for your help.

I will try the new 504

Harm
PicomiteVGA PETSCII ROBOTS
 
disco4now

Guru

Joined: 18/12/2014
Location: Australia
Posts: 844
Posted: 08:58am 01 Feb 2023
Copy link to clipboard 
Print this post

Hi Jim,
The links to the windows 64 bit versions for 5.5.04 don't seem to find a file.
Gives a 404 error with this link.
https://www.c-com.com.au/stuff/MMedit5_0_4_64_portable.zip
https://www.c-com.com.au/stuff/MMedit5_0_4_64.exe
The 32 bit portable seems Ok but 32 bit installer gives 404 as well.

regards
Gerry
Latest F4 Latest H7
 
TassyJim

Guru

Joined: 07/08/2011
Location: Australia
Posts: 5912
Posted: 10:32am 01 Feb 2023
Copy link to clipboard 
Print this post

Thanks
should be fixed now. Typo!

Jim
VK7JH
MMedit   MMBasic Help
 
TassyJim

Guru

Joined: 07/08/2011
Location: Australia
Posts: 5912
Posted: 03:58am 02 Feb 2023
Copy link to clipboard 
Print this post

  Volhout said  
I can confirm it is not MMEdit cutting the lines. It is the pico, and it can be influenced by display options.

Thanks for your help.

I will try the new 504

Harm


The pico does the split when it LISTs the program. The long lines are intact.
You can retrieve a program that has long lines by using XMODEM.
First you have to save your program to either the flash drive or SDcard but not a flash slot.
Then use the MMCC file manager to "Edit" the file. It will be transferred to the PC then opened in MMEdit.
You can't use the file manager to transfer from current program or flash slots because MMCC uses LIST to do the transfer instead of XMODEM.

For the next update I have added ^Q which moves the current line to the end of the previous line. It might be a bit quicker than moving to the end of a line then delete the <CR>. But not much quicker.

I am thinking about a command to wrap all comments that exceed a user defined length. The default would be 80 characters. It would be intelligent, adding the ' and align it with the previous '

Jim
VK7JH
MMedit   MMBasic Help
 
circuit
Senior Member

Joined: 10/01/2016
Location: United Kingdom
Posts: 231
Posted: 10:29am 02 Feb 2023
Copy link to clipboard 
Print this post

  TassyJim said  
I am thinking about a command to wrap all comments that exceed a user defined length. The default would be 80 characters. It would be intelligent, adding the ' and align it with the previous '



That sounds very useful and sensible.  Please change "thinking about" to "going about".
 
Andrew_G
Guru

Joined: 18/10/2016
Location: Australia
Posts: 840
Posted: 06:45pm 28 Feb 2023
Copy link to clipboard 
Print this post

Hi Jim,
I'm trying to LONGSTRING PRINT Openweather data but the text doesn't wrap in the console in MCC (MCC v 5.0.4). It does wrap on TerraTerm (and NO I am not going to turn).
I see that WRAP is no longer an option.

Is there something I am missing?

Here is my workaround - does anyone have a better one?

Cheers,

Andrew



 Dim buff%(512), Pbuff%(8) 'Pbuff% only needs to be small as it is printed 1 character at a time
 DIM Plength% = 90         '90 charcters per line on the console
 DIM Pcount
'.
'.
'.

 'This is to print the OW response
 Print
 Print "Response from Openweather:
 PCount = 0  ' Counts up to Plength% then gets zeroed
 St = 0      ' The start position, is incremented until the end of buff%()
 do
   PCount = PCount + 1
   St = St + 1
   ON ERROR SKIP
   LONGSTRING MID Pbuff%(), buff%(), St, 1
   If MM.ERRNO <> 0 then 'Is probably the end of buff%
     Print
     if MM.ERRNO <> 16 then
       Print "MM.ERRNO = "; MM.ERRNO  'Expecting 16
     End If
     Exit do
   End If
   LONGSTRING PRINT Pbuff%();  'if not the end of Pbuff% print it character by character
   if PCount => Plength% then  'prepare a new PRINT line
     print
     PCount = 0
   End If
 loop

 
TassyJim

Guru

Joined: 07/08/2011
Location: Australia
Posts: 5912
Posted: 07:49pm 28 Feb 2023
Copy link to clipboard 
Print this post

  Andrew_G said  Hi Jim,
I'm trying to LONGSTRING PRINT Openweather data but the text doesn't wrap in the console in MCC (MCC v 5.0.4). It does wrap on TerraTerm (and NO I am not going to turn).
I see that WRAP is no longer an option.

Is there something I am missing?

Wrap was in the menus but didn't actually do anything.
I removed it from the menu until I do the wrap code. It will then get restored to the menu.
Part of that has been to fix the terminal so that lines up to 255 characters are saved with drag the mouse or save visible etc even though they exceed the visible window size (This is not in he current version and still needs some testing).
That won't help json which usually far exceeds 255 characters.

Unfortunately for you, my health is at the best it's been for 18 months so I am rather busy catching up with work on the house.
MMEdit has to wait until the good days subside again...
It won't be a long wait

Jim
VK7JH
MMedit   MMBasic Help
 
     Page 18 of 19    
Print this page
© JAQ Software 2024