|
|||||||
| Development Tools and Practices Questions about development tools and practices. An appropriate place to talk about text editors, IDEs, and anything else that makes your development life easier. |
|
|
Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
Hi all
You may have seen the debugger, and wondered about its use. It doesn't take long to figure out that it can be written to as follows: Debug.write( 'Hello, World!' ); But did you know about its hidden talents? Consider the code below: Code:
<canvas debug="true">
<view name="myView"
width="50" height="50"
bgcolor="red"
x="120" y="45" />
<text name="myTextView"
x="90" y="75">Hello, Laszlo!</text>
</canvas>
canvas.myView Into the text input field of the debugger while the app is running in the browser. Hit the enter key, or click "Eval". That doesn't do much, but you can see that it recognized the view "myView". Now try getting an attribute of that view: canvas.myView.x >>> 120 You don't need to use getAttribute() in the debugger; it assumes that's what you want. You can manipulate views too (now you have to use setAttribute()): canvas.myView.setAttribute( 'x', 160 ) You can execute arbitrary code too, to explore how the LZX scripting language works: 2 + 2 >>> 4 Have fun! Antun Karlovac |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| destroy() and warnings of null setters in the debugger | jimkfoster | General OpenLaszlo Programming | 2 | 09-19-2007 11:09 AM |
| Calling functions from Debugger doesn't work on linux | trucker_ | General Help | 13 | 06-20-2007 03:52 AM |
| Application is running with Debugger, but not without it?!? | TheSmile | OpenLaszlo Debugging | 4 | 03-09-2007 01:08 AM |
| Positioning the debugger | antun | Development Tools and Practices | 3 | 08-31-2005 03:41 AM |
| How do you make drop shadows on windows, like the debugger | hqm | Visual Design | 0 | 01-21-2003 03:37 PM |