
I am investigating how to integrate a Tweak app with Croquet. Read on for a little intro. Get it:
The code of the simple example and the Tweak-in-Croquet TEmbeddableApp implementation.
There's currently certainly the 2D-overlay menu of for example the KAT Demo which is implemented in Tweak. But besides that what really matters to me is to have 3D windows with Tweak apps inside. Example (do you find the bug?):

Why is that? Actually the architecture of TEmbeddedApp is creating an app locally, next to each replica of the island (don't know the terms? Look at the Croquet Architecture Introduction). There's a mechanism in CroquetHarness, #updateEmbeddedAppsIn:, which handles the creation of the local copies for the embedded apps.
Embedded apps are of course not in the island - so during sync they aren't snapshotted and copied over to the joining node. They need to care for this synchronization themselves. That's what the appData in the TEmbeddedApp object is good for. Every app instance needs to update its replica's appData-copy. No joke (and no network traffic for this)! That's the current architecture for embedded apps. SyncSend is the keyword, with it you are accessing island-data directly.
So if you want to build an embedded app - or integrate an existing Tweak app, then you have to provide means to load existing state from the appData and of course you have to store each change to the app's state in the appData object. See CSimpleEmbedTweakPlayer's state-mgmt category in the provided code.
That's also how the morphic app KTextApp/KMediaText is working:

I am currently investigating a framework for the creation of embedded apps. The state-saving should be supported by a framework and the default widgets should provide adapters for this kind of state-persistence. I hoped I can sooner provide a demo for that, but I dragged on so I created this simple demo for the meantime.
I hope that this draws some comments! :- )
3 Kommentare:
Answer to Feedback from Kiran: To run the simple demo there is a class method on the TSimpleEmbedTweakApp.
Use the KAT Demo, say Explore Harness in the Admin Menu and do
TSimpleEmbedTweakApp createInHarness: self
in the lower part of the a KStandardHarness Window.
Cheers!
Georg
The code of Croquet-Embed-Tweak-GK.10.mcz is released with Copyright under the Croquet License as used for the Croquet SDK on http://www.opencroquet.org.
if you want Best iPhone Tweaked Apps then Must try it.. tweaked apps
Kommentar veröffentlichen