Skip to content

Commit 5a469cd

Browse files
author
Philip Guo
committed
more polish
1 parent c2cec43 commit 5a469cd

3 files changed

Lines changed: 16 additions & 15 deletions

File tree

TODO

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -115,13 +115,6 @@ line of code immediately below each annotation.
115115
---
116116
2011-09-23
117117

118-
- Add some smoother transitions between states, especially when
119-
functions are called and return ('call' and 'return' events,
120-
respectively) ... wait, those should be easy to fade out since the
121-
global state should be identical except for the latest stack frame
122-
being MISSING (but what about if you step backwards into a 'return'
123-
statement, though???)
124-
125118
- The BACKEND can easily print out a nice list of variables in each
126119
stack frame (and globals) by order of their APPEARANCE in the original
127120
program execution ... that way, the front-end doesn't have to "guess"

edu-python.css

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -255,10 +255,18 @@ button.bigBtn {
255255
font-size: 10pt;
256256
}
257257

258-
.retval {
258+
259+
.retval,
260+
.returnWarning {
259261
font-size: 9pt;
260262
}
261263

264+
.returnWarning {
265+
padding-top: 10px;
266+
color: #9d1e18;
267+
}
268+
269+
262270
table.listTbl {
263271
border: 0px solid black;
264272
background-color: #F5F798;
@@ -434,18 +442,14 @@ div#stack {
434442
}
435443

436444
div.stackFrame {
437-
border-left: 1px solid #999999;
438-
}
439-
440-
div.stackFrame,
441-
div.globalFrame {
442445
background-color: #ffffff;
443446
margin-bottom: 15px;
444447
padding: 2px;
445448
padding-left: 6px;
446449
padding-right: 6px;
447450
padding-bottom: 4px;
448451
font-size: 11pt;
452+
border-left: 1px solid #999999;
449453
}
450454

451455
/* apply to the currently selected stack frame (e.g., on mouse hover) */

edu-python.js

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,8 @@ var lightLineColor = '#FFFFCC';
4242
var errorColor = '#F87D76';
4343
var visitedLineColor = '#3D58A2';
4444

45-
var lightGray = "#dddddd";
45+
var lightGray = "#cccccc";
46+
//var lightGray = "#dddddd";
4647
var darkBlue = "#3D58A2";
4748
var pinkish = "#F15149";
4849

@@ -501,7 +502,7 @@ function renderDataStructuresVersion2(curEntry, vizDiv) {
501502
function renderGlobals() {
502503
// render global variables:
503504
if (orderedGlobals.length > 0) {
504-
$(vizDiv + " #stack").append('<div class="globalFrame" id="globals"><div id="globals_header" class="stackFrameHeader inactiveStackFrameHeader">Global variables</div></div>');
505+
$(vizDiv + " #stack").append('<div class="stackFrame" id="globals"><div id="globals_header" class="stackFrameHeader inactiveStackFrameHeader">Global variables</div></div>');
505506

506507
$(vizDiv + " #stack #globals").append('<table class="stackFrameVarTable" id="global_table"></table>');
507508

@@ -581,6 +582,9 @@ function renderDataStructuresVersion2(curEntry, vizDiv) {
581582
// special treatment for displaying return value and indicating
582583
// that the function is about to return to its caller
583584
if (varname == '__return__') {
585+
assert(curEntry.event == 'return'); // sanity check
586+
587+
tbl.append('<tr><td colspan="2" class="returnWarning">About to return to caller</td></tr>');
584588
tbl.append('<tr><td class="stackFrameVar"><span class="retval">Return value:</span></td><td class="stackFrameValue"></td></tr>');
585589
}
586590
else {

0 commit comments

Comments
 (0)