Revert to "new" for object creation

and prepare for new release
pull/3/merge
jmoenig 2015-06-25 15:11:51 +02:00
rodzic 58cae438bb
commit 4c21c9f187
10 zmienionych plików z 111 dodań i 107 usunięć

Wyświetl plik

@ -155,8 +155,7 @@ DialogBoxMorph, BlockInputFragmentMorph, PrototypeHatBlockMorph, Costume*/
// Global stuff //////////////////////////////////////////////////////// // Global stuff ////////////////////////////////////////////////////////
modules.blocks = '2015-June-08'; modules.blocks = '2015-June-25';
var SyntaxElementMorph; var SyntaxElementMorph;
var BlockMorph; var BlockMorph;
@ -240,7 +239,7 @@ WorldMorph.prototype.customMorphs = function () {
// SyntaxElementMorph inherits from Morph: // SyntaxElementMorph inherits from Morph:
SyntaxElementMorph.prototype = Object.create(Morph.prototype); SyntaxElementMorph.prototype = new Morph();
SyntaxElementMorph.prototype.constructor = SyntaxElementMorph; SyntaxElementMorph.prototype.constructor = SyntaxElementMorph;
SyntaxElementMorph.uber = Morph.prototype; SyntaxElementMorph.uber = Morph.prototype;
@ -360,6 +359,10 @@ SyntaxElementMorph.prototype.init = function () {
this.cachedInputs = null; this.cachedInputs = null;
}; };
// SyntaxElementMorph stepping:
SyntaxElementMorph.prototype.step = null;
// SyntaxElementMorph accessing: // SyntaxElementMorph accessing:
SyntaxElementMorph.prototype.parts = function () { SyntaxElementMorph.prototype.parts = function () {
@ -621,10 +624,6 @@ SyntaxElementMorph.prototype.topBlock = function () {
return this; return this;
}; };
// SyntaxElementMorph stepping:
SyntaxElementMorph.prototype.step = null;
// SyntaxElementMorph drag & drop: // SyntaxElementMorph drag & drop:
SyntaxElementMorph.prototype.reactToGrabOf = function (grabbedMorph) { SyntaxElementMorph.prototype.reactToGrabOf = function (grabbedMorph) {
@ -1429,11 +1428,11 @@ SyntaxElementMorph.prototype.labelPart = function (spec) {
false, // italic false, // italic
false, // isNumeric false, // isNumeric
MorphicPreferences.isFlat ? MorphicPreferences.isFlat ?
new Point() : this.embossing, // shadowOffset new Point() : this.embossing, // shadowOffset
this.color.darker(this.labelContrast), // shadowColor this.color.darker(this.labelContrast), // shadowColor
new Color(255, 255, 255), // color new Color(255, 255, 255), // color
this.labelFontName // fontName this.labelFontName // fontName
); );
} }
return part; return part;
}; };
@ -1944,7 +1943,7 @@ SyntaxElementMorph.prototype.endLayout = function () {
// BlockMorph inherits from SyntaxElementMorph: // BlockMorph inherits from SyntaxElementMorph:
BlockMorph.prototype = Object.create(SyntaxElementMorph.prototype); BlockMorph.prototype = new SyntaxElementMorph();
BlockMorph.prototype.constructor = BlockMorph; BlockMorph.prototype.constructor = BlockMorph;
BlockMorph.uber = SyntaxElementMorph.prototype; BlockMorph.uber = SyntaxElementMorph.prototype;
@ -2065,7 +2064,8 @@ BlockMorph.prototype.setSpec = function (spec) {
} }
part = myself.labelPart(word); part = myself.labelPart(word);
myself.add(part); myself.add(part);
if (!(part instanceof CommandSlotMorph || part instanceof StringMorph)) { if (!(part instanceof CommandSlotMorph ||
part instanceof StringMorph)) {
part.drawNew(); part.drawNew();
} }
if (part instanceof RingMorph) { if (part instanceof RingMorph) {
@ -3266,7 +3266,7 @@ BlockMorph.prototype.snap = function () {
// CommandBlockMorph inherits from BlockMorph: // CommandBlockMorph inherits from BlockMorph:
CommandBlockMorph.prototype = Object.create(BlockMorph.prototype); CommandBlockMorph.prototype = new BlockMorph();
CommandBlockMorph.prototype.constructor = CommandBlockMorph; CommandBlockMorph.prototype.constructor = CommandBlockMorph;
CommandBlockMorph.uber = BlockMorph.prototype; CommandBlockMorph.uber = BlockMorph.prototype;
@ -3946,7 +3946,7 @@ CommandBlockMorph.prototype.drawBottomRightEdge = function (context) {
// HatBlockMorph inherits from CommandBlockMorph: // HatBlockMorph inherits from CommandBlockMorph:
HatBlockMorph.prototype = Object.create(CommandBlockMorph.prototype); HatBlockMorph.prototype = new CommandBlockMorph();
HatBlockMorph.prototype.constructor = HatBlockMorph; HatBlockMorph.prototype.constructor = HatBlockMorph;
HatBlockMorph.uber = CommandBlockMorph.prototype; HatBlockMorph.uber = CommandBlockMorph.prototype;
@ -4124,7 +4124,7 @@ HatBlockMorph.prototype.drawTopLeftEdge = function (context) {
// ReporterBlockMorph inherits from BlockMorph: // ReporterBlockMorph inherits from BlockMorph:
ReporterBlockMorph.prototype = Object.create(BlockMorph.prototype); ReporterBlockMorph.prototype = new BlockMorph();
ReporterBlockMorph.prototype.constructor = ReporterBlockMorph; ReporterBlockMorph.prototype.constructor = ReporterBlockMorph;
ReporterBlockMorph.uber = BlockMorph.prototype; ReporterBlockMorph.uber = BlockMorph.prototype;
@ -4648,7 +4648,7 @@ ReporterBlockMorph.prototype.drawDiamond = function (context) {
// RingMorph inherits from ReporterBlockMorph: // RingMorph inherits from ReporterBlockMorph:
RingMorph.prototype = Object.create(ReporterBlockMorph.prototype); RingMorph.prototype = new ReporterBlockMorph();
RingMorph.prototype.constructor = RingMorph; RingMorph.prototype.constructor = RingMorph;
RingMorph.uber = ReporterBlockMorph.prototype; RingMorph.uber = ReporterBlockMorph.prototype;
@ -4785,7 +4785,7 @@ RingMorph.prototype.fixBlockColor = function (nearest, isForced) {
// ScriptsMorph inherits from FrameMorph: // ScriptsMorph inherits from FrameMorph:
ScriptsMorph.prototype = Object.create(FrameMorph.prototype); ScriptsMorph.prototype = new FrameMorph();
ScriptsMorph.prototype.constructor = ScriptsMorph; ScriptsMorph.prototype.constructor = ScriptsMorph;
ScriptsMorph.uber = FrameMorph.prototype; ScriptsMorph.uber = FrameMorph.prototype;
@ -5325,7 +5325,7 @@ ScriptsMorph.prototype.reactToDropOf = function (droppedMorph, hand) {
// ArgMorph inherits from SyntaxElementMorph: // ArgMorph inherits from SyntaxElementMorph:
ArgMorph.prototype = Object.create(SyntaxElementMorph.prototype); ArgMorph.prototype = new SyntaxElementMorph();
ArgMorph.prototype.constructor = ArgMorph; ArgMorph.prototype.constructor = ArgMorph;
ArgMorph.uber = SyntaxElementMorph.prototype; ArgMorph.uber = SyntaxElementMorph.prototype;
@ -5438,7 +5438,7 @@ ArgMorph.prototype.isEmptySlot = function () {
// CommandSlotMorph inherits from ArgMorph: // CommandSlotMorph inherits from ArgMorph:
CommandSlotMorph.prototype = Object.create(ArgMorph.prototype); CommandSlotMorph.prototype = new ArgMorph();
CommandSlotMorph.prototype.constructor = CommandSlotMorph; CommandSlotMorph.prototype.constructor = CommandSlotMorph;
CommandSlotMorph.uber = ArgMorph.prototype; CommandSlotMorph.uber = ArgMorph.prototype;
@ -5888,7 +5888,7 @@ CommandSlotMorph.prototype.drawEdges = function (context) {
// RingCommandSlotMorph inherits from CommandSlotMorph: // RingCommandSlotMorph inherits from CommandSlotMorph:
RingCommandSlotMorph.prototype = Object.create(CommandSlotMorph.prototype); RingCommandSlotMorph.prototype = new CommandSlotMorph();
RingCommandSlotMorph.prototype.constructor = RingCommandSlotMorph; RingCommandSlotMorph.prototype.constructor = RingCommandSlotMorph;
RingCommandSlotMorph.uber = CommandSlotMorph.prototype; RingCommandSlotMorph.uber = CommandSlotMorph.prototype;
@ -6044,7 +6044,7 @@ RingCommandSlotMorph.prototype.drawFlat = function (context) {
// CSlotMorph inherits from CommandSlotMorph: // CSlotMorph inherits from CommandSlotMorph:
CSlotMorph.prototype = Object.create(CommandSlotMorph.prototype); CSlotMorph.prototype = new CommandSlotMorph();
CSlotMorph.prototype.constructor = CSlotMorph; CSlotMorph.prototype.constructor = CSlotMorph;
CSlotMorph.uber = CommandSlotMorph.prototype; CSlotMorph.uber = CommandSlotMorph.prototype;
@ -6467,7 +6467,7 @@ CSlotMorph.prototype.drawBottomEdge = function (context) {
// InputSlotMorph inherits from ArgMorph: // InputSlotMorph inherits from ArgMorph:
InputSlotMorph.prototype = Object.create(ArgMorph.prototype); InputSlotMorph.prototype = new ArgMorph();
InputSlotMorph.prototype.constructor = InputSlotMorph; InputSlotMorph.prototype.constructor = InputSlotMorph;
InputSlotMorph.uber = ArgMorph.prototype; InputSlotMorph.uber = ArgMorph.prototype;
@ -7403,7 +7403,7 @@ InputSlotMorph.prototype.drawRoundBorder = function (context) {
// TemplateSlotMorph inherits from ArgMorph: // TemplateSlotMorph inherits from ArgMorph:
TemplateSlotMorph.prototype = Object.create(ArgMorph.prototype); TemplateSlotMorph.prototype = new ArgMorph();
TemplateSlotMorph.prototype.constructor = TemplateSlotMorph; TemplateSlotMorph.prototype.constructor = TemplateSlotMorph;
TemplateSlotMorph.uber = ArgMorph.prototype; TemplateSlotMorph.uber = ArgMorph.prototype;
@ -7507,7 +7507,7 @@ TemplateSlotMorph.prototype.drawRounded = ReporterBlockMorph
// BooleanSlotMorph inherits from ArgMorph: // BooleanSlotMorph inherits from ArgMorph:
BooleanSlotMorph.prototype = Object.create(ArgMorph.prototype); BooleanSlotMorph.prototype = new ArgMorph();
BooleanSlotMorph.prototype.constructor = BooleanSlotMorph; BooleanSlotMorph.prototype.constructor = BooleanSlotMorph;
BooleanSlotMorph.uber = ArgMorph.prototype; BooleanSlotMorph.uber = ArgMorph.prototype;
@ -7664,7 +7664,7 @@ BooleanSlotMorph.prototype.isEmptySlot = function () {
// ArrowMorph inherits from Morph: // ArrowMorph inherits from Morph:
ArrowMorph.prototype = Object.create(Morph.prototype); ArrowMorph.prototype = new Morph();
ArrowMorph.prototype.constructor = ArrowMorph; ArrowMorph.prototype.constructor = ArrowMorph;
ArrowMorph.uber = Morph.prototype; ArrowMorph.uber = Morph.prototype;
@ -7734,7 +7734,7 @@ ArrowMorph.prototype.drawNew = function () {
// TextSlotMorph inherits from InputSlotMorph: // TextSlotMorph inherits from InputSlotMorph:
TextSlotMorph.prototype = Object.create(InputSlotMorph.prototype); TextSlotMorph.prototype = new InputSlotMorph();
TextSlotMorph.prototype.constructor = TextSlotMorph; TextSlotMorph.prototype.constructor = TextSlotMorph;
TextSlotMorph.uber = InputSlotMorph.prototype; TextSlotMorph.uber = InputSlotMorph.prototype;
@ -7817,7 +7817,7 @@ TextSlotMorph.prototype.layoutChanged = function () {
// SymbolMorph inherits from Morph: // SymbolMorph inherits from Morph:
SymbolMorph.prototype = Object.create(Morph.prototype); SymbolMorph.prototype = new Morph();
SymbolMorph.prototype.constructor = SymbolMorph; SymbolMorph.prototype.constructor = SymbolMorph;
SymbolMorph.uber = Morph.prototype; SymbolMorph.uber = Morph.prototype;
@ -9110,7 +9110,7 @@ SymbolMorph.prototype.drawSymbolRobot = function (canvas, color) {
// ColorSlotMorph inherits from ArgMorph: // ColorSlotMorph inherits from ArgMorph:
ColorSlotMorph.prototype = Object.create(ArgMorph.prototype); ColorSlotMorph.prototype = new ArgMorph();
ColorSlotMorph.prototype.constructor = ColorSlotMorph; ColorSlotMorph.prototype.constructor = ColorSlotMorph;
ColorSlotMorph.uber = ArgMorph.prototype; ColorSlotMorph.uber = ArgMorph.prototype;
@ -9218,7 +9218,7 @@ ColorSlotMorph.prototype.drawRectBorder =
// BlockHighlightMorph inherits from Morph: // BlockHighlightMorph inherits from Morph:
BlockHighlightMorph.prototype = Object.create(Morph.prototype); BlockHighlightMorph.prototype = new Morph();
BlockHighlightMorph.prototype.constructor = BlockHighlightMorph; BlockHighlightMorph.prototype.constructor = BlockHighlightMorph;
BlockHighlightMorph.uber = Morph.prototype; BlockHighlightMorph.uber = Morph.prototype;
@ -9243,7 +9243,7 @@ function BlockHighlightMorph() {
// MultiArgMorph inherits from ArgMorph: // MultiArgMorph inherits from ArgMorph:
MultiArgMorph.prototype = Object.create(ArgMorph.prototype); MultiArgMorph.prototype = new ArgMorph();
MultiArgMorph.prototype.constructor = MultiArgMorph; MultiArgMorph.prototype.constructor = MultiArgMorph;
MultiArgMorph.uber = ArgMorph.prototype; MultiArgMorph.uber = ArgMorph.prototype;
@ -9673,7 +9673,7 @@ MultiArgMorph.prototype.isEmptySlot = function () {
// ArgLabelMorph inherits from ArgMorph: // ArgLabelMorph inherits from ArgMorph:
ArgLabelMorph.prototype = Object.create(ArgMorph.prototype); ArgLabelMorph.prototype = new ArgMorph();
ArgLabelMorph.prototype.constructor = ArgLabelMorph; ArgLabelMorph.prototype.constructor = ArgLabelMorph;
ArgLabelMorph.uber = ArgMorph.prototype; ArgLabelMorph.uber = ArgMorph.prototype;
@ -9803,7 +9803,7 @@ ArgLabelMorph.prototype.isEmptySlot = function () {
// FunctionSlotMorph inherits from ArgMorph: // FunctionSlotMorph inherits from ArgMorph:
FunctionSlotMorph.prototype = Object.create(ArgMorph.prototype); FunctionSlotMorph.prototype = new ArgMorph();
FunctionSlotMorph.prototype.constructor = FunctionSlotMorph; FunctionSlotMorph.prototype.constructor = FunctionSlotMorph;
FunctionSlotMorph.uber = ArgMorph.prototype; FunctionSlotMorph.uber = ArgMorph.prototype;
@ -10184,7 +10184,7 @@ FunctionSlotMorph.prototype.drawDiamond = function (context) {
// ReporterSlotMorph inherits from FunctionSlotMorph: // ReporterSlotMorph inherits from FunctionSlotMorph:
ReporterSlotMorph.prototype = Object.create(FunctionSlotMorph.prototype); ReporterSlotMorph.prototype = new FunctionSlotMorph();
ReporterSlotMorph.prototype.constructor = ReporterSlotMorph; ReporterSlotMorph.prototype.constructor = ReporterSlotMorph;
ReporterSlotMorph.uber = FunctionSlotMorph.prototype; ReporterSlotMorph.uber = FunctionSlotMorph.prototype;
@ -10267,7 +10267,7 @@ ReporterSlotMorph.prototype.fixLayout = function () {
// ReporterSlotMorph inherits from FunctionSlotMorph: // ReporterSlotMorph inherits from FunctionSlotMorph:
RingReporterSlotMorph.prototype = Object.create(ReporterSlotMorph.prototype); RingReporterSlotMorph.prototype = new ReporterSlotMorph();
RingReporterSlotMorph.prototype.constructor = RingReporterSlotMorph; RingReporterSlotMorph.prototype.constructor = RingReporterSlotMorph;
RingReporterSlotMorph.uber = ReporterSlotMorph.prototype; RingReporterSlotMorph.uber = ReporterSlotMorph.prototype;
@ -10655,7 +10655,7 @@ RingReporterSlotMorph.prototype.drawDiamond = function (context) {
// CommentMorph inherits from BoxMorph: // CommentMorph inherits from BoxMorph:
CommentMorph.prototype = Object.create(BoxMorph.prototype); CommentMorph.prototype = new BoxMorph();
CommentMorph.prototype.constructor = CommentMorph; CommentMorph.prototype.constructor = CommentMorph;
CommentMorph.uber = BoxMorph.prototype; CommentMorph.uber = BoxMorph.prototype;

28
byob.js
Wyświetl plik

@ -106,7 +106,7 @@ SymbolMorph, isNil*/
// Global stuff //////////////////////////////////////////////////////// // Global stuff ////////////////////////////////////////////////////////
modules.byob = '2015-May-23'; modules.byob = '2015-June-25';
// Declarations // Declarations
@ -379,7 +379,7 @@ CustomBlockDefinition.prototype.scriptsPicture = function () {
// CustomCommandBlockMorph inherits from CommandBlockMorph: // CustomCommandBlockMorph inherits from CommandBlockMorph:
CustomCommandBlockMorph.prototype = Object.create(CommandBlockMorph.prototype); CustomCommandBlockMorph.prototype = new CommandBlockMorph();
CustomCommandBlockMorph.prototype.constructor = CustomCommandBlockMorph; CustomCommandBlockMorph.prototype.constructor = CustomCommandBlockMorph;
CustomCommandBlockMorph.uber = CommandBlockMorph.prototype; CustomCommandBlockMorph.uber = CommandBlockMorph.prototype;
@ -896,7 +896,7 @@ CustomCommandBlockMorph.prototype.alternatives = function () {
// CustomReporterBlockMorph inherits from ReporterBlockMorph: // CustomReporterBlockMorph inherits from ReporterBlockMorph:
CustomReporterBlockMorph.prototype = Object.create(ReporterBlockMorph.prototype); CustomReporterBlockMorph.prototype = new ReporterBlockMorph();
CustomReporterBlockMorph.prototype.constructor = CustomReporterBlockMorph; CustomReporterBlockMorph.prototype.constructor = CustomReporterBlockMorph;
CustomReporterBlockMorph.uber = ReporterBlockMorph.prototype; CustomReporterBlockMorph.uber = ReporterBlockMorph.prototype;
@ -1028,7 +1028,7 @@ CustomReporterBlockMorph.prototype.alternatives
// JaggedBlockMorph inherits from ReporterBlockMorph: // JaggedBlockMorph inherits from ReporterBlockMorph:
JaggedBlockMorph.prototype = Object.create(ReporterBlockMorph.prototype); JaggedBlockMorph.prototype = new ReporterBlockMorph();
JaggedBlockMorph.prototype.constructor = JaggedBlockMorph; JaggedBlockMorph.prototype.constructor = JaggedBlockMorph;
JaggedBlockMorph.uber = ReporterBlockMorph.prototype; JaggedBlockMorph.uber = ReporterBlockMorph.prototype;
@ -1177,7 +1177,7 @@ JaggedBlockMorph.prototype.drawEdges = function (context) {
// BlockDialogMorph inherits from DialogBoxMorph: // BlockDialogMorph inherits from DialogBoxMorph:
BlockDialogMorph.prototype = Object.create(DialogBoxMorph.prototype); BlockDialogMorph.prototype = new DialogBoxMorph();
BlockDialogMorph.prototype.constructor = BlockDialogMorph; BlockDialogMorph.prototype.constructor = BlockDialogMorph;
BlockDialogMorph.uber = DialogBoxMorph.prototype; BlockDialogMorph.uber = DialogBoxMorph.prototype;
@ -1624,7 +1624,7 @@ BlockDialogMorph.prototype.fixLayout = function () {
// BlockEditorMorph inherits from DialogBoxMorph: // BlockEditorMorph inherits from DialogBoxMorph:
BlockEditorMorph.prototype = Object.create(DialogBoxMorph.prototype); BlockEditorMorph.prototype = new DialogBoxMorph();
BlockEditorMorph.prototype.constructor = BlockEditorMorph; BlockEditorMorph.prototype.constructor = BlockEditorMorph;
BlockEditorMorph.uber = DialogBoxMorph.prototype; BlockEditorMorph.uber = DialogBoxMorph.prototype;
@ -1936,7 +1936,7 @@ BlockEditorMorph.prototype.fixLayout = function () {
// PrototypeHatBlockMorph inherits from HatBlockMorph: // PrototypeHatBlockMorph inherits from HatBlockMorph:
PrototypeHatBlockMorph.prototype = Object.create(HatBlockMorph.prototype); PrototypeHatBlockMorph.prototype = new HatBlockMorph();
PrototypeHatBlockMorph.prototype.constructor = PrototypeHatBlockMorph; PrototypeHatBlockMorph.prototype.constructor = PrototypeHatBlockMorph;
PrototypeHatBlockMorph.uber = HatBlockMorph.prototype; PrototypeHatBlockMorph.uber = HatBlockMorph.prototype;
@ -2146,7 +2146,7 @@ BlockLabelFragment.prototype.setSingleInputType = function (type) {
// BlockLabelFragmentMorph inherits from StringMorph: // BlockLabelFragmentMorph inherits from StringMorph:
BlockLabelFragmentMorph.prototype = Object.create(StringMorph.prototype); BlockLabelFragmentMorph.prototype = new StringMorph();
BlockLabelFragmentMorph.prototype.constructor = BlockLabelFragmentMorph; BlockLabelFragmentMorph.prototype.constructor = BlockLabelFragmentMorph;
BlockLabelFragmentMorph.uber = StringMorph.prototype; BlockLabelFragmentMorph.uber = StringMorph.prototype;
@ -2268,7 +2268,7 @@ BlockLabelFragmentMorph.prototype.userMenu = function () {
// BlockLabelPlaceHolderMorph inherits from StringMorph: // BlockLabelPlaceHolderMorph inherits from StringMorph:
BlockLabelPlaceHolderMorph.prototype = Object.create(StringMorph.prototype); BlockLabelPlaceHolderMorph.prototype = new StringMorph();
BlockLabelPlaceHolderMorph.prototype.constructor = BlockLabelPlaceHolderMorph; BlockLabelPlaceHolderMorph.prototype.constructor = BlockLabelPlaceHolderMorph;
BlockLabelPlaceHolderMorph.uber = StringMorph.prototype; BlockLabelPlaceHolderMorph.uber = StringMorph.prototype;
@ -2396,7 +2396,7 @@ BlockLabelPlaceHolderMorph.prototype.updateBlockLabel
// BlockInputFragmentMorph inherits from TemplateSlotMorph: // BlockInputFragmentMorph inherits from TemplateSlotMorph:
BlockInputFragmentMorph.prototype = Object.create(TemplateSlotMorph.prototype); BlockInputFragmentMorph.prototype = new TemplateSlotMorph();
BlockInputFragmentMorph.prototype.constructor = BlockInputFragmentMorph; BlockInputFragmentMorph.prototype.constructor = BlockInputFragmentMorph;
BlockInputFragmentMorph.uber = TemplateSlotMorph.prototype; BlockInputFragmentMorph.uber = TemplateSlotMorph.prototype;
@ -2426,7 +2426,7 @@ BlockInputFragmentMorph.prototype.updateBlockLabel
// InputSlotDialogMorph inherits from DialogBoxMorph: // InputSlotDialogMorph inherits from DialogBoxMorph:
InputSlotDialogMorph.prototype = Object.create(DialogBoxMorph.prototype); InputSlotDialogMorph.prototype = new DialogBoxMorph();
InputSlotDialogMorph.prototype.constructor = InputSlotDialogMorph; InputSlotDialogMorph.prototype.constructor = InputSlotDialogMorph;
InputSlotDialogMorph.uber = DialogBoxMorph.prototype; InputSlotDialogMorph.uber = DialogBoxMorph.prototype;
@ -3026,7 +3026,7 @@ InputSlotDialogMorph.prototype.show = function () {
// VariableDialogMorph inherits from DialogBoxMorph: // VariableDialogMorph inherits from DialogBoxMorph:
VariableDialogMorph.prototype = Object.create(DialogBoxMorph.prototype); VariableDialogMorph.prototype = new DialogBoxMorph();
VariableDialogMorph.prototype.constructor = VariableDialogMorph; VariableDialogMorph.prototype.constructor = VariableDialogMorph;
VariableDialogMorph.uber = DialogBoxMorph.prototype; VariableDialogMorph.uber = DialogBoxMorph.prototype;
@ -3145,7 +3145,7 @@ VariableDialogMorph.prototype.fixLayout = function () {
// BlockExportDialogMorph inherits from DialogBoxMorph: // BlockExportDialogMorph inherits from DialogBoxMorph:
BlockExportDialogMorph.prototype = Object.create(DialogBoxMorph.prototype); BlockExportDialogMorph.prototype = new DialogBoxMorph();
BlockExportDialogMorph.prototype.constructor = BlockExportDialogMorph; BlockExportDialogMorph.prototype.constructor = BlockExportDialogMorph;
BlockExportDialogMorph.uber = DialogBoxMorph.prototype; BlockExportDialogMorph.uber = DialogBoxMorph.prototype;
@ -3327,7 +3327,7 @@ BlockExportDialogMorph.prototype.fixLayout
// BlockImportDialogMorph inherits from DialogBoxMorph // BlockImportDialogMorph inherits from DialogBoxMorph
// and pseudo-inherits from BlockExportDialogMorph: // and pseudo-inherits from BlockExportDialogMorph:
BlockImportDialogMorph.prototype = Object.create(DialogBoxMorph.prototype); BlockImportDialogMorph.prototype = new DialogBoxMorph();
BlockImportDialogMorph.prototype.constructor = BlockImportDialogMorph; BlockImportDialogMorph.prototype.constructor = BlockImportDialogMorph;
BlockImportDialogMorph.uber = DialogBoxMorph.prototype; BlockImportDialogMorph.uber = DialogBoxMorph.prototype;

22
gui.js
Wyświetl plik

@ -69,7 +69,7 @@ SpeechBubbleMorph*/
// Global stuff //////////////////////////////////////////////////////// // Global stuff ////////////////////////////////////////////////////////
modules.gui = '2015-May-18'; modules.gui = '2015-June-25';
// Declarations // Declarations
@ -88,7 +88,7 @@ var JukeboxMorph;
// IDE_Morph inherits from Morph: // IDE_Morph inherits from Morph:
IDE_Morph.prototype = Object.create(Morph.prototype); IDE_Morph.prototype = new Morph();
IDE_Morph.prototype.constructor = IDE_Morph; IDE_Morph.prototype.constructor = IDE_Morph;
IDE_Morph.uber = Morph.prototype; IDE_Morph.uber = Morph.prototype;
@ -2614,7 +2614,7 @@ IDE_Morph.prototype.aboutSnap = function () {
module, btn1, btn2, btn3, btn4, licenseBtn, translatorsBtn, module, btn1, btn2, btn3, btn4, licenseBtn, translatorsBtn,
world = this.world(); world = this.world();
aboutTxt = 'Snap! 4.0\nBuild Your Own Blocks\n\n' aboutTxt = 'Snap! 4.0.1\nBuild Your Own Blocks\n\n'
+ 'Copyright \u24B8 2015 Jens M\u00F6nig and ' + 'Copyright \u24B8 2015 Jens M\u00F6nig and '
+ 'Brian Harvey\n' + 'Brian Harvey\n'
+ 'jens@moenig.org, bh@cs.berkeley.edu\n\n' + 'jens@moenig.org, bh@cs.berkeley.edu\n\n'
@ -2648,7 +2648,7 @@ IDE_Morph.prototype.aboutSnap = function () {
creditsTxt = localize('Contributors') creditsTxt = localize('Contributors')
+ '\n\nNathan Dinsmore: Saving/Loading, Snap-Logo Design, ' + '\n\nNathan Dinsmore: Saving/Loading, Snap-Logo Design, '
+ 'countless bugfixes' + 'countless bugfixes and optimizations'
+ '\nKartik Chandra: Paint Editor' + '\nKartik Chandra: Paint Editor'
+ '\nMichael Ball: Time/Date UI, many bugfixes' + '\nMichael Ball: Time/Date UI, many bugfixes'
+ '\n"Ava" Yuan Yuan: Graphic Effects' + '\n"Ava" Yuan Yuan: Graphic Effects'
@ -4274,7 +4274,7 @@ IDE_Morph.prototype.prompt = function (message, callback, choices, key) {
// ProjectDialogMorph inherits from DialogBoxMorph: // ProjectDialogMorph inherits from DialogBoxMorph:
ProjectDialogMorph.prototype = Object.create(DialogBoxMorph.prototype); ProjectDialogMorph.prototype = new DialogBoxMorph();
ProjectDialogMorph.prototype.constructor = ProjectDialogMorph; ProjectDialogMorph.prototype.constructor = ProjectDialogMorph;
ProjectDialogMorph.uber = DialogBoxMorph.prototype; ProjectDialogMorph.uber = DialogBoxMorph.prototype;
@ -5181,7 +5181,7 @@ ProjectDialogMorph.prototype.fixLayout = function () {
// SpriteIconMorph inherits from ToggleButtonMorph (Widgets) // SpriteIconMorph inherits from ToggleButtonMorph (Widgets)
SpriteIconMorph.prototype = Object.create(ToggleButtonMorph.prototype); SpriteIconMorph.prototype = new ToggleButtonMorph();
SpriteIconMorph.prototype.constructor = SpriteIconMorph; SpriteIconMorph.prototype.constructor = SpriteIconMorph;
SpriteIconMorph.uber = ToggleButtonMorph.prototype; SpriteIconMorph.uber = ToggleButtonMorph.prototype;
@ -5571,7 +5571,7 @@ SpriteIconMorph.prototype.copySound = function (sound) {
// CostumeIconMorph inherits from ToggleButtonMorph (Widgets) // CostumeIconMorph inherits from ToggleButtonMorph (Widgets)
// ... and copies methods from SpriteIconMorph // ... and copies methods from SpriteIconMorph
CostumeIconMorph.prototype = Object.create(ToggleButtonMorph.prototype); CostumeIconMorph.prototype = new ToggleButtonMorph();
CostumeIconMorph.prototype.constructor = CostumeIconMorph; CostumeIconMorph.prototype.constructor = CostumeIconMorph;
CostumeIconMorph.uber = ToggleButtonMorph.prototype; CostumeIconMorph.uber = ToggleButtonMorph.prototype;
@ -5782,7 +5782,7 @@ CostumeIconMorph.prototype.prepareToBeGrabbed = function () {
// TurtleIconMorph inherits from ToggleButtonMorph (Widgets) // TurtleIconMorph inherits from ToggleButtonMorph (Widgets)
// ... and copies methods from SpriteIconMorph // ... and copies methods from SpriteIconMorph
TurtleIconMorph.prototype = Object.create(ToggleButtonMorph.prototype); TurtleIconMorph.prototype = new ToggleButtonMorph();
TurtleIconMorph.prototype.constructor = TurtleIconMorph; TurtleIconMorph.prototype.constructor = TurtleIconMorph;
TurtleIconMorph.uber = ToggleButtonMorph.prototype; TurtleIconMorph.uber = ToggleButtonMorph.prototype;
@ -5965,7 +5965,7 @@ TurtleIconMorph.prototype.userMenu = function () {
// WardrobeMorph inherits from ScrollFrameMorph // WardrobeMorph inherits from ScrollFrameMorph
WardrobeMorph.prototype = Object.create(ScrollFrameMorph.prototype); WardrobeMorph.prototype = new ScrollFrameMorph();
WardrobeMorph.prototype.constructor = WardrobeMorph; WardrobeMorph.prototype.constructor = WardrobeMorph;
WardrobeMorph.uber = ScrollFrameMorph.prototype; WardrobeMorph.uber = ScrollFrameMorph.prototype;
@ -6148,7 +6148,7 @@ WardrobeMorph.prototype.reactToDropOf = function (icon) {
// SoundIconMorph inherits from ToggleButtonMorph (Widgets) // SoundIconMorph inherits from ToggleButtonMorph (Widgets)
// ... and copies methods from SpriteIconMorph // ... and copies methods from SpriteIconMorph
SoundIconMorph.prototype = Object.create(ToggleButtonMorph.prototype); SoundIconMorph.prototype = new ToggleButtonMorph();
SoundIconMorph.prototype.constructor = SoundIconMorph; SoundIconMorph.prototype.constructor = SoundIconMorph;
SoundIconMorph.uber = ToggleButtonMorph.prototype; SoundIconMorph.uber = ToggleButtonMorph.prototype;
@ -6356,7 +6356,7 @@ SoundIconMorph.prototype.prepareToBeGrabbed = function () {
// JukeboxMorph instance creation // JukeboxMorph instance creation
JukeboxMorph.prototype = Object.create(ScrollFrameMorph.prototype); JukeboxMorph.prototype = new ScrollFrameMorph();
JukeboxMorph.prototype.constructor = JukeboxMorph; JukeboxMorph.prototype.constructor = JukeboxMorph;
JukeboxMorph.uber = ScrollFrameMorph.prototype; JukeboxMorph.uber = ScrollFrameMorph.prototype;

Wyświetl plik

@ -2516,3 +2516,10 @@ ______
150608 150608
------ ------
* Blocks: Fixed #820 * Blocks: Fixed #820
150625
------
* Morphic, Objects, Blocks, XML: Optimizations and dramatic speed-up. Thanks, Nathan!!
* Objects: push maximum clone count up to 1000, tweak Note::play
=== Release v4.0.1 ===

Wyświetl plik

@ -7,7 +7,7 @@
written by Jens Mönig and Brian Harvey written by Jens Mönig and Brian Harvey
jens@moenig.org, bh@cs.berkeley.edu jens@moenig.org, bh@cs.berkeley.edu
Copyright (C) 2014 by Jens Mönig and Brian Harvey Copyright (C) 2015 by Jens Mönig and Brian Harvey
This file is part of Snap!. This file is part of Snap!.
@ -61,7 +61,7 @@ PushButtonMorph, SyntaxElementMorph, Color, Point, WatcherMorph,
StringMorph, SpriteMorph, ScrollFrameMorph, CellMorph, ArrowMorph, StringMorph, SpriteMorph, ScrollFrameMorph, CellMorph, ArrowMorph,
MenuMorph, snapEquals, Morph, isNil, localize, MorphicPreferences*/ MenuMorph, snapEquals, Morph, isNil, localize, MorphicPreferences*/
modules.lists = '2014-November-20'; modules.lists = '2015-June-25';
var List; var List;
var ListWatcherMorph; var ListWatcherMorph;
@ -363,7 +363,7 @@ List.prototype.equalTo = function (other) {
// ListWatcherMorph inherits from BoxMorph: // ListWatcherMorph inherits from BoxMorph:
ListWatcherMorph.prototype = Object.create(BoxMorph.prototype); ListWatcherMorph.prototype = new BoxMorph();
ListWatcherMorph.prototype.constructor = ListWatcherMorph; ListWatcherMorph.prototype.constructor = ListWatcherMorph;
ListWatcherMorph.uber = BoxMorph.prototype; ListWatcherMorph.uber = BoxMorph.prototype;
@ -388,13 +388,6 @@ ListWatcherMorph.prototype.init = function (list, parentCell) {
this.lastCell = null; this.lastCell = null;
this.parentCell = parentCell || null; // for circularity detection this.parentCell = parentCell || null; // for circularity detection
ListWatcherMorph.uber.init.call(
this,
SyntaxElementMorph.prototype.rounding,
1.000001, // shadow bug in Chrome,
new Color(120, 120, 120)
);
// elements declarations // elements declarations
this.label = new StringMorph( this.label = new StringMorph(
localize('length: ') + this.list.length(), localize('length: ') + this.list.length(),
@ -443,6 +436,13 @@ ListWatcherMorph.prototype.init = function (list, parentCell) {
this.plusButton.drawNew(); this.plusButton.drawNew();
this.plusButton.fixLayout(); this.plusButton.fixLayout();
ListWatcherMorph.uber.init.call(
this,
SyntaxElementMorph.prototype.rounding,
1.000001, // shadow bug in Chrome,
new Color(120, 120, 120)
);
this.color = new Color(220, 220, 220); this.color = new Color(220, 220, 220);
this.isDraggable = true; this.isDraggable = true;
this.setExtent(new Point(80, 70).multiplyBy( this.setExtent(new Point(80, 70).multiplyBy(
@ -634,7 +634,7 @@ ListWatcherMorph.prototype.setStartIndex = function (index) {
}; };
ListWatcherMorph.prototype.fixLayout = function () { ListWatcherMorph.prototype.fixLayout = function () {
if (!this.label) return; if (!this.label) {return; }
Morph.prototype.trackChanges = false; Morph.prototype.trackChanges = false;
if (this.frame) { if (this.frame) {
this.arrangeCells(); this.arrangeCells();

Wyświetl plik

@ -125,7 +125,7 @@ PrototypeHatBlockMorph*/
// Global stuff //////////////////////////////////////////////////////// // Global stuff ////////////////////////////////////////////////////////
modules.objects = '2015-May-18'; modules.objects = '2015-June-25';
var SpriteMorph; var SpriteMorph;
var StageMorph; var StageMorph;
@ -147,7 +147,7 @@ var SpriteHighlightMorph;
// SpriteMorph inherits from PenMorph: // SpriteMorph inherits from PenMorph:
SpriteMorph.prototype = Object.create(PenMorph.prototype); SpriteMorph.prototype = new PenMorph();
SpriteMorph.prototype.constructor = SpriteMorph; SpriteMorph.prototype.constructor = SpriteMorph;
SpriteMorph.uber = PenMorph.prototype; SpriteMorph.uber = PenMorph.prototype;
@ -2718,7 +2718,7 @@ SpriteMorph.prototype.remove = function () {
SpriteMorph.prototype.createClone = function () { SpriteMorph.prototype.createClone = function () {
var stage = this.parentThatIsA(StageMorph); var stage = this.parentThatIsA(StageMorph);
if (stage && stage.cloneCount <= 300) { if (stage && stage.cloneCount <= 1000) {
this.fullCopy().clonify(stage); this.fullCopy().clonify(stage);
} }
}; };
@ -4289,7 +4289,7 @@ SpriteMorph.prototype.doScreenshot = function (imgSource, data) {
// SpriteHighlightMorph inherits from Morph: // SpriteHighlightMorph inherits from Morph:
SpriteHighlightMorph.prototype = Object.create(Morph.prototype); SpriteHighlightMorph.prototype = new Morph();
SpriteHighlightMorph.prototype.constructor = SpriteHighlightMorph; SpriteHighlightMorph.prototype.constructor = SpriteHighlightMorph;
SpriteHighlightMorph.uber = Morph.prototype; SpriteHighlightMorph.uber = Morph.prototype;
@ -4307,7 +4307,7 @@ function SpriteHighlightMorph() {
// StageMorph inherits from FrameMorph: // StageMorph inherits from FrameMorph:
StageMorph.prototype = Object.create(FrameMorph.prototype); StageMorph.prototype = new FrameMorph();
StageMorph.prototype.constructor = StageMorph; StageMorph.prototype.constructor = StageMorph;
StageMorph.uber = FrameMorph.prototype; StageMorph.uber = FrameMorph.prototype;
@ -5669,7 +5669,7 @@ StageMorph.prototype.replaceDoubleDefinitionsFor
// SpriteBubbleMorph inherits from SpeechBubbleMorph: // SpriteBubbleMorph inherits from SpeechBubbleMorph:
SpriteBubbleMorph.prototype = Object.create(SpeechBubbleMorph.prototype); SpriteBubbleMorph.prototype = new SpeechBubbleMorph();
SpriteBubbleMorph.prototype.constructor = SpriteBubbleMorph; SpriteBubbleMorph.prototype.constructor = SpriteBubbleMorph;
SpriteBubbleMorph.uber = SpeechBubbleMorph.prototype; SpriteBubbleMorph.uber = SpeechBubbleMorph.prototype;
@ -6168,7 +6168,7 @@ Costume.prototype.isTainted = function () {
// SVG_Costume inherits from Costume: // SVG_Costume inherits from Costume:
SVG_Costume.prototype = Object.create(Costume.prototype); SVG_Costume.prototype = new Costume();
SVG_Costume.prototype.constructor = SVG_Costume; SVG_Costume.prototype.constructor = SVG_Costume;
SVG_Costume.uber = Costume.prototype; SVG_Costume.uber = Costume.prototype;
@ -6219,7 +6219,7 @@ SVG_Costume.prototype.shrinkToFit = function (extentPoint) {
// CostumeEditorMorph inherits from Morph: // CostumeEditorMorph inherits from Morph:
CostumeEditorMorph.prototype = Object.create(Morph.prototype); CostumeEditorMorph.prototype = new Morph();
CostumeEditorMorph.prototype.constructor = CostumeEditorMorph; CostumeEditorMorph.prototype.constructor = CostumeEditorMorph;
CostumeEditorMorph.uber = Morph.prototype; CostumeEditorMorph.uber = Morph.prototype;
@ -6429,7 +6429,7 @@ Note.prototype.play = function () {
if (!this.oscillator.stop) { if (!this.oscillator.stop) {
this.oscillator.stop = this.oscillator.noteOff; this.oscillator.stop = this.oscillator.noteOff;
} }
this.oscillator.type = 0; this.oscillator.type = 'sine';
this.oscillator.frequency.value = this.oscillator.frequency.value =
Math.pow(2, (this.pitch - 69) / 12) * 440; Math.pow(2, (this.pitch - 69) / 12) * 440;
this.oscillator.connect(this.gainNode); this.oscillator.connect(this.gainNode);
@ -6454,7 +6454,7 @@ Note.prototype.stop = function () {
// CellMorph inherits from BoxMorph: // CellMorph inherits from BoxMorph:
CellMorph.prototype = Object.create(BoxMorph.prototype); CellMorph.prototype = new BoxMorph();
CellMorph.prototype.constructor = CellMorph; CellMorph.prototype.constructor = CellMorph;
CellMorph.uber = BoxMorph.prototype; CellMorph.uber = BoxMorph.prototype;
@ -6794,7 +6794,7 @@ CellMorph.prototype.mouseClickLeft = function (pos) {
// WatcherMorph inherits from BoxMorph: // WatcherMorph inherits from BoxMorph:
WatcherMorph.prototype = Object.create(BoxMorph.prototype); WatcherMorph.prototype = new BoxMorph();
WatcherMorph.prototype.constructor = WatcherMorph; WatcherMorph.prototype.constructor = WatcherMorph;
WatcherMorph.uber = BoxMorph.prototype; WatcherMorph.uber = BoxMorph.prototype;
@ -7281,7 +7281,7 @@ WatcherMorph.prototype.drawNew = function () {
// StagePrompterMorph inherits from BoxMorph: // StagePrompterMorph inherits from BoxMorph:
StagePrompterMorph.prototype = Object.create(BoxMorph.prototype); StagePrompterMorph.prototype = new BoxMorph();
StagePrompterMorph.prototype.constructor = StagePrompterMorph; StagePrompterMorph.prototype.constructor = StagePrompterMorph;
StagePrompterMorph.uber = BoxMorph.prototype; StagePrompterMorph.uber = BoxMorph.prototype;

Wyświetl plik

@ -5,7 +5,7 @@
inspired by the Scratch paint editor. inspired by the Scratch paint editor.
written by Kartik Chandra written by Kartik Chandra
Copyright (C) 2014 by Kartik Chandra Copyright (C) 2015 by Kartik Chandra
This file is part of Snap!. This file is part of Snap!.
@ -69,7 +69,7 @@
// Global stuff //////////////////////////////////////////////////////// // Global stuff ////////////////////////////////////////////////////////
modules.paint = '2014-September-29'; modules.paint = '2015-June-25';
// Declarations // Declarations
@ -81,7 +81,7 @@ var PaintColorPickerMorph;
// A complete paint editor // A complete paint editor
PaintEditorMorph.prototype = Object.create(DialogBoxMorph.prototype); PaintEditorMorph.prototype = new DialogBoxMorph();
PaintEditorMorph.prototype.constructor = PaintEditorMorph; PaintEditorMorph.prototype.constructor = PaintEditorMorph;
PaintEditorMorph.uber = DialogBoxMorph.prototype; PaintEditorMorph.uber = DialogBoxMorph.prototype;
@ -92,7 +92,6 @@ function PaintEditorMorph() {
} }
PaintEditorMorph.prototype.init = function () { PaintEditorMorph.prototype.init = function () {
PaintEditorMorph.uber.init.call(this);
// additional properties: // additional properties:
this.paper = null; // paint canvas this.paper = null; // paint canvas
this.oncancel = null; this.oncancel = null;
@ -477,7 +476,7 @@ PaintEditorMorph.prototype.getUserColor = function () {
// A large hsl color picker // A large hsl color picker
PaintColorPickerMorph.prototype = Object.create(Morph.prototype); PaintColorPickerMorph.prototype = new Morph();
PaintColorPickerMorph.prototype.constructor = PaintColorPickerMorph; PaintColorPickerMorph.prototype.constructor = PaintColorPickerMorph;
PaintColorPickerMorph.uber = Morph.prototype; PaintColorPickerMorph.uber = Morph.prototype;
@ -486,7 +485,6 @@ function PaintColorPickerMorph(extent, action) {
} }
PaintColorPickerMorph.prototype.init = function (extent, action) { PaintColorPickerMorph.prototype.init = function (extent, action) {
PaintColorPickerMorph.uber.init.call(this);
this.setExtent(extent || new Point(200, 100)); this.setExtent(extent || new Point(200, 100));
this.action = action || nop; this.action = action || nop;
this.drawNew(); this.drawNew();
@ -554,7 +552,7 @@ PaintColorPickerMorph.prototype.mouseMove =
modify its image, based on a 'tool' property. modify its image, based on a 'tool' property.
*/ */
PaintCanvasMorph.prototype = Object.create(Morph.prototype); PaintCanvasMorph.prototype = new Morph();
PaintCanvasMorph.prototype.constructor = PaintCanvasMorph; PaintCanvasMorph.prototype.constructor = PaintCanvasMorph;
PaintCanvasMorph.uber = Morph.prototype; PaintCanvasMorph.uber = Morph.prototype;
@ -563,7 +561,6 @@ function PaintCanvasMorph(shift) {
} }
PaintCanvasMorph.prototype.init = function (shift) { PaintCanvasMorph.prototype.init = function (shift) {
PaintCanvasMorph.uber.init.call(this);
this.rotationCenter = new Point(240, 180); this.rotationCenter = new Point(240, 180);
this.dragRect = null; this.dragRect = null;
this.previousDragPoint = null; this.previousDragPoint = null;
@ -964,7 +961,6 @@ PaintCanvasMorph.prototype.buildContents = function () {
}; };
PaintCanvasMorph.prototype.drawNew = function () { PaintCanvasMorph.prototype.drawNew = function () {
if (!this.background) return;
var can = newCanvas(this.extent()); var can = newCanvas(this.extent());
this.merge(this.background, can); this.merge(this.background, can);
this.merge(this.paper, can); this.merge(this.paper, can);

Wyświetl plik

@ -61,7 +61,7 @@ SyntaxElementMorph, Variable*/
// Global stuff //////////////////////////////////////////////////////// // Global stuff ////////////////////////////////////////////////////////
modules.store = '2015-April-26'; modules.store = '2015-June-25';
// XML_Serializer /////////////////////////////////////////////////////// // XML_Serializer ///////////////////////////////////////////////////////
@ -246,7 +246,7 @@ var SnapSerializer;
// SnapSerializer inherits from XML_Serializer: // SnapSerializer inherits from XML_Serializer:
SnapSerializer.prototype = Object.create(XML_Serializer.prototype); SnapSerializer.prototype = new XML_Serializer();
SnapSerializer.prototype.constructor = SnapSerializer; SnapSerializer.prototype.constructor = SnapSerializer;
SnapSerializer.uber = XML_Serializer.prototype; SnapSerializer.uber = XML_Serializer.prototype;
@ -274,7 +274,6 @@ SnapSerializer.prototype.watcherLabels = {
// SnapSerializer instance creation: // SnapSerializer instance creation:
function SnapSerializer() { function SnapSerializer() {
XML_Serializer.call(this);
this.init(); this.init();
} }

Wyświetl plik

@ -7,7 +7,7 @@
written by Jens Mönig written by Jens Mönig
jens@moenig.org jens@moenig.org
Copyright (C) 2014 by Jens Mönig Copyright (C) 2015 by Jens Mönig
This file is part of Snap!. This file is part of Snap!.
@ -74,7 +74,7 @@ HTMLCanvasElement, fontHeight, SymbolMorph, localize, SpeechBubbleMorph,
ArrowMorph, MenuMorph, isString, isNil, SliderMorph, MorphicPreferences, ArrowMorph, MenuMorph, isString, isNil, SliderMorph, MorphicPreferences,
ScrollFrameMorph*/ ScrollFrameMorph*/
modules.widgets = '2014-February-13'; modules.widgets = '2015-June-25';
var PushButtonMorph; var PushButtonMorph;
var ToggleButtonMorph; var ToggleButtonMorph;
@ -91,7 +91,7 @@ var InputFieldMorph;
// PushButtonMorph inherits from TriggerMorph: // PushButtonMorph inherits from TriggerMorph:
PushButtonMorph.prototype = Object.create(TriggerMorph.prototype); PushButtonMorph.prototype = new TriggerMorph();
PushButtonMorph.prototype.constructor = PushButtonMorph; PushButtonMorph.prototype.constructor = PushButtonMorph;
PushButtonMorph.uber = TriggerMorph.prototype; PushButtonMorph.uber = TriggerMorph.prototype;
@ -476,7 +476,7 @@ PushButtonMorph.prototype.createLabel = function () {
// ToggleButtonMorph inherits from PushButtonMorph: // ToggleButtonMorph inherits from PushButtonMorph:
ToggleButtonMorph.prototype = Object.create(PushButtonMorph.prototype); ToggleButtonMorph.prototype = new PushButtonMorph();
ToggleButtonMorph.prototype.constructor = ToggleButtonMorph; ToggleButtonMorph.prototype.constructor = ToggleButtonMorph;
ToggleButtonMorph.uber = PushButtonMorph.prototype; ToggleButtonMorph.uber = PushButtonMorph.prototype;
@ -900,7 +900,7 @@ ToggleButtonMorph.prototype.show = function () {
// TabMorph inherits from ToggleButtonMorph: // TabMorph inherits from ToggleButtonMorph:
TabMorph.prototype = Object.create(ToggleButtonMorph.prototype); TabMorph.prototype = new ToggleButtonMorph();
TabMorph.prototype.constructor = TabMorph; TabMorph.prototype.constructor = TabMorph;
TabMorph.uber = ToggleButtonMorph.prototype; TabMorph.uber = ToggleButtonMorph.prototype;
@ -1022,7 +1022,7 @@ TabMorph.prototype.drawEdges = function (
// ToggleMorph inherits from PushButtonMorph: // ToggleMorph inherits from PushButtonMorph:
ToggleMorph.prototype = Object.create(PushButtonMorph.prototype); ToggleMorph.prototype = new PushButtonMorph();
ToggleMorph.prototype.constructor = ToggleMorph; ToggleMorph.prototype.constructor = ToggleMorph;
ToggleMorph.uber = PushButtonMorph.prototype; ToggleMorph.uber = PushButtonMorph.prototype;
@ -1270,7 +1270,7 @@ ToggleMorph.prototype.show = ToggleButtonMorph.prototype.show;
// ToggleElementMorph inherits from TriggerMorph: // ToggleElementMorph inherits from TriggerMorph:
ToggleElementMorph.prototype = Object.create(TriggerMorph.prototype); ToggleElementMorph.prototype = new TriggerMorph();
ToggleElementMorph.prototype.constructor = ToggleElementMorph; ToggleElementMorph.prototype.constructor = ToggleElementMorph;
ToggleElementMorph.uber = TriggerMorph.prototype; ToggleElementMorph.uber = TriggerMorph.prototype;
@ -1440,7 +1440,7 @@ ToggleElementMorph.prototype.mouseClickLeft
// DialogBoxMorph inherits from Morph: // DialogBoxMorph inherits from Morph:
DialogBoxMorph.prototype = Object.create(Morph.prototype); DialogBoxMorph.prototype = new Morph();
DialogBoxMorph.prototype.constructor = DialogBoxMorph; DialogBoxMorph.prototype.constructor = DialogBoxMorph;
DialogBoxMorph.uber = Morph.prototype; DialogBoxMorph.uber = Morph.prototype;
@ -2866,7 +2866,7 @@ DialogBoxMorph.prototype.outlinePathBody = function (context, radius) {
// AlignmentMorph inherits from Morph: // AlignmentMorph inherits from Morph:
AlignmentMorph.prototype = Object.create(Morph.prototype); AlignmentMorph.prototype = new Morph();
AlignmentMorph.prototype.constructor = AlignmentMorph; AlignmentMorph.prototype.constructor = AlignmentMorph;
AlignmentMorph.uber = Morph.prototype; AlignmentMorph.uber = Morph.prototype;
@ -2940,7 +2940,7 @@ AlignmentMorph.prototype.fixLayout = function () {
// InputFieldMorph inherits from Morph: // InputFieldMorph inherits from Morph:
InputFieldMorph.prototype = Object.create(Morph.prototype); InputFieldMorph.prototype = new Morph();
InputFieldMorph.prototype.constructor = InputFieldMorph; InputFieldMorph.prototype.constructor = InputFieldMorph;
InputFieldMorph.uber = Morph.prototype; InputFieldMorph.uber = Morph.prototype;

8
xml.js 100644 → 100755
Wyświetl plik

@ -7,7 +7,7 @@
written by Jens Mönig written by Jens Mönig
jens@moenig.org jens@moenig.org
Copyright (C) 2014 by Jens Mönig Copyright (C) 2015 by Jens Mönig
This file is part of Snap!. This file is part of Snap!.
@ -57,7 +57,9 @@
Nathan Dinsmore contributed to the design and implemented a first Nathan Dinsmore contributed to the design and implemented a first
working version of a complete XMLSerializer. I have taken much of the working version of a complete XMLSerializer. I have taken much of the
overall design and many of the functions and methods in this file from overall design and many of the functions and methods in this file from
Nathan's fine original prototype. Nathan's fine original prototype. Recently Nathan has once again
worked his magic on the parser and optimized it by an order of
magnitude.
*/ */
@ -65,7 +67,7 @@
// Global stuff //////////////////////////////////////////////////////// // Global stuff ////////////////////////////////////////////////////////
modules.xml = '2014-January-09'; modules.xml = '2015-June-25';
// Declarations // Declarations