Page 90 of 104
Re: Using Resources with jaPBe howto ?
Posted: Mon Mar 15, 2010 10:51 am
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
Re: jaPBe 3.10.3 [IDE for PB 4.xx]
Posted: Thu Mar 18, 2010 1:21 pm
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
Re: jaPBe 3.10.3 [IDE for PB 4.xx]
Posted: Thu Mar 18, 2010 3:23 pm
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.
Re: jaPBe 3.10.3 [IDE for PB 4.xx]
Posted: Thu Mar 18, 2010 3:39 pm
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!
Re: jaPBe 3.10.3 [IDE for PB 4.xx]
Posted: Fri Mar 19, 2010 11:09 pm
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.
Re: jaPBe 3.10.3 [IDE for PB 4.xx]
Posted: Sat Mar 20, 2010 9:34 am
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).
Re: jaPBe 3.10.3 [IDE for PB 4.xx]
Posted: Sat Mar 20, 2010 11:29 am
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.
Re: jaPBe 3.10.3 [IDE for PB 4.xx]
Posted: Mon Mar 22, 2010 9:47 am
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.
Re: jaPBe 3.10.3 [IDE for PB 4.xx]
Posted: Mon Mar 22, 2010 2:22 pm
by gnozal
Update (v3.10.3.826)
Changes
- fixed 'Search Replace All' scintilla issue with several tabs
Re: jaPBe 3.10.3 [IDE for PB 4.xx]
Posted: Mon Mar 22, 2010 6:48 pm
by LCD
gnozal wrote:Update (v3.10.3.826)
Changes
- fixed 'Search Replace All' scintilla issue with several tabs
Thanks for the update!

Re: jaPBe 3.10.3 [IDE for PB 4.xx]
Posted: Wed Mar 24, 2010 4:06 am
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.
Re: jaPBe 3.10.3 [IDE for PB 4.xx]
Posted: Wed Mar 24, 2010 9:35 am
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...).
Re: jaPBe 3.10.3 [IDE for PB 4.xx]
Posted: Thu Mar 25, 2010 6:21 am
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.
Re: jaPBe 3.10.3 [IDE for PB 4.xx]
Posted: Thu Apr 08, 2010 12:25 pm
by gnozal
A little note : the Purifier is already implemented in the actual jaPBe version (since PB4.40 alpha in fact

) 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.
Re: jaPBe 3.10.3 [IDE for PB 4.xx]
Posted: Thu Apr 08, 2010 7:20 pm
by inc.
Nice!
