Changes between Version 1 and Version 2 of CodeExampleMacro


Ignore:
Timestamp:
May 22, 2009 9:03:05 AM (5 years ago)
Author:
nuald
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • CodeExampleMacro

    v1 v2  
    1 = CodeExample = 
     1= !CodeExample = 
    22 
    33== Description == 
    44 
    5 The Trac plugin for code examples colouring. It support three types of examples - a simple, a correct and an incorrect.  
     5The Trac plugin for code examples colouring. It support three types of examples - a simple, a correct and an incorrect. 
     6 
     7All rights reserved by Codedgers Inc. (http://codedgers.com). 
    68 
    79== Bugs/Feature Requests ==  
     
    2830#!CodeExample 
    2931#!python 
    30 def main(): 
    31     pass 
     32    def apply_timer(self): 
     33        timer = QTimer(self) 
     34        self.connect(timer, SIGNAL('timeout()'), self.update_statusbar) 
     35        timer.start(settings.HINTS_UPDATE_PERIOD) 
    3236}}} 
    3337}}} 
     38 
     39will be rendered as: 
     40 
     41[[Image(example.png)]] 
    3442 
    3543The incorrect example: 
     
    3745{{{ 
    3846#!BadCodeExample 
    39 #!cpp 
    40 void main() { 
    41     return -1; 
    42 } 
     47#!python 
     48    def create_hint_list(self): 
     49        self.hints.extend(self.globals.get_hint_list()) 
    4350}}} 
    4451}}} 
     52 
     53will be rendered as: 
     54 
     55[[Image(incorrect_example.png)]] 
    4556 
    4657The correct example: 
     
    4859{{{ 
    4960#!GoodCodeExample 
    50 #!java 
    51 public void isCorrect() { throw new NotImplementedException(); } 
     61#!python 
     62    def update_statusbar(self): 
     63        self.combo_box.insertItem(0, self.hints.get_current_hint()) 
     64        self.combo_box.setCurrentIndex(0) 
    5265}}} 
    5366}}} 
     67 
     68 
     69will be rendered as: 
     70 
     71[[Image(correct_example.png)]] 
    5472 
    5573== Recent Changes ==