enable inheritance by default

also tweak naming of instantiating to “clone”,
upd4.1
Jens Mönig 2017-07-07 11:15:25 +02:00
rodzic 3e99bc14f2
commit 7f5a0b8272
4 zmienionych plików z 24 dodań i 10 usunięć

20
gui.js
Wyświetl plik

@ -74,7 +74,7 @@ isRetinaSupported, SliderMorph, Animation*/
// Global stuff ////////////////////////////////////////////////////////
modules.gui = '2017-July-05';
modules.gui = '2017-July-07';
// Declarations
@ -3429,7 +3429,7 @@ IDE_Morph.prototype.newProject = function () {
StageMorph.prototype.codeMappings = {};
StageMorph.prototype.codeHeaders = {};
StageMorph.prototype.enableCodeMapping = false;
StageMorph.prototype.enableInheritance = false;
StageMorph.prototype.enableInheritance = true;
StageMorph.prototype.enableSublistIDs = false;
SpriteMorph.prototype.useFlatLineEnds = false;
Process.prototype.enableLiveCoding = false;
@ -3938,7 +3938,7 @@ IDE_Morph.prototype.rawOpenProjectString = function (str) {
StageMorph.prototype.codeMappings = {};
StageMorph.prototype.codeHeaders = {};
StageMorph.prototype.enableCodeMapping = false;
StageMorph.prototype.enableInheritance = false;
StageMorph.prototype.enableInheritance = true;
StageMorph.prototype.enableSublistIDs = false;
Process.prototype.enableLiveCoding = false;
if (Process.prototype.isCatchingErrors) {
@ -3983,7 +3983,7 @@ IDE_Morph.prototype.rawOpenCloudDataString = function (str) {
StageMorph.prototype.codeMappings = {};
StageMorph.prototype.codeHeaders = {};
StageMorph.prototype.enableCodeMapping = false;
StageMorph.prototype.enableInheritance = false;
StageMorph.prototype.enableInheritance = true;
StageMorph.prototype.enableSublistIDs = false;
Process.prototype.enableLiveCoding = false;
if (Process.prototype.isCatchingErrors) {
@ -6840,11 +6840,21 @@ SpriteIconMorph.prototype.userMenu = function () {
menu.addLine();
menu.addItem("duplicate", 'duplicateSprite');
if (StageMorph.prototype.enableInheritance) {
menu.addItem("instantiate", 'instantiateSprite');
menu.addItem("clone", 'instantiateSprite');
}
menu.addItem("delete", 'removeSprite');
menu.addLine();
if (StageMorph.prototype.enableInheritance) {
/* version that hides refactoring capability unless shift-clicked
if (this.world().currentKey === 16) { // shift-clicked
menu.addItem(
"parent...",
'chooseExemplar',
null,
new Color(100, 0, 0)
);
}
*/
menu.addItem("parent...", 'chooseExemplar');
if (this.object.exemplar) {
menu.addItem(

Wyświetl plik

@ -3505,6 +3505,10 @@ Fixes:
------
* Objects, GUI: UI for OOP
170707
------
* Objects, GUI, Store: tweak naming of instantiating to “clone”, enable inheritance by default
Features:
* polymorphic sprite-local custom blocks

Wyświetl plik

@ -82,7 +82,7 @@ SpeechBubbleMorph, RingMorph, isNil, FileReader, TableDialogMorph,
BlockEditorMorph, BlockDialogMorph, PrototypeHatBlockMorph, localize,
TableMorph, TableFrameMorph, normalizeCanvas, BooleanSlotMorph, HandleMorph*/
modules.objects = '2017-July-05';
modules.objects = '2017-July-07';
var SpriteMorph;
var StageMorph;
@ -3075,7 +3075,7 @@ SpriteMorph.prototype.userMenu = function () {
if (!this.isTemporary) {
menu.addItem("duplicate", 'duplicate');
if (StageMorph.prototype.enableInheritance) {
menu.addItem("instantiate", 'instantiate');
menu.addItem("clone", 'instantiate');
menu.addLine();
}
}
@ -5998,7 +5998,7 @@ StageMorph.prototype.hiddenPrimitives = {};
StageMorph.prototype.codeMappings = {};
StageMorph.prototype.codeHeaders = {};
StageMorph.prototype.enableCodeMapping = false;
StageMorph.prototype.enableInheritance = false;
StageMorph.prototype.enableInheritance = true;
StageMorph.prototype.enableSublistIDs = false;
// StageMorph instance creation

Wyświetl plik

@ -61,7 +61,7 @@ normalizeCanvas, contains*/
// Global stuff ////////////////////////////////////////////////////////
modules.store = '2017-June-27';
modules.store = '2017-July-07';
// XML_Serializer ///////////////////////////////////////////////////////
@ -419,7 +419,7 @@ SnapSerializer.prototype.rawLoadProjectModel = function (xmlNode) {
StageMorph.prototype.enableCodeMapping =
model.stage.attributes.codify === 'true';
StageMorph.prototype.enableInheritance =
model.stage.attributes.inheritance === 'true';
model.stage.attributes.inheritance !== 'false';
StageMorph.prototype.enableSublistIDs =
model.stage.attributes.sublistIDs === 'true';