Clean unused variables

This commit is contained in:
vakrilov
2015-05-18 11:29:57 +03:00
parent c3aea99078
commit 3cfaa221ae
3 changed files with 3 additions and 7 deletions

View File

@ -124,7 +124,6 @@ export class Binding {
updating = false; updating = false;
source: WeakRef<Object>; source: WeakRef<Object>;
target: WeakRef<Bindable>; target: WeakRef<Bindable>;
weakEventId: number;
private sourceOptions: { instance: WeakRef<any>; property: any }; private sourceOptions: { instance: WeakRef<any>; property: any };
private targetOptions: { instance: WeakRef<any>; property: any }; private targetOptions: { instance: WeakRef<any>; property: any };

View File

@ -2,7 +2,7 @@ declare module "ui/core/weak-event-listener" {
import observable = require("data/observable"); import observable = require("data/observable");
/** /**
* Creates and initialize WeakEventListener. * Attaches a WeakEventListener.
* @param source Observable class which emits the event. * @param source Observable class which emits the event.
* @param eventName The event name. * @param eventName The event name.
* @param handler The function which should be called when event occurs. * @param handler The function which should be called when event occurs.
@ -11,7 +11,7 @@ declare module "ui/core/weak-event-listener" {
export function addWeakEventListener(source: observable.Observable, eventName: string, handler: (eventData: observable.EventData) => void, target: any) : void; export function addWeakEventListener(source: observable.Observable, eventName: string, handler: (eventData: observable.EventData) => void, target: any) : void;
/** /**
* Removes and clears all resources from WeakEventListener. * Removes a WeakEventListener.
* @param source Observable class which emits the event. * @param source Observable class which emits the event.
* @param eventName The event name. * @param eventName The event name.
* @param handler The function which should be called when event occurs. * @param handler The function which should be called when event occurs.

View File

@ -69,8 +69,6 @@ export class ListView extends view.View implements definition.ListView {
) )
); );
private _itemsChangedWeakListenerId: number;
get items(): any { get items(): any {
return this._getValue(ListView.itemsProperty); return this._getValue(ListView.itemsProperty);
} }
@ -131,9 +129,8 @@ export class ListView extends view.View implements definition.ListView {
} }
public _onItemsPropertyChanged(data: dependencyObservable.PropertyChangeData) { public _onItemsPropertyChanged(data: dependencyObservable.PropertyChangeData) {
if (data.oldValue instanceof observable.Observable && types.isDefined(this._itemsChangedWeakListenerId)) { if (data.oldValue instanceof observable.Observable)) {
weakEvents.removeWeakEventListener(data.oldValue, observableArray.ObservableArray.changeEvent, this._onItemsChanged, this); weakEvents.removeWeakEventListener(data.oldValue, observableArray.ObservableArray.changeEvent, this._onItemsChanged, this);
delete this._itemsChangedWeakListenerId;
} }
if (data.newValue instanceof observable.Observable) { if (data.newValue instanceof observable.Observable) {