vdfsplat / AppSrc / VdfSplat.src @ 72
History | View | Annotate | Download (26.7 KB)
1 |
//TH-Header |
---|---|
2 |
//***************************************************************************************** |
3 |
// Copyright (c) 2013 Antwise Solutions |
4 |
// All rights reserved. |
5 |
// |
6 |
// $FileName : VdfSplat.src |
7 |
// $ProjectName : Splat ! Vdf Debugger |
8 |
// $Authors : Wil van Antwerpen |
9 |
// $Created : 12.14.2013 23:42 |
10 |
// $Type : GPLv2 |
11 |
// |
12 |
// Contents: |
13 |
// |
14 |
//***************************************************************************************** |
15 |
//TH-RevisionStart |
16 |
//TH-RevisionEnd |
17 |
|
18 |
Use DFAllEnt.pkg |
19 |
Use cToolTipController.pkg |
20 |
Use cDebugCJCommandBarSystem.pkg |
21 |
Use vWin32fh.pkg |
22 |
Use seq_chnl.pkg |
23 |
Use cSplatApplication.pkg |
24 |
Use cSplatPanel.pkg |
25 |
|
26 |
Object oHtmlHelp is a cHtmlHelp |
27 |
End_Object |
28 |
|
29 |
Object oApplication is a cSplatApplication |
30 |
Set peHelpType to htHtmlHelp |
31 |
|
32 |
Set psAutoOpenWorkspace to "" // We're not using data files, the exe has to be completely self contained. |
33 |
End_Object |
34 |
|
35 |
Object oToolTipController is a cToolTipController |
36 |
Move Self to ghoToolTipController |
37 |
End_Object |
38 |
|
39 |
Use oEditContextMenu.pkg |
40 |
Use oDEOEditContextMenu.pkg |
41 |
|
42 |
#IF (1=0) |
43 |
// This imagelist is a dummy, it is only used to have the Studio recognize |
44 |
// which bitmaps are used in the application so that a "Scan Bitmaps" will always |
45 |
// include the bitmaps as embedded resource. The imagelist itself is not used. |
46 |
Object ImageContainer is a cImageList32 |
47 |
Set piMaxImages to 10 |
48 |
Procedure OnCreate |
49 |
Integer iImage |
50 |
Get AddImage "Debugger.bmp/t" to iImage |
51 |
End_Procedure |
52 |
End_Object |
53 |
#ENDIF |
54 |
|
55 |
Object oMain is a cSplatPanel |
56 |
Set Label to "VdfSplat" |
57 |
Set Location to 4 3 |
58 |
Set Size to 300 450 |
59 |
|
60 |
// Make sure it can be used here already |
61 |
Use cDebuggerEngine.pkg |
62 |
|
63 |
|
64 |
Object oOpenProgramDialog Is an OpenDialog |
65 |
Set Dialog_Caption to "Select a DataFlex executable file to debug" |
66 |
Set Filter_String to 'Visual DataFlex Executables|*.exe' |
67 |
Set Initial_Folder to 'C:\Program Files\Visual DataFlex' |
68 |
// Set MultiSelect_State To False |
69 |
Set NoChangeDir_State To True // don't touch my current folder |
70 |
Set CreatePrompt_State To False |
71 |
Set HideReadOnly_State To True |
72 |
Set Filter_Index to 2 |
73 |
End_Object |
74 |
|
75 |
Object oOpenSourceFileDialog is an OpenDialog |
76 |
Set Filter_String to 'Visual DataFlex source|*.*' |
77 |
// Set Initial_Folder to 'C:\Program Files\Visual DataFlex' |
78 |
// Set MultiSelect_State To False |
79 |
Set NoChangeDir_State To True // don't touch my current folder |
80 |
Set CreatePrompt_State To False |
81 |
Set HideReadOnly_State To True |
82 |
Set Filter_Index to 2 |
83 |
End_Object |
84 |
|
85 |
Procedure Warning_Box String sMessage String sCaption |
86 |
Integer eResponse |
87 |
|
88 |
Get Message_Box sMessage sCaption MB_OK MB_ICONWARNING to eResponse |
89 |
End_Procedure // Warning_Box |
90 |
|
91 |
Procedure Fishy_Box String sMessage String sDebugfile |
92 |
Send Warning_Box ("Sorry but the debug file for the executable you choose\n\n"+; |
93 |
sDebugfile+"\ndoesn't look like it is valid.\n\n"+sMessage+"\n\nPlease try again.") ; |
94 |
"VdfSplat thinks this is fishy" |
95 |
End_Procedure // Fishy_Box |
96 |
|
97 |
// |
98 |
// Reads the runtime version of the .dbg file passed. |
99 |
// The file must exist. |
100 |
// |
101 |
Function ReadRuntimeVersion String sDebugFile Returns Integer |
102 |
Integer iRuntime |
103 |
Integer iChIn |
104 |
Integer iFileSize |
105 |
Integer iVdfMax |
106 |
Integer iVdfMin |
107 |
String sBinary |
108 |
|
109 |
Move 0 To iRuntime |
110 |
Get vWin32_APIFileSize sDebugFile to iFileSize |
111 |
If (iFileSize > 40000) Begin |
112 |
|
113 |
Get Seq_Open_Input_Channel sDebugfile to iChIn |
114 |
Direct_Input channel iChIn ("binary:" + sDebugfile) |
115 |
Read_Block channel iChIn sBinary 50 |
116 |
Send Seq_Close_Channel iChIn |
117 |
If (Left(sBinary,4)="VDFB") Begin |
118 |
Move (Ascii(Mid(sBinary,1,5))) To iVdfMax |
119 |
Move (Ascii(Mid(sBinary,1,9))) To iVdfMin |
120 |
If ((iVdfMax>2 and iVdfMax < 26) and (iVdfMin<5)) Begin |
121 |
Move ((iVdfMax*10)+iVdfMin) To iRuntime |
122 |
End |
123 |
Else Begin |
124 |
Send Fishy_Box ("The debug file suggests this is VDF version"*trim(iVdfMax)+"."+trim(iVdfMin)+"\nNot very likely that.") sDebugfile |
125 |
End |
126 |
End |
127 |
Else Begin |
128 |
Send Fishy_Box "The debug file signature is not correct." sDebugfile |
129 |
End |
130 |
End |
131 |
Else Begin |
132 |
Send Fishy_Box "It is wayyy too small." sDebugfile |
133 |
End |
134 |
Function_Return iRuntime |
135 |
End_Function // ReadRuntimeVersion |
136 |
|
137 |
Procedure doOpenFile |
138 |
Handle hoDebug |
139 |
Handle hoEditor |
140 |
Handle hoDialog |
141 |
Boolean bOpen |
142 |
Boolean bIsValid |
143 |
String sFileName |
144 |
|
145 |
Get phoDebugger to hoDebug |
146 |
If (hoDebug) Begin |
147 |
Move (oOpenSourceFileDialog(Self)) To hoDialog |
148 |
|
149 |
Get Show_Dialog of hoDialog to bOpen |
150 |
If bOpen Begin |
151 |
Get File_Name of hoDialog To sFileName |
152 |
Get ComIsValidSourceFile of hoDebug sFileName To bIsValid |
153 |
If (bIsValid) Begin |
154 |
Get phoEditor to hoEditor |
155 |
If (hoEditor) Begin |
156 |
Send DoOpenSourceFile of hoEditor sFileName |
157 |
End |
158 |
End |
159 |
Else Begin |
160 |
Send Info_Box "source file is not part of selected program we are currently debugging." |
161 |
End |
162 |
End |
163 |
|
164 |
End |
165 |
End_Procedure // doOpenFile |
166 |
|
167 |
Procedure DoInitializeParameters |
168 |
Set piDebugfileVersion To 0 |
169 |
//Set phoDebugger To 0 |
170 |
Set psApplication Of ghoApplication To "" |
171 |
End_Procedure |
172 |
|
173 |
// |
174 |
// Locates the debug file for the application binary passed. |
175 |
// Returns TRUE if found and sets property piDebugFileVersion |
176 |
// |
177 |
Function ParseApplicationDebugFile String sApplication Returns Boolean |
178 |
Boolean bExists |
179 |
Integer iRuntime |
180 |
String sExt |
181 |
String sDebugfile |
182 |
|
183 |
Get ParseFileExtension sApplication To sExt |
184 |
Move (Replace("."+sExt,sApplication,".dbg")) To sDebugfile |
185 |
Get vFilePathExists sDebugfile to bExists |
186 |
If (bExists=false) Begin |
187 |
Send Warning_Box ("Sorry but for the executable chosing the corresponding debug file\n"+; |
188 |
sDebugfile+"\ncould not be located.\n\nPlease select again.") ; |
189 |
"VdfSplat can't do that" |
190 |
End |
191 |
Else Begin |
192 |
Get ReadRuntimeVersion sDebugfile To iRuntime |
193 |
If (iRuntime=0) Begin |
194 |
Move False To bExists |
195 |
End |
196 |
Else Begin |
197 |
Set piDebugfileVersion To iRuntime |
198 |
End |
199 |
End |
200 |
|
201 |
Function_Return bExists |
202 |
End_Function |
203 |
|
204 |
Procedure doOpenProgram |
205 |
Boolean bOpen |
206 |
Handle hoDialog |
207 |
String sApplication |
208 |
|
209 |
Move (oOpenProgramDialog(Self)) To hoDialog |
210 |
|
211 |
Get Show_Dialog of hoDialog to bOpen |
212 |
If bOpen Begin |
213 |
Get File_Name of hoDialog To sApplication |
214 |
Send DoSetCaptionLabel Of (oVdfDbg(oClientArea(Self))) sApplication |
215 |
Set psApplication of ghoApplication To sApplication |
216 |
End |
217 |
Else Send Info_Box "You did not choose a file, nothing to debug." |
218 |
End_Procedure |
219 |
|
220 |
Procedure doDebugRun |
221 |
Boolean bExists |
222 |
Boolean bRestartMode |
223 |
Handle hoDebug |
224 |
Handle hoParent |
225 |
String sApplication |
226 |
|
227 |
Get psApplication of ghoApplication To sApplication |
228 |
If (sApplication = "") Begin |
229 |
Send doOpenProgram |
230 |
Get psApplication of ghoApplication To sApplication |
231 |
End |
232 |
If (sApplication="") Begin |
233 |
// Oh still no app? Nothing to debug then |
234 |
Procedure_Return |
235 |
End |
236 |
Get ParseApplicationDebugFile sApplication To bExists |
237 |
|
238 |
Get phoDebugger to hoDebug |
239 |
If (hoDebug) Begin |
240 |
Get pbDebugRestart of hoDebug to bRestartMode |
241 |
If (bRestartMode) Begin |
242 |
If (IsComObjectCreated(hoDebug)) Begin |
243 |
Send ReleaseComObject of hoDebug |
244 |
End |
245 |
Send Destroy of hoDebug |
246 |
Move 0 To hoDebug |
247 |
End |
248 |
End |
249 |
If (bExists and hoDebug=0) Begin |
250 |
// |
251 |
|
252 |
Get phoDebuggerHost To hoParent |
253 |
Get Create Of hoParent (RefClass(cDebuggerEngine)) To hoDebug |
254 |
If (hoDebug) Begin |
255 |
Send DoCreateEngine of hoDebug |
256 |
End |
257 |
End |
258 |
If (bExists and hoDebug<>0) Begin |
259 |
|
260 |
Set psApplication of ghoApplication To sApplication |
261 |
Set ApplicationFileName of hoDebug To sApplication |
262 |
// ?? |
263 |
Send DoStartDebug |
264 |
End |
265 |
End_Procedure // doDebugRun |
266 |
|
267 |
Procedure DoStartDebug |
268 |
String sApplication |
269 |
Integer iRuntime |
270 |
Handle hoDebug |
271 |
|
272 |
Get phoDebugger to hoDebug |
273 |
If (hoDebug<>0) Begin |
274 |
Get psApplication Of ghoApplication To sApplication |
275 |
Get piDebugfileVersion To iRuntime |
276 |
//Send ComPause of hoDebug |
277 |
//Procedure ComStartProgram String llcmdLine Variant llwebApp Variant llurl |
278 |
If (iRuntime<181) Begin |
279 |
Send ComStartProgram of hoDebug sApplication false "" |
280 |
End |
281 |
Else Begin // noheap or heap? that's' the question. |
282 |
Send ComStartProgram181 of hoDebug sApplication True false "" |
283 |
End |
284 |
Send ComUpdateViews Of hoDebug |
285 |
End |
286 |
End_Procedure |
287 |
|
288 |
Procedure doStopDebug |
289 |
Boolean bPaused |
290 |
Boolean bBreakMode |
291 |
Handle hoDebug |
292 |
|
293 |
Get phoDebugger to hoDebug |
294 |
If (hoDebug) Begin |
295 |
Get pbLimitedBreakMode of hoDebug to bBreakMode |
296 |
Get HasProgramPaused To bPaused |
297 |
If (bPaused) Begin |
298 |
//Send doDebugContinue |
299 |
End |
300 |
Send ComStopProgram of hoDebug |
301 |
Send ComUpdateViews Of hoDebug |
302 |
If (bBreakMode=False) Begin |
303 |
// You cannot destroy the debugger on here as the messageloop has to run to get the debuggee back to run |
304 |
// so killing it here would be out of sync with what you want. |
305 |
//Send Destroy of hoDebug |
306 |
Send DoInitializeParameters |
307 |
End |
308 |
End |
309 |
End_Procedure // doStopDebug |
310 |
|
311 |
Procedure DoRestartDebug |
312 |
String sApplication |
313 |
|
314 |
Get psApplication of ghoApplication To sApplication |
315 |
Set pbDebugRestart of (phoDebugger(Self)) to True |
316 |
Send DoStopDebug |
317 |
//Sleep 1 |
318 |
Set psApplication of ghoApplication To sApplication |
319 |
End_Procedure |
320 |
|
321 |
Procedure doDebugPause |
322 |
Handle hoDebug |
323 |
|
324 |
Get phoDebugger to hoDebug |
325 |
If (hoDebug) Begin |
326 |
Send ComPause of hoDebug |
327 |
Send ComUpdateViews Of hoDebug |
328 |
End |
329 |
End_Procedure // doDebugPause |
330 |
|
331 |
Procedure doDebugContinue |
332 |
Handle hoDebug |
333 |
|
334 |
Get phoDebugger to hoDebug |
335 |
If (hoDebug) Begin |
336 |
Send ComContinue of hoDebug |
337 |
Send ComUpdateViews Of hoDebug |
338 |
End |
339 |
End_Procedure // doDebugContinue |
340 |
|
341 |
Procedure doDebugStepOver |
342 |
Handle hoDebug |
343 |
|
344 |
Get phoDebugger to hoDebug |
345 |
If (hoDebug) Begin |
346 |
Send ComStepOver of hoDebug |
347 |
Send ComUpdateViews Of hoDebug |
348 |
End |
349 |
End_Procedure // doDebugStepOver |
350 |
|
351 |
Procedure doDebugStepInto |
352 |
Handle hoDebug |
353 |
|
354 |
Get phoDebugger to hoDebug |
355 |
If (hoDebug) Begin |
356 |
Send ComStepInto of hoDebug |
357 |
Send ComUpdateViews Of hoDebug |
358 |
End |
359 |
End_Procedure // doDebugStepInto |
360 |
|
361 |
Procedure doDebugStepOut |
362 |
Handle hoDebug |
363 |
|
364 |
Get phoDebugger to hoDebug |
365 |
If (hoDebug) Begin |
366 |
Send ComStepOut of hoDebug |
367 |
Send ComUpdateViews Of hoDebug |
368 |
End |
369 |
End_Procedure // doDebugStepOut |
370 |
|
371 |
Procedure doSetBreakPoint |
372 |
Integer iLine |
373 |
String sFileName |
374 |
Boolean bSuccess |
375 |
Handle hoDebugger |
376 |
Handle hoEditor |
377 |
|
378 |
Get phoDebugger to hoDebugger |
379 |
Get phoEditor To hoEditor |
380 |
If (hoDebugger<>0 and hoEditor<>0) begin |
381 |
|
382 |
Get psFileName Of hoEditor To sFileName |
383 |
Get CurrentLine Of hoEditor To iLine |
384 |
If (sFileName<>"" and iLine<>0) Begin |
385 |
Get SetBreakPoint of hoDebugger sFileName (&iLine) To bSuccess |
386 |
If (bSuccess=false) Begin |
387 |
Send info_box ("Set breakpoint at line"*trim(iLine)*"Failed.\nReturned="*trim(bSuccess)) |
388 |
End |
389 |
//Send ComSetMarginImages iLine 1 |
390 |
End |
391 |
End |
392 |
End_Procedure |
393 |
|
394 |
Procedure doRemoveBreakPoint |
395 |
Integer iLine |
396 |
String sFileName |
397 |
Boolean bSuccess |
398 |
Handle hoDebugger |
399 |
Handle hoEditor |
400 |
|
401 |
Get phoDebugger to hoDebugger |
402 |
Get phoEditor To hoEditor |
403 |
If (hoDebugger<>0 and hoEditor<>0) begin |
404 |
|
405 |
Get psFileName Of hoEditor To sFileName |
406 |
Get CurrentLine Of hoEditor To iLine |
407 |
If (sFileName<>"" and iLine<>0) Begin |
408 |
Get RemoveBreakPoint of hoDebugger sFileName (&iLine) To bSuccess |
409 |
If (bSuccess=false) Begin |
410 |
Send info_box ("Removing breakpoint at line"*trim(iLine)*"Failed.\nReturned="*trim(bSuccess)) |
411 |
End |
412 |
//Send ComSetMarginImages iLine 1 |
413 |
End |
414 |
End |
415 |
End_Procedure |
416 |
|
417 |
// |
418 |
//Procedure doCreateCallStack |
419 |
// Boolean bCreated |
420 |
// Handle hoCallStack |
421 |
// |
422 |
// |
423 |
// Get phoCallStack To hoCallStack |
424 |
// If (hoCallStack) Begin |
425 |
// Send CreateComObject of hoCallStack |
426 |
// Get IsComObjectCreated Of hoCallStack To bCreated |
427 |
// Showln "callstack [" bCreated "]" |
428 |
// If (bCreated) Begin |
429 |
// Send RegisterComEvents Of hoCallStack |
430 |
// //Set ComWindowType Of hoGlobals To 1 // global |
431 |
// End |
432 |
// End |
433 |
//End_Procedure // doCreateCallStack |
434 |
|
435 |
Function HasProgramStarted Returns Boolean |
436 |
Boolean bStarted |
437 |
Handle hoDebugger |
438 |
|
439 |
Move False To bStarted |
440 |
Get phoDebugger To hoDebugger |
441 |
If (hoDebugger) Begin |
442 |
Get pbProgramStarted of hoDebugger To bStarted |
443 |
End |
444 |
Function_Return bStarted |
445 |
End_Function // HasProgramStarted |
446 |
|
447 |
// |
448 |
// A program can only be paused after it has started |
449 |
// This is used as an indication that we can step through the source |
450 |
// The property pbProgramPaused is set on both a breakpoint and on a Pause |
451 |
Function HasProgramPaused Returns Boolean |
452 |
Boolean bPaused |
453 |
Boolean bStarted |
454 |
Handle hoDebugger |
455 |
|
456 |
Move False To bPaused |
457 |
Get HasProgramStarted To bStarted |
458 |
If (bStarted) Begin |
459 |
Get phoDebugger To hoDebugger |
460 |
If (hoDebugger) Begin |
461 |
Get pbProgramPaused of hoDebugger to bPaused |
462 |
End |
463 |
End |
464 |
Function_Return bPaused |
465 |
End_Function // HasProgramPaused |
466 |
|
467 |
// |
468 |
// A breakpoint can only be removed if we have existing breakpoints |
469 |
// |
470 |
Function HasBreakpoints Returns Boolean |
471 |
Boolean bHasBreakPoints |
472 |
Boolean bStarted |
473 |
Handle hoDebugger |
474 |
|
475 |
Move False To bHasBreakPoints |
476 |
Get HasProgramStarted To bStarted |
477 |
If (bStarted) Begin |
478 |
Get phoDebugger To hoDebugger |
479 |
If (hoDebugger) Begin |
480 |
Get HasBreakPoints of hoDebugger to bHasBreakPoints |
481 |
End |
482 |
End |
483 |
Function_Return bHasBreakPoints |
484 |
End_Function // HasBreakPoints |
485 |
|
486 |
|
487 |
|
488 |
Object oCommandBarSystem is a cDebugCJCommandBarSystem |
489 |
|
490 |
Procedure OnCreateCommandBars |
491 |
Handle hoOptions |
492 |
Get OptionsObject to hoOptions |
493 |
Forward Send OnCreateCommandBars |
494 |
End_Procedure |
495 |
|
496 |
|
497 |
Object oMenuBar is a cCJMenuBar |
498 |
|
499 |
Object oFileMenu is a cCJMenuItem |
500 |
Set peControlType to xtpControlPopup |
501 |
Set psCaption to "&File" |
502 |
Set psDescription to "Find, Save, Delete, Clear information or quit this application." |
503 |
Set psCategory to "Menus" |
504 |
|
505 |
Object oOpenProgramButton Is a cCJOpenProgramMenuItem |
506 |
Set pbAddToDesignerMenu to True |
507 |
End_Object |
508 |
|
509 |
Object oCJDebugPauseMenuItem is a cCJDebugPauseMenuItem |
510 |
Set pbAddToDesignerMenu to True |
511 |
Set pbControlBeginGroup to True |
512 |
End_Object |
513 |
|
514 |
|
515 |
Object oExitMenu is a cCJExitMenuItem |
516 |
Set pbControlBeginGroup to True |
517 |
End_Object |
518 |
|
519 |
End_Object |
520 |
|
521 |
Object oViewMenu is a cCJMenuItem |
522 |
Set peControlType to xtpControlPopup |
523 |
Set psCaption to "&View" |
524 |
Set psToolTip to "View" |
525 |
Set psDescription to "Available Views" |
526 |
|
527 |
Object ooVdfdbgMenuItem is a cCJMenuItem |
528 |
Set psCaption to "Debugger View" |
529 |
Set psTooltip to "The debugger main view" |
530 |
|
531 |
Procedure OnExecute Variant vCommandBarControl |
532 |
Handle hoClient |
533 |
Get Client_Id to hoClient |
534 |
Send Activate_oVdfdbg of hoClient |
535 |
End_Procedure |
536 |
End_Object |
537 |
|
538 |
Object oObjectInspectorMenuItem is a cCJMenuItem |
539 |
Set psCaption to "Object Inspector Ctrl+L" |
540 |
Set psTooltip to "Inspect the objects in the running program" |
541 |
|
542 |
Procedure OnExecute Variant vCommandBarControl |
543 |
Handle hoClient |
544 |
Get Client_Id to hoClient |
545 |
Send doActivateObjectInspectorPanel of hoClient |
546 |
End_Procedure |
547 |
|
548 |
Function IsEnabled Returns Boolean |
549 |
Boolean bPaused |
550 |
|
551 |
Get HasProgramPaused To bPaused |
552 |
Function_Return bPaused |
553 |
End_Function |
554 |
End_Object |
555 |
End_Object |
556 |
|
557 |
Object oNavigateMenu is a cCJMenuItem |
558 |
Set peControlType to xtpControlPopup |
559 |
Set psCaption to "&Navigate" |
560 |
Set psTooltip to "Navigate" |
561 |
Set psDescription to "Move to different areas of the application" |
562 |
|
563 |
Object oNextAreaMenu is a cCJNextAreaMenu |
564 |
End_Object |
565 |
|
566 |
Object oPriorAreaMenu is a cCJPriorAreaMenu |
567 |
End_Object |
568 |
|
569 |
Object oNextViewMenu is a cCJNextViewMenu |
570 |
End_Object |
571 |
|
572 |
Object oPriorViewMenu is a cCJPriorViewMenu |
573 |
End_Object |
574 |
|
575 |
Object oPromptMenu is a cCJPromptMenuItem |
576 |
Set pbControlBeginGroup to True |
577 |
End_Object |
578 |
|
579 |
Object oZoomMenu is a cCJZoomMenuItem |
580 |
End_Object |
581 |
|
582 |
End_Object |
583 |
|
584 |
Object oWindowMenu is a cCJMDIWindowsMenuItem |
585 |
Set peControlType to xtpControlPopup |
586 |
Set psCaption to "&Window" |
587 |
Set psToolTip to "Window" |
588 |
Set psDescription to "Display Current Views and set other display options." |
589 |
|
590 |
// These are the static windows items. More will be created in onInitPopup |
591 |
Object oDisplayOptionsMenu is a cCJMenuItem |
592 |
Set peControlType to xtpControlPopup |
593 |
Set psCaption to "&Display Options" |
594 |
Set psToolTip to "Display Options" |
595 |
Set psDescription to "Set display options" |
596 |
|
597 |
Object oStatusbarMenu is a cCJStatusbarMenuItem |
598 |
End_Object |
599 |
|
600 |
Object oAutoArrangeIconsMenu is a cCJAutoArrangeIconsMenuItem |
601 |
End_Object |
602 |
|
603 |
Object oRestoreMenusMenu is a cCJRestoreMenusMenuItem |
604 |
Set pbControlBeginGroup to True |
605 |
End_Object |
606 |
|
607 |
End_Object |
608 |
|
609 |
Object oCascadeMenu is a cCJCascadeMenuItem |
610 |
Set pbControlBeginGroup to True |
611 |
End_Object |
612 |
|
613 |
Object oHorizTile is a cCJTileHorizontally |
614 |
End_Object |
615 |
|
616 |
Object oVertTile is a cCJTileVertically |
617 |
End_Object |
618 |
|
619 |
Object oMinimizeMenuItem is a cCJMinimizeWindowsMenuItem |
620 |
Set pbControlBeginGroup to True |
621 |
End_Object |
622 |
|
623 |
Object oRestoreMenuItem is a cCJRestoreWindowsMenuItem |
624 |
End_Object |
625 |
|
626 |
Object oArrangeIconsMenuItem is a cCJAutoArrangeIconsMenuItem |
627 |
Set pbControlBeginGroup to True |
628 |
End_Object |
629 |
|
630 |
End_Object |
631 |
|
632 |
Object oHelpMenu is a cCJMenuItem |
633 |
Set peControlType to xtpControlPopup |
634 |
Set psCaption to "&Help" |
635 |
Set psDescription to "Access Information for learning and using this DataFlex application." |
636 |
Set psToolTip to "Help" |
637 |
|
638 |
Object oHelpMenuItem is a cCJHelpMenuItem |
639 |
End_Object |
640 |
|
641 |
Object oAboutMenuItem is a cCJAboutMenuItem |
642 |
End_Object |
643 |
|
644 |
End_Object |
645 |
|
646 |
End_Object |
647 |
|
648 |
Object oDebugToolBar is a cCJToolbar |
649 |
Set psTitle To "Debugging Toolbar" |
650 |
|
651 |
Object oOpenProgramButton Is a cCJOpenProgramMenuItem |
652 |
End_Object |
653 |
|
654 |
Object oStartDebugButton is a cCJStartDebugMenuItem |
655 |
End_Object |
656 |
|
657 |
Object oStopDebugButton is a cCJStopDebugMenuItem |
658 |
End_Object |
659 |
|
660 |
Object oRestartDebugButton is a cCJRestartDebugMenuItem |
661 |
End_Object |
662 |
|
663 |
Object oDebugPauseButton is a cCJDebugPauseMenuItem |
664 |
End_Object |
665 |
|
666 |
Object oDebugContinueButton is a cCJDebugContinueMenuItem |
667 |
End_Object |
668 |
|
669 |
Object oDebugStepOverButton is a cCJStepOverMenuItem |
670 |
End_Object |
671 |
|
672 |
Object oDebugStepIntoButton is a cCJStepIntoMenuItem |
673 |
End_Object |
674 |
|
675 |
Object oDebugStepOutButton is a cCJStepOutMenuItem |
676 |
End_Object |
677 |
|
678 |
|
679 |
End_Object |
680 |
|
681 |
Object oFileToolbar is a cCJToolbar |
682 |
Set psTitle To "Open Source Toolbar" |
683 |
Object oFileOpen is a cCJOpenFileMenuItem |
684 |
End_Object |
685 |
End_Object |
686 |
|
687 |
Object oBreakPointToolBar is a cCJToolbar |
688 |
Set psTitle to "Breakpoint Toolbar" |
689 |
|
690 |
Object oAddBreakpointButton is a cCJAddBreakpointMenuItem |
691 |
End_Object |
692 |
|
693 |
Object oRemoveBreakpointButton is a cCJRemoveBreakpointMenuItem |
694 |
End_Object |
695 |
End_Object |
696 |
|
697 |
Object oEditToolBar is a cCJToolbar |
698 |
Set psTitle to "Edit Toolbar" |
699 |
|
700 |
Object oCutToolbarItem is a cCJCutMenuItem |
701 |
End_Object |
702 |
|
703 |
Object oCopyToolbarItem is a cCJCopyMenuItem |
704 |
End_Object |
705 |
|
706 |
Object oPasteToolbarItem is a cCJPasteMenuItem |
707 |
End_Object |
708 |
|
709 |
Object oDeleteEditToolbarItem is a cCJDeleteEditMenuItem |
710 |
Set pbControlBeginGroup to True |
711 |
End_Object |
712 |
|
713 |
End_Object |
714 |
|
715 |
Object oStatusBar is a cCJStatusBar |
716 |
|
717 |
Object oStatusPane1 is a cCJStatusBarPane |
718 |
Set piID to sbpIDIdlePane |
719 |
Set pbStyleStretch to True |
720 |
Set psText To "" |
721 |
End_Object |
722 |
|
723 |
Object oStatusPane2 is a cCJStatusBarPane |
724 |
Set phoViewPane to Self |
725 |
Set pbStyleStretch to True |
726 |
Set psText To "" |
727 |
End_Object |
728 |
|
729 |
Object oStatusPane3 is a cCJStatusBarPane |
730 |
Set pbStyleStretch to True |
731 |
Set psText To "testing 888" |
732 |
End_Object |
733 |
|
734 |
Function EditorHandle Returns Handle |
735 |
Handle hoEditor |
736 |
Boolean bIsCreated |
737 |
|
738 |
Get phoEditor To hoEditor |
739 |
If (hoEditor) Begin |
740 |
Get IsComObjectCreated Of hoEditor To bIsCreated |
741 |
If (bIsCreated=false) Begin |
742 |
Move 0 To hoEditor |
743 |
End |
744 |
End |
745 |
Function_Return hoEditor |
746 |
End_Function |
747 |
|
748 |
Function EditorCurrentLine Returns Integer |
749 |
Handle hoEditor |
750 |
Integer iCount |
751 |
|
752 |
Get EditorHandle To hoEditor |
753 |
If (hoEditor) Begin |
754 |
Get CurrentLine Of hoEditor To iCount |
755 |
End |
756 |
Function_Return iCount |
757 |
End_Function // EditorCurrentLine |
758 |
|
759 |
Function EditorLineCount Returns Integer |
760 |
Handle hoEditor |
761 |
Integer iCount |
762 |
|
763 |
Get EditorHandle To hoEditor |
764 |
If (hoEditor) Begin |
765 |
Get ComLineCount Of hoEditor To iCount |
766 |
End |
767 |
Function_Return iCount |
768 |
End_Function // EditorLineCount |
769 |
|
770 |
Procedure Show_Status_Help String sStatusHelp |
771 |
Integer iLine |
772 |
Handle hoEditor |
773 |
String sFileName |
774 |
|
775 |
Move "" To sFileName |
776 |
Get EditorHandle To hoEditor |
777 |
If (hoEditor) Begin |
778 |
Get psFileName of hoEditor To sFileName |
779 |
End |
780 |
Get EditorCurrentLine To iLine |
781 |
Set psText Of oStatusPane1 To ("Line: "+trim(iLine)) |
782 |
Set psText Of oStatusPane2 To ("File: "+sFileName) |
783 |
End_Procedure |
784 |
|
785 |
End_Object |
786 |
|
787 |
End_Object |
788 |
|
789 |
Object oClientArea is a ClientArea |
790 |
Use StdAbout.pkg |
791 |
Use ObjectInspector.dg |
792 |
Use Vdfdbg.vw |
793 |
|
794 |
Procedure doActivateObjectInspectorPanel |
795 |
Send StartObjectInspector |
796 |
End_Procedure |
797 |
|
798 |
|
799 |
|
800 |
Procedure Activate_About |
801 |
String sTitle sCopyright sVersion sBitmap sAuthor |
802 |
|
803 |
// string sVal sVal2 sVal3 |
804 |
// move (SysConf(sysconf_os_name)) to sVal |
805 |
// send Info_box sVal "Os Name" |
806 |
// move (SysConf(sysconf_os_short_name)) to sVal2 |
807 |
// send Info_box sVal2 "os short name" |
808 |
// move (SysConf(sysconf_os_major_rev)) to sVal3 |
809 |
// send Info_Box sVal3 "os major revision" |
810 |
// // |
811 |
Move "VdfSplat" to sTitle |
812 |
Move "Alfa 1" to sVersion |
813 |
Move "Copyright 2015, GPL v2, Antwise Solutions" to sCopyright |
814 |
Move "Author: Wil van Antwerpen" to sAuthor |
815 |
Move "Debugger.bmp/t" to sBitMap |
816 |
Send DoAbout sTitle sVersion sCopyright sAuthor sBitMap |
817 |
End_Procedure |
818 |
|
819 |
End_Object |
820 |
|
821 |
End_Object |
822 |
|
823 |
|
824 |
Procedure StartDebugging |
825 |
String sApplication |
826 |
Handle hoClient |
827 |
|
828 |
Get Client_Id Of oMain To hoClient |
829 |
If (hoClient) Begin |
830 |
Send Activate_oVdfdbg of hoClient |
831 |
Get psApplication of ghoApplication to sApplication |
832 |
If (sApplication<>"") Begin |
833 |
Send doDebugRun of hoClient |
834 |
End |
835 |
End |
836 |
End_Procedure |
837 |
|
838 |
Send StartDebugging |
839 |
Start_UI |