posx_filemakerclipboard
TRANSCRIPT
FileMakerClipboard
Pause[X]LondonPeter Wagemans - Koen Van Hulle
Peter Wagemans
• Claris Technical Support
• FileMaker Developer for SHpartners
• Developer of DoScript, DoSQL and Clip Manager (myFMbutler)
• Clarify.net FileMaker Forum (Dutch)
Koen Van Hulle
• FileMaker “7...11” Certi!ed Developer
• SHpartners - myFMbutler
• Clarify.net
• myFMbutler Clip Manager 4
• http://twitter.com/koenvanhulle
Let’s talk about ...
• FileMaker Clipboard
• Tools
• and what you can do with it.
What is the clipboard?
• a place on the computer where we copy to, and paste from
• we can copy data in 1 application, and paste in another application
• but sometimes we can’t
Clipboard Flavours
• different types of data
• “text”
• picture data types
• ...
• multiple #avours of the same data can be simultaneously put on the clipboard
Hello おはようTEXT UTF-8 UTF-16 RTF
Helloおはよう
Helloおはよう
Helloおはよう
{\rtf1\ansi\ansicpg1252\cocoartf1038\cocoasubrtf360{\fonttbl\f0\fnil\fcharset0 MyriadPro-Regular;}{\colortbl;\red255\green255\blue255;\red61\green94\blue118;}\deftab920\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardeftab920\qc\pardirnatural
\f0\fs168 \cf2 \expnd0\expndtw0\kerning0\up0 \nosupersub \ulnone \outl0\strokewidth0 \strokec2 Hello
48 65 6c 6c 6f 20 82 a8 82 cd 82 e6 82 a4
48 65 6c 6c 6f 20 e3 81 8a e3 81 af e3 82 88 e3 81 86
ff fe 48 00 65 00 6c 00 6c 00 6f 00 20 00 4a 30 6f 30 88 30 46 30
7b 5c 72 74 66 31 5c 61 6e 73 69 5c 61 6e 73 69 63 70 67 31 32 35 32 5c 63 6f 63 6f 61 72 74 66 31 30 33
Clipboard Flavors
• When passing clip #avours between applications, the receiving application picks from the list of offered #avours, depending on the context.
• Sometimes unexpected behavior
An example• Copy an image from a website in Safari
public.tiff
public.url http://evbdn.eventbrite.com/s3-s3/eventlogos/17816677/1961223071-3.png
Apple URL pastboard type
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"><plist version="1.0"><array> <string>http://evbdn.eventbrite.com/s3-s3/eventlogos/17816677/1961223071-3.png</string> <string></string></array></plist>
... ...
FileMaker Clipboard
• XML
• UTF-8
• Similar to DDR (UTF-16)
FileMaker’s clipboard !avours
• layout objects
• tables
• !elds
• scripts
• script steps
• custom functions
Layout objects
• technical term for the #avour: “XMLO”
• the XMLO #avour is not the only one
• on MacOS, there are extra PDF #avours
• on Windows, there is an extra BMP #avour
• this explains why you can copy a layout and paste it as a picture somewhere else
Fields and Tables• XMFD and XMTB• Only base table info• No relationships
Scripts and Script Steps
• XMSC and XMSS
• Language is important!
• FileMaker doesn’t look to the ID’s when pasting, but to the strings.
Custom Functions
• XMFN
• Since FileMaker Pro 11 Advanced
• One or more custom functions
Tools
• 360Works ScriptMaster plug-in
• 2Empower Clipboard Explorer
• Camp Software - FMClips
• TWDesigns - FileMaker Clipboard reader
• Work#ow Data Systems - fmXRaySpecs
• myFMbutler Clip Manager
360Works ScriptMaster
• FileMaker Plug-in
• Read/write FileMaker clipboard
• Groovy, build your own plug-ins
• $95
• http://www.360works.com/scriptmaster/
2Empower Clipboard Explorer
• FileMaker Plug-in
• Read/Write FileMaker clipboard
• Free
• http://www.dracoventions.com/products/2empowerFM/family/clipboard.php
Camp Software FMClips
• FileMaker database with 2Empower Clipboard explorer plug-in
• Read/Write FileMaker clipboard
• Store FileMaker Clips
• $19
• http://campsoftware.com/products/fmclips/
TWDesignsFileMaker Clipboard reader
• AppleScript
• Read/Write FileMaker clipboard
• $19
• http://www.twdesigns.com/products/FileMakerClipboardReader.php
Workflow Data SystemsfmXRaySpecs
• Stand-alone app
• Inspects current Layout
• Info pallet
• $79
• http://www.work#owdata.com/fmxrayspecs.html
myFMbutlerClip Manager
• Stand-alone app
• Read/Write FileMaker Clipboard
• Visualizes and analyzes Clips
• Store FileMaker Clips
• EUR 59 ($80)
• http://www.myfmbutler.com/clipmanager
Why?
How much time do you spend ...
• In a typical mid-size development
• de!ning !elds?
• writing scripts?
• making layouts?
Layouts and reports
Scripts
Schema
Bene"ts• Speed up your development time
Bene"ts• Speed up your development time
• Code sharing
• Version Control (custom functions)
• Help my solution is damaged! (and the backup plan failed ...)
• Hopefully you have a DDR (XML)
DDR to the rescue
Layout Objects
XMLO DDR<?xml version="1.0" encoding="UTF-8"?><fmxmlsnippet type="LayoutObjectList"> <Layout> <ObjectStyle> </ObjectStyle> <Object> </Object> ... </Layout></fmxmlsnippet>
<LayoutCatalog> <Layout> <Table/> <CustomMenuSet/> <Options/> <ObjectStyle> </ObjectStyle> <Object> </Object> ... </Layout></LayoutCatalog>
Fields and TablesXMTB DDR
<?xml version="1.0" encoding="UTF-8"?><fmxmlsnippet type="FMObjectList"> <BaseTable> <Field/> ... </BaseTable></fmxmlsnippet>
<BaseTableCatalog> <BaseTable> <FieldCatalog> <Field/> </FieldCatalog> </BaseTable></BaseTableCatalog>
Scripts and Script Steps
• XMSS and XMSS XML = DDR XML
Custom FunctionsXMFN DDR
<?xml version="1.0" encoding="UTF-8"?><fmxmlsnippet type="FMObjectList"> <CustomFunction> <Calculation> </Calculation> </CustomFunction></fmxmlsnippet>
<CustomFunctionCatalog> <CustomFunction> <Calculation> </Calculation> <DisplayCalculation> <Chunk> </Chunk> </DisplayCalculation> </CustomFunction></CustomFunctionCatalog>
Which order
• Custom Functions (if not !eld based) ✔• Tables with key !elds only (if not calc
based) ✔• Create all TO and relationships
• use fake relationships if required• Create value lists if used in validations
• Leave data empty if based on !elds• Paste other !elds ✔ • Check relationships
Which order
• Create all other value lists or correct them
• Create all layouts, but leave the empty
• Create all scripts ✔
• Paste all layout content ✔
Don’t forget
• Custom Menu’s
• Custom Extended privileges
• Security
• File Options
• Layout options and Layout Script Triggers
• Test, test, test ...
Discussion