Object Names
SeedCodeComplete3.ObjectNames History
Hide minor edits - Show changes to output
Changed line 17 from:
%center% %newwin width=440px% [[http://www.seedcode.com/rootimages/stikipad/complete13/GetObjectName.png|http://www.seedcode.com/rootimages/stikipad/complete13/ObjectName.png]]
to:
%center% %newwin width=440px% [[http://www.seedcode.com/rootimages/stikipad/complete13/GetObjectName.png|http://www.seedcode.com/rootimages/stikipad/complete13/GetObjectName.png]]
Changed lines 14-15 from:
to:
Although far from foolproof, we've attempted to mitigate this issue for our navigation routine with the helper script '''Get Object Name (cell; object)''' This script will attempt to find the actual object based on the desired name, and return it for the Go To Object step, etc.. You can pass this script two values (so it uses the [[ScriptParameters|#parameters]] method for passing these parameters. The cell parameter is the name of the enclosing object to help narrow the search.
%block text-align=center% Looking For Objects With Unintended Names
%center% %newwin width=440px% [[http://www.seedcode.com/rootimages/stikipad/complete13/GetObjectName.png|http://www.seedcode.com/rootimages/stikipad/complete13/ObjectName.png]]
%block text-align=center% Looking For Objects With Unintended Names
%center% %newwin width=440px% [[http://www.seedcode.com/rootimages/stikipad/complete13/GetObjectName.png|http://www.seedcode.com/rootimages/stikipad/complete13/ObjectName.png]]
Added lines 1-15:
!! Layout Object Names in SeedCode Complete
Object naming is an important part of SeedCode Complete and is important to much of its functionality. [[ObjectNavigation]] relies heavily on Object Names. We also use Object Names to determine if an Object is in focus or if a certain Slide Panel is at the front using the GetLayoutObjectAttribute() function. Changing these names can break references in scripts and on objects themselves like the Hide calculation so should generally be avoided.
!! Copying and Duplicating Named Layout Objects
FileMaker enforces that Object names are unique on a particular layout, so there's no question which Object is being references, so if you Copy or Duplicate an Object on a layout, a suffix like "2" or"copy" will be added to the Object Name likely breaking any references to that object from any scripts or calculations. It's not uncommon to do this and then delete the original properly named object, even for experienced developers, so it's a good idea to double check your object names as you go.
Using the expression '''LayoutObjectNames ( Get ( FileName ) ; Get ( LayoutName ) )''' will produce a list of objects so you can scan for any troublemakers in the data viewer.
%block text-align=center% Looking For Objects With Unintended Names
%center% %newwin width=440px% [[http://www.seedcode.com/rootimages/stikipad/complete13/ObjectNames.png|http://www.seedcode.com/rootimages/stikipad/complete13/ObjectNames.png]]
We've attempted to mitigate this issue a little by using the helper script '''Get Object Name (cell; object)''' which will attempt to find the actual object based on the desired name. You can pass this script two values (so it uses the [[ScriptParameters|#parameters]] method for passing these parameters.
Object naming is an important part of SeedCode Complete and is important to much of its functionality. [[ObjectNavigation]] relies heavily on Object Names. We also use Object Names to determine if an Object is in focus or if a certain Slide Panel is at the front using the GetLayoutObjectAttribute() function. Changing these names can break references in scripts and on objects themselves like the Hide calculation so should generally be avoided.
!! Copying and Duplicating Named Layout Objects
FileMaker enforces that Object names are unique on a particular layout, so there's no question which Object is being references, so if you Copy or Duplicate an Object on a layout, a suffix like "2" or"copy" will be added to the Object Name likely breaking any references to that object from any scripts or calculations. It's not uncommon to do this and then delete the original properly named object, even for experienced developers, so it's a good idea to double check your object names as you go.
Using the expression '''LayoutObjectNames ( Get ( FileName ) ; Get ( LayoutName ) )''' will produce a list of objects so you can scan for any troublemakers in the data viewer.
%block text-align=center% Looking For Objects With Unintended Names
%center% %newwin width=440px% [[http://www.seedcode.com/rootimages/stikipad/complete13/ObjectNames.png|http://www.seedcode.com/rootimages/stikipad/complete13/ObjectNames.png]]
We've attempted to mitigate this issue a little by using the helper script '''Get Object Name (cell; object)''' which will attempt to find the actual object based on the desired name. You can pass this script two values (so it uses the [[ScriptParameters|#parameters]] method for passing these parameters.