Initialize UI for deleting records.
979866
public function initDelete()
    {
        $this->addAction(['icon' => 'red trash'], function ($jschain, $id) {
            $this->model->load($id)->delete();

            return $jschain->closest('tr')->transition('fade left');
        }, 'Are you sure?');
    }
925362
def _init_records(self, record_types):
        """"""
        for record_type in record_types:
            # This conditional was inserted on 7/11/14. It may prove problematic:
            if str(record_type) not in self._my_map['recordTypeIds']:
                record_initialized = self._init_record(str(record_type))
                if record_initialized:
                    self._my_map['recordTypeIds'].append(str(record_type))
430708
def __initialize_ui(self):
        

        self.__clear_button.setCursor(Qt.ArrowCursor)
        if self.__ui_clear_image and self.__ui_clear_clicked_image:
            pixmap = QPixmap(self.__ui_clear_image)
            clicked_pixmap = QPixmap(self.__ui_clear_clicked_image)
            self.__clear_button.setIcon(QIcon(pixmap))
            self.__clear_button.setMaximumSize(pixmap.size())

            # Signals / Slots.
            self.__clear_button.pressed.connect(functools.partial(self.__clear_button.setIcon, QIcon(clicked_pixmap)))
            self.__clear_button.released.connect(functools.partial(self.__clear_button.setIcon, QIcon(pixmap)))
        else:
            self.__clear_button.setText("Clear")

        self.__set_style_sheet()

        frame_width = self.style().pixelMetric(QStyle.PM_DefaultFrameWidth)
        self.setMinimumSize(
            max(self.minimumSizeHint().width(), self.__clear_button.sizeHint().height() + frame_width * 2),
            max(self.minimumSizeHint().height(), self.__clear_button.sizeHint().height() + frame_width * 2))

        self.__completer.setCaseSensitivity(Qt.CaseInsensitive)
        self.__completer.setCompletionMode(QCompleter.UnfilteredPopupCompletion)
        self.__completer.setMaxVisibleItems(self.__completer_visible_items_count)
372386
public void doRemove() throws DBException
    {
        super.doRemove();
        if (m_arrayCache != null)
            if (m_iLogicalIndex != -1)
                m_arrayCache.set(m_iLogicalIndex, null);    // Show the current record as deleted.
    }
902072
def _initialize(self):
        
        if not os.path.exists(self._logdir):
            raise CollectorError("Log directory %s not exists" % self._logdir)

        self.logger.info("Collector started, taking %s as parent directory"
                         "for all job logs." % self._logdir)

        # clear old records
        JobRecord.objects.filter().delete()
        TrialRecord.objects.filter().delete()
        ResultRecord.objects.filter().delete()
498436
protected void handleDelete() {
    ModifiableDBIDs todel = DBIDUtil.newHashSet();
    ModifiableDBIDs remain = DBIDUtil.newHashSet(dbids);
    DBIDArrayIter it = dbids.iter();
    for(int row : table.getSelectedRows()) {
      it.seek(row);
      todel.add(it);
      remain.remove(it);
    }
    // Unselect first ...
    context.setSelection(new DBIDSelection(remain));
    // Now delete them.
    for(DBIDIter iter = todel.iter(); iter.valid(); iter.advance()) {
      database.delete(iter);
    }
  }
253025
def _init_record(self, record_type_idstr):
        """"""
        record_type_data = self._record_type_data_sets[Id(record_type_idstr).get_identifier()]
        module = importlib.import_module(record_type_data['module_path'])
        record = getattr(module, record_type_data['form_record_class_name'])
        if record is not None:
            self._records[record_type_idstr] = record(self)
            return True
        else:
            return False
56669
def uninit_ui(self):
        
        self.lay.removeWidget(self.tool_pb)
        self.tooltip.deleteLater()
        self.tool_pb.deleteLater()
1154047
def __initialize_ui(self):
        

        self.setAutoScroll(True)
        self.setIndentation(self.__tree_view_indentation)
        self.setRootIsDecorated(False)
        self.setDragDropMode(QAbstractItemView.DragOnly)

        self.header().hide()

        self.setSortingEnabled(True)
        self.sortByColumn(0, Qt.AscendingOrder)

        self.__set_default_ui_state()

        # Signals / Slots.
        self.model().modelReset.connect(self.__set_default_ui_state)
836505
def uninitialize_ui(self):
        

        LOGGER.debug("> Uninitializing '{0}' Component ui.".format(self.__class__.__name__))

        self.__remove_actions()

        # Signals / Slots.
        self.__view.expanded.disconnect(self.__view__expanded)
        self.__view.doubleClicked.disconnect(self.__view__doubleClicked)
        self.__view.selectionModel().selectionChanged.disconnect(self.__view_selectionModel__selectionChanged)
        self.__script_editor.Script_Editor_tabWidget.currentChanged.disconnect(
            self.__script_editor_Script_Editor_tabWidget__currentChanged)
        self.__script_editor.model.project_registered.disconnect(self.__script_editor_model__project_registered)

        self.__view_remove_actions()

        self.__model = None
        self.__delegate = None
        self.__view = None

        self.initialized_ui = False
        return True
97675
private void init() {
        // defaults for internal bookkeeping
        index = 0;              // internal index always starts at 0
        count = 1;              // internal count always starts at 1
        status = null;          // we clear status on release()
        item = null;            // item will be retrieved for each round
        last = false;           // last must be set explicitly
        beginSpecified = false; // not specified until it's specified :-)
        endSpecified = false;   // (as above)
        stepSpecified = false;  // (as above)
        deferredExpression = null;

        // defaults for interface with page author
        begin = 0;              // when not specified, 'begin' is 0 by spec.
        end = -1;               // when not specified, 'end' is not used
        step = 1;               // when not specified, 'step' is 1
        itemId = null;          // when not specified, no variable exported
        statusId = null;        // when not specified, no variable exported
    }
1292423
def delete_record(self, record):
        
        self.children.remove(record.resource)
        record.delete()
1278682
def init(context, reset, force):
    """"""
    store = Store(context.obj['database'], context.obj['root'])
    existing_tables = store.engine.table_names()
    if force or reset:
        if existing_tables and not force:
            message = f"Delete existing tables? [{', '.join(existing_tables)}]"
            click.confirm(click.style(message, fg='yellow'), abort=True)
        store.drop_all()
    elif existing_tables:
        click.echo(click.style("Database already exists, use '--reset'", fg='red'))
        context.abort()

    store.create_all()
    message = f"Success! New tables: {', '.join(store.engine.table_names())}"
    click.echo(click.style(message, fg='green'))
1367111
function(records, new_value) {

		var i = 0,
			count = records.length,
			record;

		for (; i < count; i++) {

			record = records[i];
			// everything else will be done by the Record field
			// also, it will raise an event to remove the record from Enumerable
			record.set(this._target_record_field_name, new_value);

		}

	}
124453
public function init()
    {
        if( empty($this->options['id'])){
            $this->options['id']='batch_delete';
        }
        if( empty($this->options['class'])){
            $this->options['class']='btn btn-success';
        }
    }
316453
public void init(Record record, ScreenLocation itsLocation, BasePanel parentScreen, Converter fieldConverter, int iDisplayFieldDesc, Map<String,Object> properties)
    {
        if (record == null)
            if (parentScreen.getRecord(ClassInfo.CLASS_INFO_FILE) != null)
        {
            iDisplayFieldDesc = iDisplayFieldDesc | ScreenConstants.DETAIL_MODE;
            record = parentScreen.getRecord(ClassInfo.CLASS_INFO_FILE); // Header record
        }
        super.init(record, itsLocation, parentScreen, fieldConverter, iDisplayFieldDesc, properties);
    }
190057
void clear() {
        nextId = 0;
        collectionIds = new HashMap<String, List<Long>>();
        events = new HashMap<Long, String>();
    }