<?xml version="1.0" encoding="UTF-8"?><!-- generator="wordpress/2.3.3" -->
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	>
<channel>
	<title>Comments on: Restoring Active Tab State</title>
	<link>http://sixfriedrice.com/wp/restoring-active-tab-state/</link>
	<description>smart business solutions</description>
	<pubDate>Thu, 28 Aug 2008 17:49:00 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.3.3</generator>
		<item>
		<title>By: Ralph Nusser</title>
		<link>http://sixfriedrice.com/wp/restoring-active-tab-state/#comment-944</link>
		<dc:creator>Ralph Nusser</dc:creator>
		<pubDate>Tue, 22 Jan 2008 06:41:27 +0000</pubDate>
		<guid>http://sixfriedrice.com/wp/restoring-active-tab-state/#comment-944</guid>
		<description>The fmxml was pruned (second try):

Before:



After [ name = "tab_01 ] :

</description>
		<content:encoded><![CDATA[<p>The fmxml was pruned (second try):</p>
<p>Before:</p>
<p>After [ name = &#8220;tab_01 ] :</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ralph Nusser</title>
		<link>http://sixfriedrice.com/wp/restoring-active-tab-state/#comment-943</link>
		<dc:creator>Ralph Nusser</dc:creator>
		<pubDate>Tue, 22 Jan 2008 06:37:50 +0000</pubDate>
		<guid>http://sixfriedrice.com/wp/restoring-active-tab-state/#comment-943</guid>
		<description>You can script the names of your tab panel objects by manipulating the fmxml of FileMaker objects and save some development time.

Before:



After [name="tab_01]:



when you use a clipboard plug-in:
(1) MAC http://www.myfmbutler.com/index.lasso?p=422
(2) MAC http://www.quart-edv.de/plugins/pasteboard_en.html
(3) WIN http://www.schubec.com/en/product_details_883823.html
(4) WIN http://www.dracoventions.com/

Sample file with the full fmxml:
http://www.filemaker-magazin.de/fmmforum/79385.html

Happy clipboarding Ralph Nusser</description>
		<content:encoded><![CDATA[<p>You can script the names of your tab panel objects by manipulating the fmxml of FileMaker objects and save some development time.</p>
<p>Before:</p>
<p>After [name=&#8221;tab_01]:</p>
<p>when you use a clipboard plug-in:<br />
(1) MAC <a href="http://www.myfmbutler.com/index.lasso?p=422" rel="nofollow">http://www.myfmbutler.com/index.lasso?p=422</a><br />
(2) MAC <a href="http://www.quart-edv.de/plugins/pasteboard_en.html" rel="nofollow">http://www.quart-edv.de/plugins/pasteboard_en.html</a><br />
(3) WIN <a href="http://www.schubec.com/en/product_details_883823.html" rel="nofollow">http://www.schubec.com/en/product_details_883823.html</a><br />
(4) WIN <a href="http://www.dracoventions.com/" rel="nofollow">http://www.dracoventions.com/</a></p>
<p>Sample file with the full fmxml:<br />
<a href="http://www.filemaker-magazin.de/fmmforum/79385.html" rel="nofollow">http://www.filemaker-magazin.de/fmmforum/79385.html</a></p>
<p>Happy clipboarding Ralph Nusser</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Tim Dietrich</title>
		<link>http://sixfriedrice.com/wp/restoring-active-tab-state/#comment-880</link>
		<dc:creator>Tim Dietrich</dc:creator>
		<pubDate>Wed, 28 Nov 2007 14:22:47 +0000</pubDate>
		<guid>http://sixfriedrice.com/wp/restoring-active-tab-state/#comment-880</guid>
		<description>Geoff --

I've been using the "new window" method (the one that Sean Mills mentioned) myself and it works very well. However, I can also see why opening a new window might not be ideal at times (especially for Windows users). 

That all being said, couldn't you also do something like this?

[1] User clicks a button, which is on a specific tab. The button calls a script and passes the name of the tab (the object name) as a script parameter.

[2] The script runs as it normally would (changes layouts, modifies some data, etc). At the end of the script, it returns to the original layout, and then goes to the tab that the user was on. For example:

Go to Layout [ Original Layout ]
Go to Object [ Object Name: Get ( ScriptParameter ) ]

I haven't tried this myself, but looks like a simple way to do what you're trying to do.

-- Tim</description>
		<content:encoded><![CDATA[<p>Geoff &#8211;</p>
<p>I&#8217;ve been using the &#8220;new window&#8221; method (the one that Sean Mills mentioned) myself and it works very well. However, I can also see why opening a new window might not be ideal at times (especially for Windows users). </p>
<p>That all being said, couldn&#8217;t you also do something like this?</p>
<p>[1] User clicks a button, which is on a specific tab. The button calls a script and passes the name of the tab (the object name) as a script parameter.</p>
<p>[2] The script runs as it normally would (changes layouts, modifies some data, etc). At the end of the script, it returns to the original layout, and then goes to the tab that the user was on. For example:</p>
<p>Go to Layout [ Original Layout ]<br />
Go to Object [ Object Name: Get ( ScriptParameter ) ]</p>
<p>I haven&#8217;t tried this myself, but looks like a simple way to do what you&#8217;re trying to do.</p>
<p>&#8211; Tim</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Koen Van Hulle</title>
		<link>http://sixfriedrice.com/wp/restoring-active-tab-state/#comment-876</link>
		<dc:creator>Koen Van Hulle</dc:creator>
		<pubDate>Sun, 25 Nov 2007 10:57:34 +0000</pubDate>
		<guid>http://sixfriedrice.com/wp/restoring-active-tab-state/#comment-876</guid>
		<description>What should be the definition of a "last used tab"?
The last one you clicked on? There can be multiple front tabs from tab panels that are the "most front tab".

A couple of weeks ago I posted a custom function on our blog, that I always use in our solutions:

http://blog.myfmbutler.com/?p=34
// FW_GetActiveTabs ( init; theList ) 
/*
Version History
==========
20070106 â€“ KVH â€“ Original version

Description
=======
Get list of all active tabs that are in the front 

Usage
====
FW_GetActiveTabs ( 0 ; "" ) 
*/
Let 
( 
[ 
init = init + 1 
; 
objectList = LayoutObjectNames ( Get(FileName) ; Get(LayoutName) ) 
; 
tabToCheck =Â  Substitute( GetValue(objectList; init)Â  ; "Â¶" ; "") 
; 
parenttab = GetLayoutObjectAttribute ( tabToCheck ; "enclosingObject" ) 
; 
iscurrenttab = Case( IsEmpty(tabToCheck) ;Â  0Â  ;Â  Â GetLayoutObjectAttribute ( tabToCheck ; "isFrontTabPanel")Â  and IsEmpty(parenttab) ; 1 ; GetLayoutObjectAttribute ( tabToCheck ; "isFrontTabPanel")Â  and PatternCount( "Â¶" &#38; theList &#38; "Â¶"; "Â¶" &#38;Â  parenttab &#38; "Â¶") ; 1Â  ;Â  0 ) 
; 
theList = theList &#38; If( iscurrenttab ;Â  Â tabToCheck &#38; "Â¶" ) 
] 
;Â  Â  
If(not IsEmpty(tabToCheck) ; FW_GetActiveTabs(init; theList) ; theList) 
)


Another Custom Function can be found on the website from RJ Cologon: http://www.nightwing.com.au/FileMaker/demos.html
(Demo: TabMeister)

Regards,

Koen</description>
		<content:encoded><![CDATA[<p>What should be the definition of a &#8220;last used tab&#8221;?<br />
The last one you clicked on? There can be multiple front tabs from tab panels that are the &#8220;most front tab&#8221;.</p>
<p>A couple of weeks ago I posted a custom function on our blog, that I always use in our solutions:</p>
<p><a href="http://blog.myfmbutler.com/?p=34" rel="nofollow">http://blog.myfmbutler.com/?p=34</a><br />
// FW_GetActiveTabs ( init; theList )<br />
/*<br />
Version History<br />
==========<br />
20070106 â€“ KVH â€“ Original version</p>
<p>Description<br />
=======<br />
Get list of all active tabs that are in the front </p>
<p>Usage<br />
====<br />
FW_GetActiveTabs ( 0 ; &#8220;&#8221; )<br />
*/<br />
Let<br />
(<br />
[<br />
init = init + 1<br />
;<br />
objectList = LayoutObjectNames ( Get(FileName) ; Get(LayoutName) )<br />
;<br />
tabToCheck =Â  Substitute( GetValue(objectList; init)Â  ; &#8220;Â¶&#8221; ; &#8220;&#8221;)<br />
;<br />
parenttab = GetLayoutObjectAttribute ( tabToCheck ; &#8220;enclosingObject&#8221; )<br />
;<br />
iscurrenttab = Case( IsEmpty(tabToCheck) ;Â  0Â  ;Â  Â GetLayoutObjectAttribute ( tabToCheck ; &#8220;isFrontTabPanel&#8221;)Â  and IsEmpty(parenttab) ; 1 ; GetLayoutObjectAttribute ( tabToCheck ; &#8220;isFrontTabPanel&#8221;)Â  and PatternCount( &#8220;Â¶&#8221; &amp; theList &amp; &#8220;Â¶&#8221;; &#8220;Â¶&#8221; &amp;Â  parenttab &amp; &#8220;Â¶&#8221;) ; 1Â  ;Â  0 )<br />
;<br />
theList = theList &amp; If( iscurrenttab ;Â  Â tabToCheck &amp; &#8220;Â¶&#8221; )<br />
]<br />
;Â  Â <br />
If(not IsEmpty(tabToCheck) ; FW_GetActiveTabs(init; theList) ; theList)<br />
)</p>
<p>Another Custom Function can be found on the website from RJ Cologon: <a href="http://www.nightwing.com.au/FileMaker/demos.html" rel="nofollow">http://www.nightwing.com.au/FileMaker/demos.html</a><br />
(Demo: TabMeister)</p>
<p>Regards,</p>
<p>Koen</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Tom Elliott</title>
		<link>http://sixfriedrice.com/wp/restoring-active-tab-state/#comment-873</link>
		<dc:creator>Tom Elliott</dc:creator>
		<pubDate>Sun, 25 Nov 2007 00:35:29 +0000</pubDate>
		<guid>http://sixfriedrice.com/wp/restoring-active-tab-state/#comment-873</guid>
		<description>Hi Geoff,

I love this solution ....  but .....

I believe Rob's point about nested tabs is valid.

In seems that the attribute "IsFrontTabPanel" is True for one tab of EVERY tab control - even those that are within a tab for which "IsFrontTabPanel" is false!

For a layout with 3 tab controls as follows:
"main" tab control with 2 tabs named "tab1" and "tab2"
within tab1: a control with 2 tabs named "tab1a" and "tab1b"
within tab2: a control with 2 tabs named "tab2a" and "tab2b"

even when tab2 is NOT at the front, the attribute "IsFrontTabPanel" is True for one or other of tab2a or tab2b, this tab therefore appears in the memorized list and, since it is after tab1 (and it's enclosed tabs) in the list, when the restore script is run tab2/tab2a will be showing.

My fix for this is to amend the memorize script:

1. DON'T get rid of the &#60;'s in GetLayoutObjectNames
2. change the If statement in the Loop to:

&lt;pre&gt;
&lt;code&gt;
If [GetLayoutObjectAttribute ( $object ; "IsFrontTabPanel" ) ]
   Set Variable [ $front_tabs, Value: $front_tabs &#38; $object &#38; Â¶ ]
Else If [GetLayoutObjectAttribute ( $object ; "ObjectType" ) = "tab panel"]
   Set Variable [$brackets; Vaue:0]
   Loop
      Set Variable [$i; Value: $i + 1]
      If [GetValue ($object_names ; $i ) = "&#60;"]
         Set Variable [$brackets; Value: $brackets + 1]
      Else If [GetValue ($object_names ; $i ) = "&#62;"]
         Set Variable [$brackets; Value: $brackets - 1]
      End If
      Exit Loop If [$brackets = 0]
   End Loop
End If
&lt;/code&gt;
&lt;/pre&gt;

I haven't tested this throughly but so far it seems to be working; I daresay it could also be tidied up a bit, or possibly a recursive CF would be better?

(Why, oh why, didn't they include an option in Default Front Tab for "last used tab"?)

all the best

Tom</description>
		<content:encoded><![CDATA[<p>Hi Geoff,</p>
<p>I love this solution &#8230;.  but &#8230;..</p>
<p>I believe Rob&#8217;s point about nested tabs is valid.</p>
<p>In seems that the attribute &#8220;IsFrontTabPanel&#8221; is True for one tab of EVERY tab control - even those that are within a tab for which &#8220;IsFrontTabPanel&#8221; is false!</p>
<p>For a layout with 3 tab controls as follows:<br />
&#8220;main&#8221; tab control with 2 tabs named &#8220;tab1&#8243; and &#8220;tab2&#8243;<br />
within tab1: a control with 2 tabs named &#8220;tab1a&#8221; and &#8220;tab1b&#8221;<br />
within tab2: a control with 2 tabs named &#8220;tab2a&#8221; and &#8220;tab2b&#8221;</p>
<p>even when tab2 is NOT at the front, the attribute &#8220;IsFrontTabPanel&#8221; is True for one or other of tab2a or tab2b, this tab therefore appears in the memorized list and, since it is after tab1 (and it&#8217;s enclosed tabs) in the list, when the restore script is run tab2/tab2a will be showing.</p>
<p>My fix for this is to amend the memorize script:</p>
<p>1. DON&#8217;T get rid of the &lt;&#8217;s in GetLayoutObjectNames<br />
2. change the If statement in the Loop to:</p>
<pre>
<code>
If [GetLayoutObjectAttribute ( $object ; "IsFrontTabPanel" ) ]
   Set Variable [ $front_tabs, Value: $front_tabs &amp; $object &amp; Â¶ ]
Else If [GetLayoutObjectAttribute ( $object ; "ObjectType" ) = "tab panel"]
   Set Variable [$brackets; Vaue:0]
   Loop
      Set Variable [$i; Value: $i + 1]
      If [GetValue ($object_names ; $i ) = "&lt;"]
         Set Variable [$brackets; Value: $brackets + 1]
      Else If [GetValue ($object_names ; $i ) = "&gt;"]
         Set Variable [$brackets; Value: $brackets - 1]
      End If
      Exit Loop If [$brackets = 0]
   End Loop
End If
</code>
</pre>
<p>I haven&#8217;t tested this throughly but so far it seems to be working; I daresay it could also be tidied up a bit, or possibly a recursive CF would be better?</p>
<p>(Why, oh why, didn&#8217;t they include an option in Default Front Tab for &#8220;last used tab&#8221;?)</p>
<p>all the best</p>
<p>Tom</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Rob Westergaard</title>
		<link>http://sixfriedrice.com/wp/restoring-active-tab-state/#comment-872</link>
		<dc:creator>Rob Westergaard</dc:creator>
		<pubDate>Sat, 24 Nov 2007 06:10:33 +0000</pubDate>
		<guid>http://sixfriedrice.com/wp/restoring-active-tab-state/#comment-872</guid>
		<description>Hi, Geoff.

When running the "Restore Tab States" does the order in which the object names are processed matter? I'm just wondering about the situation where you have nested tab panels and the "Go To Object..." step for the parent panel happens after the step for the nested panel. I haven't ever looked at the order of the object names returned by the LayoutObjectNames function to see if it somehow reflects nesting. Do you happen to know?

Thanks for another helpful post!

Rob Westergaard</description>
		<content:encoded><![CDATA[<p>Hi, Geoff.</p>
<p>When running the &#8220;Restore Tab States&#8221; does the order in which the object names are processed matter? I&#8217;m just wondering about the situation where you have nested tab panels and the &#8220;Go To Object&#8230;&#8221; step for the parent panel happens after the step for the nested panel. I haven&#8217;t ever looked at the order of the object names returned by the LayoutObjectNames function to see if it somehow reflects nesting. Do you happen to know?</p>
<p>Thanks for another helpful post!</p>
<p>Rob Westergaard</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Geoff Coffey</title>
		<link>http://sixfriedrice.com/wp/restoring-active-tab-state/#comment-871</link>
		<dc:creator>Geoff Coffey</dc:creator>
		<pubDate>Sat, 24 Nov 2007 05:03:05 +0000</pubDate>
		<guid>http://sixfriedrice.com/wp/restoring-active-tab-state/#comment-871</guid>
		<description>@Susan: That is a weakness. If you have *lots* of named objects, it can take some time to slog through them. As far as I know, there's no way to get just the tab panel names. I wonder if it might be faster if done as a recursive custom function? Not sure. But in my testing, this script has not been noticeably slow. Hmmm...lots to think about.</description>
		<content:encoded><![CDATA[<p>@Susan: That is a weakness. If you have *lots* of named objects, it can take some time to slog through them. As far as I know, there&#8217;s no way to get just the tab panel names. I wonder if it might be faster if done as a recursive custom function? Not sure. But in my testing, this script has not been noticeably slow. Hmmm&#8230;lots to think about.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Chris Kubica</title>
		<link>http://sixfriedrice.com/wp/restoring-active-tab-state/#comment-870</link>
		<dc:creator>Chris Kubica</dc:creator>
		<pubDate>Sat, 24 Nov 2007 02:54:37 +0000</pubDate>
		<guid>http://sixfriedrice.com/wp/restoring-active-tab-state/#comment-870</guid>
		<description>Six Fried Rice Labs, eh? ;)</description>
		<content:encoded><![CDATA[<p>Six Fried Rice Labs, eh? <img src='http://sixfriedrice.com/wp/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Susan Prosser</title>
		<link>http://sixfriedrice.com/wp/restoring-active-tab-state/#comment-869</link>
		<dc:creator>Susan Prosser</dc:creator>
		<pubDate>Sat, 24 Nov 2007 01:23:55 +0000</pubDate>
		<guid>http://sixfriedrice.com/wp/restoring-active-tab-state/#comment-869</guid>
		<description>Thanks, Geoff. I'd been pondering this very thing and you saved me lots of brain cycles, if not actual time -- read on.

Maybe it's a caveat, and maybe it's a nice bonus, but this script detects â€¢allâ€¢ named objects. On one layout, I'd copied a named field without realizing it, and had a painful number of named objects to loop through in $objectNames (Notes 1, Notes 2 ... Notes Infinity + 1). The script wasn't noticeably slower (in human terms), but it did act as a white glove test on what looked, to the naked eye, like a clean layout. Debugger produced a Treasure Hunt list of named objects. It took some slogging to find and un-name all the dear little things, but I have clean layouts as well as dependable tab controls now. :D</description>
		<content:encoded><![CDATA[<p>Thanks, Geoff. I&#8217;d been pondering this very thing and you saved me lots of brain cycles, if not actual time &#8212; read on.</p>
<p>Maybe it&#8217;s a caveat, and maybe it&#8217;s a nice bonus, but this script detects â€¢allâ€¢ named objects. On one layout, I&#8217;d copied a named field without realizing it, and had a painful number of named objects to loop through in $objectNames (Notes 1, Notes 2 &#8230; Notes Infinity + 1). The script wasn&#8217;t noticeably slower (in human terms), but it did act as a white glove test on what looked, to the naked eye, like a clean layout. Debugger produced a Treasure Hunt list of named objects. It took some slogging to find and un-name all the dear little things, but I have clean layouts as well as dependable tab controls now. <img src='http://sixfriedrice.com/wp/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' /></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Geoff Coffey</title>
		<link>http://sixfriedrice.com/wp/restoring-active-tab-state/#comment-868</link>
		<dc:creator>Geoff Coffey</dc:creator>
		<pubDate>Fri, 23 Nov 2007 23:46:04 +0000</pubDate>
		<guid>http://sixfriedrice.com/wp/restoring-active-tab-state/#comment-868</guid>
		<description>@Sean: Yes, that method will work for a lot of scenarios in FileMaker. But lots of folks don't like doing it more than absolutely necessary because it is unsightly (especially on Windows) and can sometimes lead to cumbersome scripts.</description>
		<content:encoded><![CDATA[<p>@Sean: Yes, that method will work for a lot of scenarios in FileMaker. But lots of folks don&#8217;t like doing it more than absolutely necessary because it is unsightly (especially on Windows) and can sometimes lead to cumbersome scripts.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
