Permalink
Browse files

Adds some debug-mode only developer support to prevent the easy mista…

…ke of using .append(anchor) with a picker pane instead of .popup(anchor).
  • Loading branch information...
1 parent 217109c commit 1cf8ef3b41fe85840dd5a7e58099a61445f85a24 @publickeating publickeating committed Mar 3, 2014
Showing with 10 additions and 0 deletions.
  1. +10 −0 frameworks/desktop/panes/picker.js
@@ -509,6 +509,16 @@ SC.PickerPane = SC.PalettePane.extend(
*/
windowPadding: null,
+ //@if(debug)
+ /** @private SC.Pane */
+ append: function () {
+ // Provide some developer support.
+ SC.warn("Developer Warning: You should not use .append() with SC.PickerPane. Instead use .popup() and pass in an anchor view or element.");
+
+ sc_super();
+ },
+ //@endif
+
/* @private Observe the frame for changes so that we can reposition if necessary. */
borderFrameDidChange: function () {
this.positionPane(true);

0 comments on commit 1cf8ef3

Please sign in to comment.