Overlaying is when you modify existing code by changing the system behaviour.

重疊是通過改變系統行為來修改現有的代碼。

Right click on the object and click Customize. This will add it to your project.

2016-01-19_0729

You will see a little [c] to indicate it is a customised object.

2016-01-19_0735

I added a bit of code to the initValue method. Notice how it has changed colour to indicate it has been customised.

2016-01-19_0738

Extensions allow you to leave the system behaviour but adding your piece to it.

擴展允許你離開系統行為,但添加你的作品。

On the CustTable right click and Opern designer.

2016-01-19_1608

Right click and copy the vent handler method (this will copy into clipboard).

2016-01-19_1607

Now create a class. Paste whats in clipboard. It will paste the highlighted section below.

Add your code. The vent will now be triggered after the initValue method.

2016-01-19_1610

創作者介紹
創作者 lionlionchopper 的頭像
lionlionchopper

呆子獅的夢想世界

lionlionchopper 發表在 痞客邦 留言(0) 人氣()