Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • docs/extend-widgets/rst/api.rst

    r11049 r11424  
    1818Following is an example that defines two output channels:: 
    1919 
    20     self.outputs = [("Sampled Data", orange.ExampleTable), ("Learner", orange.Learner)] 
     20    self.outputs = [("Sampled Data", orange.ExampleTable), 
     21                    ("Learner", orange.Learner)] 
    2122 
    2223:obj:`self.outputs` should thus be a list of tuples, within 
     
    6263 
    6364    def receiveData(self, data): 
    64     # handle data in some way 
     65        # handle data in some way 
     66 
    6567 
    6668Any time our widget would receive a token, :obj:`receiveData` 
     
    7678deleted, Orange Canvas would automatically send :obj:`None` to 
    7779the receiving widget. Make sure your widget handles :obj:`None` 
    78 tokens appropriately!` 
     80tokens appropriately! 
    7981 
    8082There are cases when widget would like to know about the origin of 
     
    9395 
    9496   def learner(self, learnertoken, tokenid): 
    95    # handle learnertoken and tokeid in some way 
     97       # handle learnertoken and tokeid in some way 
    9698 
    9799Widgets such as :obj:`OWTestLearners` and alike use such 
     
    102104 
    103105    self.inputs = [("Data", orange.ExampleTable, self.maindata), 
    104                ("Additional Data", orange.ExampleTable, self.otherdata)] 
     106                   ("Additional Data", orange.ExampleTable, self.otherdata)] 
    105107 
    106108and we connect this widget in Orange Canvas to a sending widget 
    107109that has a single orange.ExampleTable output channel, Canvas would 
    108 bring up Set Channels dialog. There, a sending widget's channel could 
     110bring up *Set Channels* dialog. There, a sending widget's channel could 
    109111be connected to both receiving channels. As we would often prefer to 
    110112connect to a single (default) channel instead (still allowing user of 
     
    114116 
    115117    self.inputs = [("Data", orange.ExampleTable, self.maindata, Default), 
    116                ("Additional Data", orange.ExampleTable, self.otherdata)] 
     118                   ("Additional Data", orange.ExampleTable, self.otherdata)] 
Note: See TracChangeset for help on using the changeset viewer.