Opened 15 years ago

Closed 15 years ago

#2763 closed defect (fixed)

PageContainer.selectChild's second argument never used

Reported by: guest Owned by: bill
Priority: low Milestone:
Component: Widgets Version: 0.4.2
Keywords: PageContainer selectChild Cc:
Blocked By: Blocking:


PageContainer's selectChild(/*Widget*/ page, /*Widget*/ callingWidget) method never uses the second argument to the call as far as I can tell. It just assigns callingWidget to this.correspondingPageButton, and this.correspondingPageButton is seemingly never used again in the code.

	selectChild: function(/*Widget*/ page, /*Widget*/ callingWidget){
		// summary
		//	Show the given widget (which must be one of my children)
		page = dojo.widget.byId(page);
		this.correspondingPageButton = callingWidget;

		// Deselect old page and select new one
		this.selectedChildWidget = page;
		this.selectedChild = page.widgetId;
		page.isFirstChild = (page == this.children[0]);
		page.isLastChild = (page == this.children[this.children.length-1]);
		dojo.event.topic.publish(this.widgetId+"-selectChild", page);

Just wondering why there's a second argument if it does nothing. For future use? Intended for inclusion in the published events?

Change History (2)

comment:1 in reply to:  description Changed 15 years ago by guest

Drat, looks like I missed tacking [email protected]… as the email for that ticket.

comment:2 Changed 15 years ago by bill

Resolution: fixed
Status: newclosed

(In [8814]) Remove unused parameter from selectChild(). Fixes #2763.

Note: See TracTickets for help on using tickets.