more examples
This commit is contained in:
		
							parent
							
								
									9d871adb00
								
							
						
					
					
						commit
						a998f81211
					
				@ -27,6 +27,19 @@ it will be instantly shared with all the other collaborators.
 | 
				
			|||||||
```
 | 
					```
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					You may want to get the created DUI client (you must not create two DUI/IWC clients!!),
 | 
				
			||||||
 | 
					or set an IwcHandler.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					```js
 | 
				
			||||||
 | 
					      var duiclient = yatta.getConnector().duiclient;
 | 
				
			||||||
 | 
					      function iwcHandler (intent) {
 | 
				
			||||||
 | 
					        console.log("Received intent: "+JSON.stringify(intent));
 | 
				
			||||||
 | 
					      }
 | 
				
			||||||
 | 
					      yatta.getConnector().setIwcHandler(iwcHandler);
 | 
				
			||||||
 | 
					```
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
Add a integer-property like this
 | 
					Add a integer-property like this
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@ -55,8 +68,6 @@ A string property can be either mutable or immutable.
 | 
				
			|||||||
      yatta.val('mutable_string').deleteText(0,1); // position, deletion length
 | 
					      yatta.val('mutable_string').deleteText(0,1); // position, deletion length
 | 
				
			||||||
      console.log(yatta.val('mutable_string').val() === "eXXXxt"); // true
 | 
					      console.log(yatta.val('mutable_string').val() === "eXXXxt"); // true
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    })
 | 
					    })
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
window.onload = init
 | 
					window.onload = init
 | 
				
			||||||
 | 
				
			|||||||
@ -15,7 +15,8 @@ A working widget implementation is [IwcJson.xml](./IwcJson.xml) and the js-file
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
The PeerJs Framework requires an API key, or you need to set up your own PeerJs server.
 | 
					The PeerJs Framework requires an API key, or you need to set up your own PeerJs server.
 | 
				
			||||||
Get an API key from the Website.
 | 
					Get an API key from the Website.
 | 
				
			||||||
The first parameter of `createPeerJsConnector` is the options object in PeerJs.
 | 
					The first parameter of `createPeerJsConnector` is forwarded as the options object in PeerJs.
 | 
				
			||||||
 | 
					Therefore, you may also specify the server/port here.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
```js
 | 
					```js
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user