PDA

View Full Version : Source Code for OL


rossbaker
11-27-2006, 05:41 AM
Hi

I'm very new to OL coding. I am just trying to trace some code I've written, and I'd like to follow it all the way into the core code. I can find the source code for components like dragstate, but I can't seem to find the source code for more fundamental objects such as <view>.

How can I look at the core source code?

Thanks!

hqm
11-27-2006, 06:15 AM
You need to get the source code distribution, and the core (LFC) class libraries are defined in WEB-INF/lps/lfc/**

View is defined in

WEB-INF/lps/lfc/views/LaszloView.lzs

Here's a tip, if you don't want to go to all the trouble of configuring your system to build the LPS from source code, you can apply small patches to the core libraries by cutting and pasting the methods into a <script> block in your app.

For example, if you wanted to modify the LzView.setVisible method you could put this in your app

<script>
<![CDATA[
<script>
<![CDATA[
LzView.prototype.setVisible = function setVisible( amVisible ) {
Debug.write("Yikes!");
this.__LZvisibleSet = amVisible;
this.__LZupdateShown();
}
]]>
</script>



]]>
</script>