Premise Modules Overwriting

Motorola Premise
C

chucklyons

Guest
I haven't ever seen this problem before. If I import the Picture Frame module, it inserts itself into the iPhone module. If I delete the iPhone module, the Picture Module loads itself properly; If I import the iPhone module, it inserts itself into the Picture Frame module.

There must be an ID somewhere that is the same, but I can't seem to find it. And both modules create separate roots (iPhone and pf).

Any ideas out there?
 
I haven't ever seen this problem before. If I import the Picture Frame module, it inserts itself into the iPhone module. If I delete the iPhone module, the Picture Module loads itself properly; If I import the iPhone module, it inserts itself into the Picture Frame module.

There must be an ID somewhere that is the same, but I can't seem to find it. And both modules create separate roots (iPhone and pf).

Any ideas out there?

Names are not important in the SYS core. Only GUIDs. This problem probably occured when somebody took the iPhone module, modified it and saved it as the Picture Frame module. Or vice versa. They must have the same GUID (SYS property "ObjectID").
 
...If I import the Picture Frame module, it inserts itself into the iPhone module. ..Any ideas out there?
Yup.
I made the PhotoFrame module by altering the xBrowser module.
You made the iPhone module by altering the xBrowser module.

You'll find that the problem will also occur if you import the xBrowser module (it'll 'fuse' with iPhone and/or PhotoFrame).

Altering an existing module so that it serves a completely different purpose is a no-no. I described this mistake in The School of Hard Knocks. I didn't learn from my own mistake when I created the PhotoFrame module! :)

There is no super-easy way to fix it. If you're game, here's what I'd recommend:
  1. Delete the fused module
  2. Restart the Premise Server service (for good measure)
  3. Import the iPhone (or PhotoFrame) module
  4. Make a COPY of the module (the copy will have all new GUIDs)
  5. Select the original module and press the Delete key
  6. A dialog box will appear and will list all of the classes that will be deleted. Carefully examine this list and note if anything, such as PropertyChange scripts, is residing in the COPY! After confirming the deletion, you will need to re-create these items from scratch.
An additional complication with xBrowser/iPhone/PhotoFrame is that they have hard-coded ObjectID (GUID) references to the objects in their Templates folder. The copied Module will have all new GUIDs so the hard-coded references will become invalid. For example, the ObjectID (GUID) of iPhoneRootObj is {467F3DCE-216A-48B2-B294-55F5A1856524} (right-click the iPhoneRootObj object in the Templates folder to see its GUID). Now look at "Function g_iPhoneRenderToolbar()" and you'll discover a hard-coded reference to this GUID:

Output = Output & "<A href=""/sys/{467F3DCE-216A-48B2-B294-55F5A1856524}?d??iPhoneGoUp(" & system.GetUniqueId() & ")"">" & g_iPhoneGetToolbarImage("Up.gif") & "</A>&nbsp;&nbsp;"

That reference will have to match whatever is the new GUID of iPhoneRootObj.

Overall, an ugly little exercise!

FWIW, I'll post a corrected version of PhotoFrame in the future.
 
At least I wasn't imagining things! I'll give it a shot at some point. Most likely before I get some of those Damon wall mounted touchscreens!

Two points on this. 1) It looks like a great module; can't wait to get it to work. Nice job! 2) If you 'touch' the picture, does it return to the Premise UI?
 
... If you 'touch' the picture, does it return to the Premise UI?
The photo is divided into three areas that allow you to navigate through the album (Previous; Pause; Next).

The module could be enhanced to provide additional navigational areas. The second attached image shows a proposed arrangement that has two additional areas (Top; Bottom). These areas represents URLs that could be client-specific (i.e. expose them as properties of ClientSettings) or hard-coded. For example, the Top area could lead to the AutomationBrowser for a PC client equipped with Internet Explorer or to the iPhone interface for an iPhone.

FYI
I posted PhotoFrame V1.1. It has been modified so that is does not interfere (i.e. 'fuse') with xBrowser.
 

Attachments

  • PhotoFrame_Controls.jpg
    PhotoFrame_Controls.jpg
    38.8 KB · Views: 11
  • Navigation_Areas.png
    Navigation_Areas.png
    3.2 KB · Views: 11
Back
Top