Created
November 16, 2019 19:23
-
-
Save kenwebb/07930d583d3edbf858fd4f9dcf86853e to your computer and use it in GitHub Desktop.
Interacting with other Xholon webpages
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8"?> | |
<!--Xholon Workbook http://www.primordion.com/Xholon/gwt/ MIT License, Copyright (C) Ken Webb, Sat Nov 16 2019 14:22:41 GMT-0500 (Eastern Standard Time)--> | |
<XholonWorkbook> | |
<Notes><![CDATA[ | |
Xholon | |
------ | |
Title: Interacting with other Xholon webpages | |
Description: | |
Url: http://www.primordion.com/Xholon/gwt/ | |
InternalName: | |
Keywords: | |
My Notes | |
-------- | |
November 16, 2019 | |
In this workbook I explore interactions between two or more webpages in the same browser (Firefox or Chrome or other), where each page has the same web domain (primordion.com or localhost). | |
I've done this previously in my "The Love Letter" workbooks. There are eight of these. | |
References | |
---------- | |
(1) from oldest to newest | |
http://127.0.0.1:8888/wb/editwb.html?app=b82b688d02e6b9f06fef&src=gist The Love Letter - Jake Belknap | |
http://127.0.0.1:8888/wb/editwb.html?app=b684ec7bab639ba548db&src=gist The Love Letter - Helen Elizabeth Worley | |
http://127.0.0.1:8888/wb/editwb.html?app=81786af30c8ac62e4753&src=gist The Love Letter - Jake - no postMessage() | |
http://127.0.0.1:8888/wb/editwb.html?app=9460309abdef48f184cf&src=gist The Love Letter - Helen - no postMessage() | |
http://127.0.0.1:8888/wb/editwb.html?app=9fce004c2e5389e60424&src=gist The Love Letter - Helen - CrossApp | |
http://127.0.0.1:8888/wb/editwb.html?app=88113e296a37af87317f&src=gist The Love Letter - Jake - CrossApp | |
http://127.0.0.1:8888/wb/editwb.html?app=dc52515ce0c60d6539693e145ddbf93f&src=gist The Love Letter - Helen - PostMessage | |
http://127.0.0.1:8888/wb/editwb.html?app=80324485c0e348da6046cca2442b8153&src=gist The Love Letter - Jake - PostMessage | |
]]></Notes> | |
<_-.XholonClass> | |
<!-- domain objects --> | |
<PhysicalSystem/> | |
<Block/> | |
<Brick/> | |
<!-- quantities --> | |
<Height superClass="Quantity"/> | |
</_-.XholonClass> | |
<xholonClassDetails> | |
<Block> | |
<port name="height" connector="Height"/> | |
</Block> | |
</xholonClassDetails> | |
<PhysicalSystem> | |
<Block> | |
<Height>0.1 m</Height> | |
</Block> | |
<Brick multiplicity="2"/> | |
</PhysicalSystem> | |
<Blockbehavior implName="org.primordion.xholon.base.Behavior_gwtjs"><![CDATA[ | |
var a = 123; | |
var b = 456; | |
var c = a * b; | |
if (console) { | |
console.log(c); | |
} | |
//# sourceURL=Blockbehavior.js | |
]]></Blockbehavior> | |
<Heightbehavior implName="org.primordion.xholon.base.Behavior_gwtjs"><![CDATA[ | |
var myHeight, testing; | |
var beh = { | |
postConfigure: function() { | |
testing = Math.floor(Math.random() * 10); | |
myHeight = this.cnode.parent(); | |
}, | |
act: function() { | |
myHeight.println(this.toString()); | |
}, | |
toString: function() { | |
return "testing:" + testing; | |
} | |
} | |
//# sourceURL=Heightbehavior.js | |
]]></Heightbehavior> | |
<Brickbehavior implName="org.primordion.xholon.base.Behavior_gwtjs"><![CDATA[ | |
$wnd.xh.Brickbehavior = function Brickbehavior() {} | |
$wnd.xh.Brickbehavior.prototype.postConfigure = function() { | |
this.brick = this.cnode.parent(); | |
this.iam = " red brick"; | |
}; | |
$wnd.xh.Brickbehavior.prototype.act = function() { | |
this.brick.println("I am a" + this.iam); | |
}; | |
//# sourceURL=Brickbehavior.js | |
]]></Brickbehavior> | |
<Brickbehavior implName="org.primordion.xholon.base.Behavior_gwtjs"><![CDATA[ | |
console.log("I'm another brick behavior"); | |
]]></Brickbehavior> | |
<SvgClient><Attribute_String roleName="svgUri"><![CDATA[data:image/svg+xml, | |
<svg width="100" height="50" xmlns="http://www.w3.org/2000/svg"> | |
<g> | |
<title>Block</title> | |
<rect id="PhysicalSystem/Block" fill="#98FB98" height="50" width="50" x="25" y="0"/> | |
<g> | |
<title>Height</title> | |
<rect id="PhysicalSystem/Block/Height" fill="#6AB06A" height="50" width="10" x="80" y="0"/> | |
</g> | |
</g> | |
</svg> | |
]]></Attribute_String><Attribute_String roleName="setup">${MODELNAME_DEFAULT},${SVGURI_DEFAULT}</Attribute_String></SvgClient> | |
</XholonWorkbook> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment