Layouts do not remember last visited slide panel

Notes on the new SeedCode Complete template for FileMaker 13
Posts: 3
Joined: Thu Feb 12, 2015 8:44 am
PostPosted: Thu Feb 12, 2015 11:05 am
When navigating to Companies, the Contact Association panel is always shown, regardless of the last panel visited before moving away from Companies.
As far as I can tell, the problem is with script Company on Record Load, in the ElseIf statement that evaluates GetLayoutObjectAttribute ( $$sc_companyTargetPanel ; "IsFrontTabPanel" ). This seems to evaluate to True regardless of the actual panel shown. Possibly an FM bug, can't handle 3 deep nested panels?
Same problem with Invoices when the last visited panel is "Notes". When last visited panel is "PDF", works fine, so again leads me to suspect an FM bug in GetLayoutObjectAttribute when too many nested panels.
Can you come up with a workaround?
Thanks,

Yuval
SeedCode Staff
SeedCode Staff
Posts: 691
Joined: Mon Feb 28, 2011 2:47 pm
PostPosted: Fri Feb 13, 2015 11:26 am
Hi Yuval,

Thanks for the details! I'll take a look this Weekend!

Cheers!
-Jason
SeedCode Staff
SeedCode Staff
Posts: 691
Joined: Mon Feb 28, 2011 2:47 pm
PostPosted: Mon Feb 16, 2015 10:54 am
Hi Yuval,

This is "expected behavior" for GetLayoutObject attribute. However, I think I have a workaround with triggers, as the behavior you describe is what we want, and what it's doing now feels "buggy."

I should be able to test this today or tomorrow and will get back with you.

Thanks,
Jason
Posts: 3
Joined: Thu Feb 12, 2015 8:44 am
PostPosted: Wed Feb 18, 2015 7:52 am
Thanks Jason!
Can you explain why this is the expected behavior for GetLayoutObjectAttribute?
Yuval
SeedCode Staff
SeedCode Staff
Posts: 691
Joined: Mon Feb 28, 2011 2:47 pm
PostPosted: Wed Feb 18, 2015 8:19 am
Hi Yuval,

Right, I was referring to "IsFrontTabPanel." It returns true if it's the front panel within it's control, regardless of whether it's actually visible or in focus, so these nested controls will return these false positives. Technically, it is the front panel, so it's not really a FileMaker bug, although it's always felt like one.

I think just referencing the note sub-panels as the last panel visited, rather than the parent main info and notes panel, but I need to test that.

Thanks!
SeedCode Staff
SeedCode Staff
Posts: 691
Joined: Mon Feb 28, 2011 2:47 pm
PostPosted: Sun Mar 15, 2015 10:40 am
Hi Yuval,

I finally had a chance to look at this and the easiest fix is to replace the Else IF line in the Record Load script triggers with just an IF. This forces the trigger to go to the last panel, regardless of what it "thinks" is the front panel.

Screen Shot 2015-03-15 at 12.35.54 PM.png
Screen Shot 2015-03-15 at 12.35.54 PM.png (149.6 KiB) Viewed 14928 times


Please make that change in all the On Record Load script triggers and you should be all set:

Screen Shot 2015-03-15 at 12.38.56 PM.png
Screen Shot 2015-03-15 at 12.38.56 PM.png (66.75 KiB) Viewed 14928 times


Cheers!
-Jason
Posts: 3
Joined: Thu Feb 12, 2015 8:44 am
PostPosted: Mon Mar 16, 2015 2:42 pm
Thanks Jason!

Return to SeedCode Complete 13

Who is online

Users browsing this forum: No registered users and 2 guests

cron
(855) SEEDCODE
[email protected]
Follow us: