jaPBe 3.13.4 [IDE for PB 4 and PB 5]

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

Moderator: gnozal

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

Re: Using Resources with jaPBe howto ?

Post by gnozal »

alen wrote:with the project settings in jaPBe i can add resources to my project.
But how to use it afterwards ? Is there any documentation about using it in my own programs ?
Resources are not a PB feature, but a Windows API feature : http://msdn.microsoft.com/en-us/library ... 85%29.aspx and http://msdn.microsoft.com/en-us/library ... 85%29.aspx
Some PB examples :
http://www.purebasic.fr/english/viewtop ... 12&t=17950
http://www.purebasic.fr/english/viewtop ... =7&t=37712
In PB, you may also use IncludeBinary : http://purebasic.com/documentation/refe ... ludes.html
For free libraries and tools, visit my web site (also home of jaPBe V3 and PureFORM).
stab
New User
New User
Posts: 4
Joined: Thu Mar 18, 2010 12:57 pm

Re: jaPBe 3.10.3 [IDE for PB 4.xx]

Post by stab »

Hello.

I ask the help on the editor. At once I apologise for bad English speech. I wish to make an unpretentious template for editor JaPBe. There was a question on a text insert in the editor from my program. Here my code:

Code: Select all

Enumeration
  #Window_0
EndEnumeration


Enumeration
  #Button_0
  #Button_1
  #Button_2
  #ListIcon_0
EndEnumeration

Global Dim fileD.s(100),nF

Procedure jaPBe_Paste(jaPBe_ID, Text1.s)

 Result=0 : MainClass${255}
 Win.RECT
 Center.POINT
 GetWindowRect_(jaPBe_ID, @Win)
 
 Center\x = (Win\left+Win\right)/2
 Center\y = (Win\top+Win\bottom)/2
 
 EditID = WindowFromPoint_(Center\X|(Center\Y<<32))
 If EditID
   GetClassName_(EditID,@MainClass$,$FF)  
   If LCase(MainClass$)="scintilla"
     SendMessage_(EditID, #EM_GETSEL, @CharPos1, @CharPos2) 
     SendMessage_(EditID, #EM_SETSEL, CharPos1, CharPos1)
     text2.s=GetClipboardText()
     SendMessage_(EditID,#EM_REPLACESEL , 0,@text2)   
     Result=1
   EndIf
 EndIf
 
ProcedureReturn Result
EndProcedure

Procedure LoadFile(File.s)
 If ReadFile(0, File) 
    FileSize=Lof(0)
    *mem=AllocateMemory(FileSize+1) 
    ReadData(0, *mem, FileSize) 
    SetClipboardText(PeekS(*mem)) 
    FreeMemory(*mem) 
    CloseFile(0)  
     rr=FindWindow_(0,"jaPBe V3 - PB4.31")
      jaPBe_Paste(rr, "hfhfhhfhfhfj")
 EndIf
EndProcedure

Procedure CHFILE()
If ExamineDirectory(0, GetCurrentDirectory(), "*.pb*")  
    While NextDirectoryEntry(0)
      If DirectoryEntryType(0) = #PB_DirectoryEntry_File
        Type$ = " [File] "
      Else
        Type$ = " [Sub-Dir] "
      EndIf
      fileD(nF)= DirectoryEntryName(0)
      nF+1
    Wend
    FinishDirectory(0)
  EndIf
EndProcedure


Procedure Open_Window_0()
  If OpenWindow(#Window_0, 1065, 565, 199, 328, "Template",  #PB_Window_SystemMenu | #PB_Window_SizeGadget | #PB_Window_TitleBar )

      ButtonGadget(#Button_0, 5, 295, 40, 25, "ADD")
      ButtonGadget(#Button_1, 65, 295, 60, 25, "REMOVE")
      ButtonGadget(#Button_2, 145, 295, 40, 25, "EDIT")
      

      ListIconGadget(#ListIcon_0, 5, 5, 190, 275, "", 200, #PB_ListIcon_GridLines|#PB_ListIcon_AlwaysShowSelection)
      

  EndIf
EndProcedure
Open_Window_0()
CHFILE()
If fileD(0)<>""
  For ddd=0 To nF-1
     AddGadgetItem(#ListIcon_0,-1, ReplaceString(fileD(ddd),".pb","")+"                                                       ")
  Next
EndIf
  
  
  
  Repeat
    ev=WaitWindowEvent()
    
    Select  ev
    
          Case  #PB_Event_Gadget ,#PB_Event_Menu
               Select  EventGadget()
               
                     Case #ListIcon_0
                         If EventType() = #PB_EventType_LeftDoubleClick  
                             If GetGadgetState(#ListIcon_0)<>-1
                                 LoadFile(fileD(GetGadgetState(#ListIcon_0) ))
                             EndIf
                         EndIf
               
               EndSelect
    
    EndSelect
    
  Until ev=#PB_Event_CloseWindow
gnozal
PureBasic Expert
PureBasic Expert
Posts: 4229
Joined: Sat Apr 26, 2003 8:27 am
Location: Strasbourg / France
Contact:

Re: jaPBe 3.10.3 [IDE for PB 4.xx]

Post by gnozal »

stab wrote:I ask the help on the editor. At once I apologise for bad English speech. I wish to make an unpretentious template for editor JaPBe. There was a question on a text insert in the editor from my program.
Hi,
It would be much easier if you would use the jaPBe plugin template (have a look at %jaPBe%\Sources\Plugin\base.pb).
You could then use jaPBe_InsertTextS(Text$), or any of the other plugin functions.
For free libraries and tools, visit my web site (also home of jaPBe V3 and PureFORM).
stab
New User
New User
Posts: 4
Joined: Thu Mar 18, 2010 12:57 pm

Re: jaPBe 3.10.3 [IDE for PB 4.xx]

Post by stab »

Code: Select all

Hi,
It would be much easier if you would use the jaPBe plugin template (have a look at %jaPBe%\Sources\Plugin\base.pb).
You could then use jaPBe_InsertTextS(Text$), or any of the other plugin functions.
I thank!
LCD
Enthusiast
Enthusiast
Posts: 206
Joined: Sun Jun 01, 2003 10:55 pm
Location: Austria, Vienna
Contact:

Re: jaPBe 3.10.3 [IDE for PB 4.xx]

Post by LCD »

Bugreport: Searching and replacing ("Replace all") with many replaces causes flickering editor screen (completly white, flickering between grey and white). I'm using the latest JaPBE, but the problem persists also in older versions.
Tested on two differnt computers with Win 7 and Win XP.
My PC
Ryzen 9 5950, 64 GB RAM, nVidia RTX A4000, Win 10
Ryzen 7 1700, 32 GB RAM, nVidia RTX A2000, Win 10
gnozal
PureBasic Expert
PureBasic Expert
Posts: 4229
Joined: Sat Apr 26, 2003 8:27 am
Location: Strasbourg / France
Contact:

Re: jaPBe 3.10.3 [IDE for PB 4.xx]

Post by gnozal »

LCD wrote:Bugreport: Searching and replacing ("Replace all") with many replaces causes flickering editor screen (completly white, flickering between grey and white). I'm using the latest JaPBe, but the problem persists also in older versions.
Tested on two different computers with Win 7 and Win XP.
Sorry, I can't reproduce this.
"Replace all" scrolls the scintilla control to allow the user to follow the replacements, but I don't get any flickering, the scrolling is quite smooth (tested on NT4 and XP, with low end (on board) graphic chips).
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:

Re: jaPBe 3.10.3 [IDE for PB 4.xx]

Post by LCD »

gnozal wrote:
LCD wrote:Bugreport: Searching and replacing ("Replace all") with many replaces causes flickering editor screen (completly white, flickering between grey and white). I'm using the latest JaPBe, but the problem persists also in older versions.
Tested on two different computers with Win 7 and Win XP.
Sorry, I can't reproduce this.
"Replace all" scrolls the scintilla control to allow the user to follow the replacements, but I don't get any flickering, the scrolling is quite smooth (tested on NT4 and XP, but I only have low end (on board) graphic chips).
No, you can follow it, but later you get white scintilla gadget where you started to replace, nothing inside. Try this: Open source codes in multiple tabs, then search and replace all in the first file, after end is reached, do not use "cancel", but "next file". After all texts is replaced, return to first tab. The source code is not visible anymore, the gadget is fhite and flickers grey from time to time.
Canceling the replacing after the end of the first file is reached, causes no problems.
My PC
Ryzen 9 5950, 64 GB RAM, nVidia RTX A4000, Win 10
Ryzen 7 1700, 32 GB RAM, nVidia RTX A2000, Win 10
gnozal
PureBasic Expert
PureBasic Expert
Posts: 4229
Joined: Sat Apr 26, 2003 8:27 am
Location: Strasbourg / France
Contact:

Re: jaPBe 3.10.3 [IDE for PB 4.xx]

Post by gnozal »

LCD wrote:No, you can follow it, but later you get white scintilla gadget where you started to replace, nothing inside. Try this: Open source codes in multiple tabs, then search and replace all in the first file, after end is reached, do not use "cancel", but "next file". After all texts is replaced, return to first tab. The source code is not visible anymore, the gadget is fhite and flickers grey from time to time.
Canceling the replacing after the end of the first file is reached, causes no problems.
Ok, thanks, I could reproduce it.
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:

Re: jaPBe 3.10.3 [IDE for PB 4.xx]

Post by gnozal »

Update (v3.10.3.826)

Changes
- fixed 'Search Replace All' scintilla issue with several tabs
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:

Re: jaPBe 3.10.3 [IDE for PB 4.xx]

Post by LCD »

gnozal wrote:Update (v3.10.3.826)

Changes
- fixed 'Search Replace All' scintilla issue with several tabs
Thanks for the update! :D
My PC
Ryzen 9 5950, 64 GB RAM, nVidia RTX A4000, Win 10
Ryzen 7 1700, 32 GB RAM, nVidia RTX A2000, Win 10
ozzie
Enthusiast
Enthusiast
Posts: 443
Joined: Sun Apr 06, 2008 12:54 pm
Location: Brisbane, Qld, Australia
Contact:

Re: jaPBe 3.10.3 [IDE for PB 4.xx]

Post by ozzie »

Feature request: I have quite a bit of heavily indented code, with while loops, for loops, nested if's, etc. Could we have a preference setting to set the color of every third indent guide? For example, if I see two black lines, then a red line, then another two black lines, etc, it would make it easier to follow an indent guide down to it's terminating point.
gnozal
PureBasic Expert
PureBasic Expert
Posts: 4229
Joined: Sat Apr 26, 2003 8:27 am
Location: Strasbourg / France
Contact:

Re: jaPBe 3.10.3 [IDE for PB 4.xx]

Post by gnozal »

ozzie wrote:Feature request: I have quite a bit of heavily indented code, with while loops, for loops, nested if's, etc. Could we have a preference setting to set the color of every third indent guide? For example, if I see two black lines, then a red line, then another two black lines, etc, it would make it easier to follow an indent guide down to it's terminating point.
I am not sure if this is possible with scintilla.

Did you know you can use CTRL+K to navigate between matching keywords? For example, if the carret is on 'Select', it will jump to each 'Case' until 'EndSelect' and then back (same for 'If/ElseIf/Else/EndIf, 'Repeat/Until-Forever', etc...).
For free libraries and tools, visit my web site (also home of jaPBe V3 and PureFORM).
ozzie
Enthusiast
Enthusiast
Posts: 443
Joined: Sun Apr 06, 2008 12:54 pm
Location: Brisbane, Qld, Australia
Contact:

Re: jaPBe 3.10.3 [IDE for PB 4.xx]

Post by ozzie »

gnozal wrote:Did you know you can use CTRL+K to navigate between matching keywords?
No, I didn't know about that. Thanks for the tip.
gnozal
PureBasic Expert
PureBasic Expert
Posts: 4229
Joined: Sat Apr 26, 2003 8:27 am
Location: Strasbourg / France
Contact:

Re: jaPBe 3.10.3 [IDE for PB 4.xx]

Post by gnozal »

A little note : the Purifier is already implemented in the actual jaPBe version (since PB4.40 alpha in fact :wink:) and should work with the current beta .
If PB version >= 4.50 is detected, there is a new 'Compile/Purifier' item in the 'Project' menu ; shortcut is Shift+F6.
Please report any problems.
For free libraries and tools, visit my web site (also home of jaPBe V3 and PureFORM).
inc.
Enthusiast
Enthusiast
Posts: 406
Joined: Thu May 06, 2004 4:28 pm
Location: Cologne/GER

Re: jaPBe 3.10.3 [IDE for PB 4.xx]

Post by inc. »

Nice! :-)
Check out OOP support for PB here!
Post Reply