4 Replies Latest reply on Jan 29, 2016 1:59 AM by mrwatson-gbs

    THEME AND STYLE IMPOSTORS - make theme management IMPOSSIBLE in multi-file solutions

      Summary

      THEME AND STYLE IMPOSTORS - make theme management IMPOSSIBLE in multi-file solutions

      Product

      FileMaker Pro

      Version

      13.0v3

      Operating system version

      Mac and Win

      Description of the issue

      @Matthew O’Dell, @Heather Winkle, @Andrew Paulsen - IMPORTANT!

      Before themes and styles were introduced into FileMaker copying and pasting FileMaker objects inserted and linked objects based on their VISIBLE NAMES. When pasting objects into a solution the internal IDs are looked up and stored based on matching object names. Thus,

      - before pasting objects (scripts, fields, layout objects or whatever) into another file you had to ensure that all the referenced objects are correctly named,
      - pasting objects between FileMaker clients using different languages breaks all language-dependent references (function names, script step names, etc.)

      This was good because

      1) it is consistent
      2) it is understandable
      3) users can check the names before pasting,
      4) HOW to proceed is clear
      5) the (multi-lingual) limitation is (THUS) fully acceptable.


      WITH THEMES AND STYLES FileMaker Inc. has - sadly - deviated from this standard so that pasted objects are matched by *internal* IDs (i.e. internalName) instead of using the name which is visible in FileMaker.

      This leads to the unmanageable situation that it is impossible to tell if a theme or style is the 'real' one or an 'impostor'.

      (real = same name AND same internal name, impostor = same name but different internal names)

      - Real themes/styles will be updated when a theme is updated.
      - Imposter themes CANNOT be updated
      - Imposter styles will not be be updated, even if their theme can be & is updated.


      This is bad, because

      1) it breaks the standard method of referencing objects by VISIBLE NAME when pasting
      2) users cannot understand why it sometimes works and sometimes not, and
      3) users have no possibility to check if themes and styles are real or impostors*, and
      4) there are no guidelines (I know of) from FileMaker HOW themes are to be managed in order to be able to synchronize & update them successfully.
      5) the limitations are perceived as a failure of / bug in FileMaker

      * Note: With the next version of fmWorkMate (my toolbox for FM-developers - www.fmWorkMate.com) it will be possible using fmCheckMate and the fmCheckMate-XSLT library to copy themes to XML and see the internalNames and contents of themes.

      Steps to reproduce the problem

      1. Create a multi-file solution (e.g. with 4 Files).
      2. Create a custom Theme "myTheme" in file 1.
      3. Add some custom styles (Buttons, Text, whatever)
      4. Make some layouts + objects using these styles
      5. "Synchronize" the theme to other files in various ways:
      5.2 To File 2 using Import Theme, and then copy + paste layout objects
      5.3 To File 3 using copy + paste theme, and then copy + paste layout objects
      5.4 To File 4 by copy+pasting layout objects FIRST, and then using save as new style and theme to create theme and style of the same (visual) name
      6. …and create layouts and objects with the styles in the 3 other files.

      … so far so good - everything *LOOKS* the same ...

      Now let's try to develop and update our theme a bit:

      7. Change some styles in File 1, and save them and save the theme "myStyle".
      8. Now try to update your theme to files 2-4:
      8.2 Try to import Theme "myTheme" from File 1 into File2
      8.3 Try to import Theme "myTheme" from File 1 into File3
      8.4 Try to import Theme "myTheme" from File 1 into File4

      Expected result

      I expect the three methods of creating themes and styles in other files to allow me to update my theme BECAUSE THEY HAVE THE SAME NAME (that I can see)

      Actual result

      File 2: I can update OK, because FileMaker asks me if I wan't to replace "myTheme". (Real Theme)
      File 3: FileMaker creates "myTheme 2" without asking if I want to update. (Impostor Theme)
      File 4: FileMaker creates "myTheme 2" without asking if I want to update. (Impostor Theme)

      Exact text of any error message(s) that appear

      -

      Configuration information

      -

      Workaround

      ONLY USE METHOD 1 TO SYNCHRONISE THEMES

      1. First save all theme changes in your source file (File 1)
      2. Use Import Theme to import or update the theme information into another file (File 2).
      3. Only having completed step 1+2 may layout objects be successfully copy+pasted into other files (File 2)

      In other words:

      THE THREE GOLDEN RULES OF THEME MANAGEMENT IN FILEMAKER:

      1. DEFINE THEMES AND STYLES IN *ONE FILE* ONLY AND SYNCHRONIZE THEM TO OTHER FILES USING MANAGE THEME > *IMPORT* THEME
      2. *NEVER* COPY AND PASTE THEMES
      3. *NEVER* DEFINE THEMES AND STYLES BY HAND ANYWHERE ELSE IN YOUR SOLUTION

      and best practice:

      1. APPLY THE THREE GOLDEN RULES BEFORE COPYING LAYOUT OBJECTS TO OTHER FILES
      2. If you DO copy objects to a file, where the theme or style does not yet exist, then
        - DO NOT BE TEMPTED TO USE 'SAVE AS NEW STYLE' OR 'SAVE AS NEW THEME'
        - rather create the required style in the current file by applying the three golden rules, and
        - then apply the style to the pasted object.


      (Please attribute this technique to MrWatson of mrwatson.de when passing it on to others.)

      Note: In the meantime I've got FIVE golden rules, see:

      http://www.mrwatson.de/apps/blog/show/42387857-the-five-golden-rules-of-managing-themes-in-multi-file-solutions-using-filemaker-13

        • 1. Re: THEME AND STYLE IMPOSTORS - make theme management IMPOSSIBLE in multi-file solutions
          mattodell

               Hi Mr. Watson, 

               Just so I get to the main part of your issue, you're having trouble managing a single theme across multiple files? It seems like Importing of a theme does a good job of synchronizing across files if you do make changes, so we should call that out somewhere to make it more obvious. 

               That said, I'm not sure if I agree with how you expect Copy and Paste to work. Within all of FileMaker, like copying and pasting fields, tables, or scripts, if you paste multiple times, you will end up with multiple copies (with a number added at the end). Pasting in all of FileMaker does not overwrite things in the past but create new versions that are completely different than previous versions. 

               Also, I would never recommend the technique of copying individual objects from a layout to create a new theme. Themes contain information on many different objects, and the chance that you would copy each type of object and manually create styles for each would be a complete waste of time (especially when there's something as simple as "import" under Manage Themes). 

               Let me know if I'm missing any major parts of your post here. We'll try to highlight to users that Importing is the best way to manage themes across multiple files. Thanks for your diligence in testing all the options. 

               Matt

          • 2. Re: THEME AND STYLE IMPOSTORS - make theme management IMPOSSIBLE in multi-file solutions

                 Good morning America! ;-) and hi Matt O'Dell!

                 Thank you for the *extremely* quick reply!

                 … hold on … have you got my mail on this topic yet? … I sent a mail to you 10 minutes ago, but my mac just made the sent message swoosh while I have been typing - perhaps the mail has just gone out, and you have just happen to have replied to the forum entry in the mean time?

                 ...

            • 3. Re: THEME AND STYLE IMPOSTORS - make theme management IMPOSSIBLE in multi-file solutions

                   ok...

                   You are fully correct to say that I am NOT criticizing the theme-import function ; this works perfectly - ONCE you have discovered that it does what it does.

                   

              That said, I'm not sure if I agree with how you expect Copy and Paste to work. Within all of FileMaker, like copying and pasting fields, tables, or scripts, if you paste multiple times, you will end up with multiple copies (with a number added at the end). Pasting in all of FileMaker does not overwrite things in the past but create new versions that are completely different than previous versions

                   True, but no other copy/paste function offers the option to update the existing objects in the target file.

                   If you import or paste a theme and choose DON'T overwrite, I would of course expect the usual behavior of "myTheme 2", "myTheme 3", etc.

                   I would nevertheless expect the import and copy/paste functions to work exactly as for custom functions (in my email I point out that themes, like CFs are ONLY referenced from the current file and need NOT retain internal IDs because of external references - because there are none.)

                   Phrasing that the other way round: I do not expect import and copy/paste to LOOK exactly the same but produce a devastating difference.

                   (more to come…)

              • 4. Re: THEME AND STYLE IMPOSTORS - make theme management IMPOSSIBLE in multi-file solutions
                mrwatson-gbs

                1/2 solved!

                 

                • In fm14 styles are now safely rename able without  breaking their updatability.
                • Renaming Themes, however still breaks their updatability.

                 

                Fixing this is necessary in order to Improve UX of Layouting with Themes and Styles

                 

                Thank you.