jaPBe 3.13.4 [IDE for PB 4 and PB 5]

All PureFORM, JaPBe, Libs and useful code maintained by gnozal

Moderator: gnozal

Xombie
Addict
Addict
Posts: 898
Joined: Thu Jul 01, 2004 2:51 am
Location: Tacoma, WA
Contact:

Post by Xombie »

gnozal,

When I'm working with strings and accidentally close a double quote in the middle of the string, the rest of the string capitalizes based on keywords. That part is normal. However, is it possible to make the undo command put back the original capitalization?

I can live with it if it's not an easy fix since it's my fault in the first place.
gnozal
PureBasic Expert
PureBasic Expert
Posts: 4229
Joined: Sat Apr 26, 2003 8:27 am
Location: Strasbourg / France
Contact:

Post by gnozal »

Xombie wrote:When I'm working with strings and accidentally close a double quote in the middle of the string, the rest of the string capitalizes based on keywords. That part is normal. However, is it possible to make the undo command put back the original capitalization?

I can live with it if it's not an easy fix since it's my fault in the first place.
GPI has disabled the undo for the 'auto-case' feature, because it can cause an endless loop.
For example :
1. You type 'for'
2. jaPBe corrects to 'For'
3. undo : 'for'
4. jaPBe corrects to 'For' again
5. undo : 'for'
6. jaPBe corrects to 'For' again
etc ...
So the 'auto-case' feature has to be disabled during the undo process. But how can jaPBe know when the undo process is over ?

I uploaded a test build : http://freenet-homepage.de/gnozal/jaPBe_Test.zip
In this build, undo is activated during 'auto-case'. Also, the 'auto-case' feature is disabled while CTRL is pressed.
Then, this should work :
1. You type : a$ = "end fOr NExT"
2. You add a " in the middle (mistake) : a$ = "end" fOr NExT"
3. jaPBe corrects to : a$ = "end" For Next"
4. CTRL+Z : a$ = "end" For NExT" < do not release CTRL key >
5. CTRL+Z : a$ = "end" fOr NExT" < do not release CTRL key >
6. CTRL+Z : a$ = "end fOr NExT"

Could you please test it to see if it works and also to make sure it hasn't any side effects.
For free libraries and tools, visit my web site (also home of jaPBe V3 and PureFORM).
RichardL
Enthusiast
Enthusiast
Posts: 532
Joined: Sat Sep 11, 2004 11:54 am
Location: UK

Remove item from Recent Files' list

Post by RichardL »

Hi,
I frequently make copies of source files to try a modification and then get rid of the temporary copy.

The temporary file name remains on the 'Recent Files' list and I would very much like to be able to remove it from the list with the Delete key, or by some other method.

It would be my job to remove the copy of the source file... but a MessageRequester() asking "Do you want to delete the file as well?" would be a nice addition to the above.

Best regards,
RichardL
gnozal
PureBasic Expert
PureBasic Expert
Posts: 4229
Joined: Sat Apr 26, 2003 8:27 am
Location: Strasbourg / France
Contact:

Post by gnozal »

Good idea.

It's probably more convenient if jaPBe does it automatically.

jaPBe could check for invalid links at startup and each time the recent files list is going to be modified, and then simply remove the invalid links from the list.
For free libraries and tools, visit my web site (also home of jaPBe V3 and PureFORM).
RichardL
Enthusiast
Enthusiast
Posts: 532
Joined: Sat Sep 11, 2004 11:54 am
Location: UK

Post by RichardL »

Hi,
Not so sure about automating too much. Sometimes I'm connected to the internal network and sometimes not, so being able to access a file would not be a reliable indicator of it having been deleted... unless you check the path details for missing network drive etc..... Or, I might be using memory sticks and not have plugged it in.

Also, I might like to have a temporary file remain in existence for a day or so, just not clutter the jaPBe list.

I still vote for choosing to delete the file name from the list manually and have a requester ask if the file should be deleted.

I did something similar recently... this code comes from myCallback() procedure.

Code: Select all

    Case #WM_MENURBUTTONUP
        hotMenuItem = GetMenuItemID_(lParam, wParam)
      
      ; Right mouse and DELETE key removes a file from menu
      If hotMenuItem >=50 And hotMenuItem <= 59      ; File list items
        If GetAsyncKeyState_(#VK_DELETE)             ; Delete key down?
          m.w = hotMenuItem - 50                     ; Index into FileList$()
          If FileList$(m.w)                          ; Cannot delete an empty item!
            
            ; Remove selected item from FileList$()
            If m.w < 9                               ; If not the last item...
              For n.w = m.w To 8                     ; Move higher items down one
                FileList$(n.w) = FileList$(n.w + 1)
              Next
            EndIf
            FileList$(9) = ""                        ; Clear item at top of list
           
            ; Re-write revised FileList$() to menu
            For n.w = 0 To 9
              ModifyMenu_(lParam, 50+n.w, #MF_BYCOMMAND | #MF_STRING , 50+n.w, @FileList$(n.w))
            Next
            While WindowEvent() : Wend
            
          EndIf
          
        EndIf
      EndIf
gnozal
PureBasic Expert
PureBasic Expert
Posts: 4229
Joined: Sat Apr 26, 2003 8:27 am
Location: Strasbourg / France
Contact:

Post by gnozal »

Update

Changes :
- jaPBe can now check for invalid links in the recent files list
See option 'Check recent files list for invalid links' in Preferences : if enabled, jaPBe will check for invalid links in the recent files list and remove them.
- you can also remove a link manually from the recent files list. Simply right-click on the item you want to remove. (Minimum OS : Win98 or Win2k).
- manual updated
For free libraries and tools, visit my web site (also home of jaPBe V3 and PureFORM).
gnozal
PureBasic Expert
PureBasic Expert
Posts: 4229
Joined: Sat Apr 26, 2003 8:27 am
Location: Strasbourg / France
Contact:

Post by gnozal »

Ok, you have both : :D
1. Automatic removal (optional)
2. Manual (right-click) removal [all OS not supported]
For free libraries and tools, visit my web site (also home of jaPBe V3 and PureFORM).
RichardL
Enthusiast
Enthusiast
Posts: 532
Joined: Sat Sep 11, 2004 11:54 am
Location: UK

Post by RichardL »

Good morning...
Thank you for the modification. :D :D

I have tested the right mouse option and thats fine.
Please, where is the switch for the optional auto removal?

RichardL
gnozal
PureBasic Expert
PureBasic Expert
Posts: 4229
Joined: Sat Apr 26, 2003 8:27 am
Location: Strasbourg / France
Contact:

Post by gnozal »

RichardL wrote:Please, where is the switch for the optional auto removal?
Preferences -> General -> 'Check recent files list for invalid links'
For free libraries and tools, visit my web site (also home of jaPBe V3 and PureFORM).
RichardL
Enthusiast
Enthusiast
Posts: 532
Joined: Sat Sep 11, 2004 11:54 am
Location: UK

Post by RichardL »

"None so blind as those who do not look in the right place".... as my dear old mother used to say. :)
nicolaus
Enthusiast
Enthusiast
Posts: 456
Joined: Tue Aug 05, 2003 11:30 pm
Contact:

Post by nicolaus »

Hi gnozal

First thanks for the update of jaPBe.

Now i have a problem with jaPBe if i work with PB 4.30 b5.
I compile my code with jaPBe and see all the time a error messag (see below ) and jaPBe crash.
If i work with the PB IDE it works fine an i have no crash.

Image

If i click ok it shows this error window:

Image

I cant post the code because the code have more then 30000 lines.

i hope this small informations help you to find the bug in jaPBe.

regards,
Nico
nicolaus
Enthusiast
Enthusiast
Posts: 456
Joined: Tue Aug 05, 2003 11:30 pm
Contact:

Post by nicolaus »

[Done]

now i have change all functions to PB4.30 with the PB IDE and have test the code again in jaPBE and now it works also with jaPBE.
gnozal
PureBasic Expert
PureBasic Expert
Posts: 4229
Joined: Sat Apr 26, 2003 8:27 am
Location: Strasbourg / France
Contact:

Post by gnozal »

nicolaus wrote:[Done]
now i have change all functions to PB4.30 with the PB IDE and have test the code again in jaPBE and now it works also with jaPBE.
So it was your code (and not jaPBe) ?
Do you know what in your code caused the crash ?
For free libraries and tools, visit my web site (also home of jaPBe V3 and PureFORM).
LCD
Enthusiast
Enthusiast
Posts: 206
Joined: Sun Jun 01, 2003 10:55 pm
Location: Austria, Vienna
Contact:

Post by LCD »

gnozal wrote:
nicolaus wrote:[Done]
now i have change all functions to PB4.30 with the PB IDE and have test the code again in jaPBE and now it works also with jaPBE.
So it was your code (and not jaPBe) ?
Do you know what in your code caused the crash ?
I guess, it was the Pure Basic Debugger. I had the same problem with a very large program (>30000 lines too), and Fred fixed it for me after I sent him all my sources.
Nicolaus: Please try to compile your program from Original PB Editor with Debugger switched on. If it crashes, it is not the fault of JaPBe.
My PC
Ryzen 9 5950, 64 GB RAM, nVidia RTX A4000, Win 10
Ryzen 7 1700, 32 GB RAM, nVidia RTX A2000, Win 10
nicolaus
Enthusiast
Enthusiast
Posts: 456
Joined: Tue Aug 05, 2003 11:30 pm
Contact:

Post by nicolaus »

LCD wrote:....
Nicolaus: Please try to compile your program from Original PB Editor with Debugger switched on. If it crashes, it is not the fault of JaPBe.
I have do this and with the original PB IDE and debuger on i have no crash. But now i can reproduce the crash since i have change all my code with the orginal PB DIE up to PB 4.30.

Now i can combile / debug my code witth PB IDE and of course in jaPBe.

@gnozal
i have one more problem.
if i open a code what have includes and i have set the "open all includes" on, it works very fine.

The problem is now that if i close the code where have the includes it also close all includes (that is true and fine) and after that i have no code in a tab but i can hear a long time the sound what comse normaly only if i declare a new variable or so.

Is this normal?

I know it is hard to say what i mean but if you want i can make you a small video so that you can see an hear what i mean.

best regards and ones again thanks for you great work,
Nico
Post Reply