Thanks for your explanationts-soft wrote:This is for ignore both word in one line.ricardo wrote: 1.- What the purpose of "!wend" in RaEditAddDefBlock(#RaEdit,"while !wend", "wend", #BD_INCLUDELAST)?Code: Select all
While a : Wend

Thanks for your explanationts-soft wrote:This is for ignore both word in one line.ricardo wrote: 1.- What the purpose of "!wend" in RaEditAddDefBlock(#RaEdit,"while !wend", "wend", #BD_INCLUDELAST)?Code: Select all
While a : Wend
Code: Select all
SendMessage_(GadgetID(#RaEdit), #REM_SETCHARTAB, ';', #CT_NONE)
SendMessage_(GadgetID(#RaEdit), #REM_SETCHARTAB, '&', #CT_CMNTCHAR)
Code: Select all
XIncludeFile #PB_Compiler_Home + "include\raedit.pb"
hwnd = OpenWindow(0,#PB_Ignore,#PB_Ignore,280,200,"")
CreateGadgetList(hwnd)
ra = RaEditGadget(0,0,0,280,200,0,0)
font = LoadFont(0,"courier new",10)
SetGadgetFont(0,font)
SetGadgetColor(0,#RAEdit_CommentColor,$0000FF)
SendMessage_(ra, #REM_SETCHARTAB, ';', #CT_NONE)
SendMessage_(ra, #REM_SETCHARTAB, '&', #CT_CMNTCHAR)
SetGadgetText(0,"blaaaaa &blaaaa")
Repeat
event = WaitWindowEvent()
Until event = #PB_Event_CloseWindow
Code: Select all
...
If *RAData\BlockList
ForEachObject(*RAData\BlockList ,*bd) ; pureobject.inc.pb
...
Code: Select all
...
If (id = #PB_Any)
*RaEdit\id = result
Else
*RaEdit\id = id
EndIf
RemoveKeyboardShortcut(*RaEdit\id, 9) ; CRASHES !!!!!!
SendMessage_(hwnd, #REM_TABWIDTH,2,1)
...
Code: Select all
XIncludeFile (#PB_Compiler_Home+"Include\raedit.pb")
IncludeFile "editor includes\editorform.pb"
Open_caspereditor()
Repeat ; Start of the event loop
Event = WaitWindowEvent() ; This line waits until an event is received from Windows
WindowID = EventWindow() ; The Window where the event is generated, can be used in the gadget procedures
GadgetID = EventGadget() ; Is it a gadget event?
EventType = EventType() ; The event type
If Event = #PB_Event_Gadget
EndIf
Until Event = #PB_Event_CloseWindow ; End of the event loop
End
Code: Select all
Enumeration
#caspereditorwin
#editorpanel
#RaEdit
EndEnumeration
Procedure Open_caspereditor()
If OpenWindow(#caspereditorwin, 228, 55,1024,768, "CPK Editor", #PB_Window_SystemMenu | #PB_Window_MinimizeGadget | #PB_Window_TitleBar | #PB_Window_ScreenCentered )
If CreateGadgetList(WindowID(#caspereditorwin))
PanelGadget(#editorpanel,0,40,700,500)
AddGadgetItem(#editorpanel,-1,"New")
RaEditGadget(#RaEdit, 0,0,700,500)
RaEditAddDefBlock(#RaEdit,"procedure", "endprocedure", #BD_INCLUDELAST | #BD_DIVIDERLINE)
SetGadgetAttribute(#RaEdit, #RaEdit_HilightLine, #True)
SetGadgetAttribute(#RaEdit, #RaEdit_LineNumberBar, #True)
RaEditSetHiliteWords(#RaEdit,RGB(24, 130, 173),"procedure")
;CloseGadgetList()
EndIf
EndIf
EndProcedure
Code: Select all
RemoveKeyboardShortcut(GetProp_(*Globals\CurrentWindow, "PB_WindowID")-1, 9)
SendMessage_(hwnd, #REM_TABWIDTH, 2, 1)