dbTalk Databases Forums  

go to tab?

comp.databases.filemaker comp.databases.filemaker


Discuss go to tab? in the comp.databases.filemaker forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
lists@notyourhomework.net
 
Posts: n/a

Default go to tab? - 07-13-2007 , 12:40 AM






When I leave a layout to visit a related record I'd like to return to
the same place. If I'm on tabbed layout I seem to be returned to the
default tab, rather than the one I was working from. Can I keep track
of the tab that I was on and go back there?

malcolm

Reply With Quote
  #2  
Old   
Chris Brown
 
Posts: n/a

Default Re: go to tab? - 07-13-2007 , 07:43 PM






lists (AT) notyourhomework (DOT) net wrote:
Quote:
When I leave a layout to visit a related record I'd like to return to
the same place. If I'm on tabbed layout I seem to be returned to the
default tab, rather than the one I was working from. Can I keep track
of the tab that I was on and go back there?

malcolm
FM 8.5 you can use object name , for the tab. Parse it to a variable
($$_Return) before leaving. Create a Return script and button; I use one
on every layout. With the right script sequence, you can make it a back
and forth rather than just simple return.

If in FM8 (no Object name) use a field unique to the tab; I create a set
of globals: g_Tab1, g_tab2... and add one discreetly to each tab.

regards

Chris


Reply With Quote
  #3  
Old   
Matt WIlls
 
Posts: n/a

Default Re: go to tab? - 07-14-2007 , 09:27 AM



In article <f7967f$npt$1 (AT) aioe (DOT) org> Chris
Brown<cbrown (AT) medicine (DOT) adelaide.edu.au> wrote:

Quote:
lists (AT) notyourhomework (DOT) net wrote:
When I leave a layout to visit a related record I'd like to return
to the same place. If I'm on tabbed layout I seem to be returned to
the default tab, rather than the one I was working from. Can I keep
track of the tab that I was on and go back there?

malcolm
FM 8.5 you can use object name , for the tab. Parse it to a variable
($$_Return) before leaving. Create a Return script and button; I use
one on every layout. With the right script sequence, you can make it
a back and forth rather than just simple return.

If in FM8 (no Object name) use a field unique to the tab; I create a
set of globals: g_Tab1, g_tab2... and add one discreetly to each tab.
regards

Chris

Please elaborate on the process of "Parse it to a variable ($$_Return)
before leaving."
Matt




Reply With Quote
  #4  
Old   
Chris Brown
 
Posts: n/a

Default Re: go to tab? - 07-14-2007 , 06:50 PM



Matt WIlls wrote:
Quote:
In article <f7967f$npt$1 (AT) aioe (DOT) org> Chris
Brown<cbrown (AT) medicine (DOT) adelaide.edu.au> wrote:

lists (AT) notyourhomework (DOT) net wrote:
When I leave a layout to visit a related record I'd like to return
to the same place. If I'm on tabbed layout I seem to be returned to
the default tab, rather than the one I was working from. Can I keep
track of the tab that I was on and go back there?

malcolm
FM 8.5 you can use object name , for the tab. Parse it to a variable
($$_Return) before leaving. Create a Return script and button; I use
one on every layout. With the right script sequence, you can make it
a back and forth rather than just simple return.

If in FM8 (no Object name) use a field unique to the tab; I create a
set of globals: g_Tab1, g_tab2... and add one discreetly to each tab.
regards

Chris


Please elaborate on the process of "Parse it to a variable ($$_Return)
before leaving."
Matt





I use a small script RETURN, in addition to my main navigation script.
These two could be combined with a conditional script parameter.
I use a global g_origin, in my user interface file table uAdmin, to hold
the last layout number.
The sequence in RETURN is important, to effect return (A to B), and
return again (B to A). This works a back and forth as many times as
needed. The global could probably be made a variable too.

parse the current layout number to variable
go to the last layout (held in g_origin)
reset g_origin to the variable value (i.e. the layout just left.



I use a single line script, Origin, that I call as a subscript, from
every other script that causes navigation to a different layout. This
could be a scipt line in each nav script, but its quicker to enter a
call the origin script, than it is to define the set field calc (i.e.
find the Get ( LayoutNumber ) in the list a thousand times over teh
course of a year...)


origin
Set Field [ uAdmin::g_origin; Get ( LayoutNumber ) ]



return
Set Variable [ $$_origin; Value:Get ( LayoutNumber ) ]
Go to Layout [ uAdmin::g_origin ]
Set Field [ uAdmin::g_origin; $$_origin ]
Perform Script [ “window” ]


do - something script (that causes a layout change)
Perform Script [ “origin” ]
#
#the rest of the script



I put a Return button in my main navigation bar on every layout



regards

Chris


Reply With Quote
  #5  
Old   
Malcolm Fitzgerald
 
Posts: n/a

Default Re: go to tab? - 07-16-2007 , 11:21 PM



On Sat, 14 Jul 2007 10:13:24 +0930
Chris Brown <cbrown (AT) medicine (DOT) adelaide.edu.au> wrote:

Quote:
lists (AT) notyourhomework (DOT) net wrote:
When I leave a layout to visit a related record I'd like to return to
the same place. If I'm on tabbed layout I seem to be returned to the
default tab, rather than the one I was working from. Can I keep track
of the tab that I was on and go back there?

malcolm
FM 8.5 you can use object name , for the tab. Parse it to a variable
($$_Return) before leaving. Create a Return script and button; I use one
on every layout. With the right script sequence, you can make it a back
and forth rather than just simple return.
How can I get the current tab name into a variable?

This is what I am trying but the tab isn't passing it's name into the
script. I suppose the script doesn't regard the tab as "active".

store layout data
set variable $$LastObject Get(ActiveLayoutObjectName)
set variable $$LastLayout Get(LayoutNumber)


return to layout
Go to Layout ($$LastLayout)
Go to Object ($$LastObject)




Reply With Quote
  #6  
Old   
Chris Brown
 
Posts: n/a

Default Re: go to tab? - 07-17-2007 , 09:55 PM



Malcolm Fitzgerald wrote:
Quote:
On Sat, 14 Jul 2007 10:13:24 +0930
Chris Brown <cbrown (AT) medicine (DOT) adelaide.edu.au> wrote:

lists (AT) notyourhomework (DOT) net wrote:
When I leave a layout to visit a related record I'd like to return to
the same place. If I'm on tabbed layout I seem to be returned to the
default tab, rather than the one I was working from. Can I keep track
of the tab that I was on and go back there?

malcolm
FM 8.5 you can use object name , for the tab. Parse it to a variable
($$_Return) before leaving. Create a Return script and button; I use one
on every layout. With the right script sequence, you can make it a back
and forth rather than just simple return.

How can I get the current tab name into a variable?

This is what I am trying but the tab isn't passing it's name into the
script. I suppose the script doesn't regard the tab as "active".

store layout data
set variable $$LastObject Get(ActiveLayoutObjectName)
set variable $$LastLayout Get(LayoutNumber)


return to layout
Go to Layout ($$LastLayout)
Go to Object ($$LastObject)



response to this recently:

Give each tab an object name (using the Info palette). In your script,
use the Go To Object step.
Howard Schlossberg

In Layout, display the Object Info window (View/Object Info)

Select the tab (so that the heavy black border is displayed on the tab)
Enter a name for the tab in the Object Name field in the Object Info
Window.
In your script, use the Go To Object script step, specifying the tab
name.
Matt



This may be an 8.5A feature; not in 8.0Adv

Chris


Reply With Quote
  #7  
Old   
Malcolm Fitzgerald
 
Posts: n/a

Default Re: go to tab? - 07-17-2007 , 10:54 PM



On Wed, 18 Jul 2007 12:25:02 +0930
Chris Brown <cbrown (AT) medicine (DOT) adelaide.edu.au> wrote:

Quote:
Malcolm Fitzgerald wrote:
On Sat, 14 Jul 2007 10:13:24 +0930
Chris Brown <cbrown (AT) medicine (DOT) adelaide.edu.au> wrote:

lists (AT) notyourhomework (DOT) net wrote:
When I leave a layout to visit a related record I'd like to return to
the same place. If I'm on tabbed layout I seem to be returned to the
default tab, rather than the one I was working from. Can I keep track
of the tab that I was on and go back there?

malcolm
FM 8.5 you can use object name , for the tab. Parse it to a variable
($$_Return) before leaving. Create a Return script and button; I use one
on every layout. With the right script sequence, you can make it a back
and forth rather than just simple return.

How can I get the current tab name into a variable?

This is what I am trying but the tab isn't passing it's name into the
script. I suppose the script doesn't regard the tab as "active".

store layout data
set variable $$LastObject Get(ActiveLayoutObjectName)
set variable $$LastLayout Get(LayoutNumber)


return to layout
Go to Layout ($$LastLayout)
Go to Object ($$LastObject)




response to this recently:

Give each tab an object name (using the Info palette). In your script,
use the Go To Object step.
Howard Schlossberg

In Layout, display the Object Info window (View/Object Info)

Select the tab (so that the heavy black border is displayed on the tab)
Enter a name for the tab in the Object Name field in the Object Info
Window.
In your script, use the Go To Object script step, specifying the tab
name.
Matt



This may be an 8.5A feature; not in 8.0Adv

Chris

Go to Object( objectname) works like a charm.

What I'm stuck on is the manner in which I obtain the object name for
the tab at the point that the user clicks on the tab. I've got 9, so
I'll have a quick look at the self function.


malcolm


Reply With Quote
  #8  
Old   
Malcolm Fitzgerald
 
Posts: n/a

Default Re: go to tab? - 07-18-2007 , 12:31 AM



I want to be able to go back to a layout and return to the tab that was
open when I left the layout.

I've looked at the 24u scripted tab control method. It's clever,
but it's messy. I don't like it.

It is easy to create a flexible "Go to Tab" script.

A "go to tab" script requires:

1. go to layout(x)
2. go to object(y)

that's so easy. All it needs is a layout number or name (x) and an
object name (y). If we could put the layout name and tab name into
global variables before we leave it, then we can use them to go back we
we want to return.

Getting layout names and numbers is easy. For some reason getting the
current tab name or tab number is not. What sort of oversight is this?
Why wasn't it put into v9? How hard is it?

So, the question becomes, how do we get the current tab name?

I've done it using LayoutObjectNames and GetLayoutObjectAttributes

I built a script called "GetCurrLayout". It looks like this:

GetCurrLayout Script
$ObjNames=LayoutObjectNames(get(filename);get(layo utname))
$i = 0
loop
set variable ($i; $i+1)
set variable ($tmpObject; GetValue($ObjNames, $i)
if (GetLayoutObjectAttribute ( $tmpObject ; "objectType" ) = "tab
panel" and GetLayoutObjectAttribute ( $tmpObject ; "isfrontTabPanel")
set variable ($$LastTabName; $tmpObject)


I call "GetCurrLayout" to set Layout and Tab variables, then go to
another layout. To return, I use these variables to go to layout and go
to object. This is the method for that script.

GoPrevLayout Script
set variable $lastLyt, $$LastLytNbr
set variable $lastTab, $$LastTabName
do script "GetCurrLayout" ## sets the global variables again
go to layout ($lastLyt)
go to object ($lastTab)


I hope this is useful.


malcolm



There you are.

Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.