Jump to content

This topic is 7525 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted

For the life of me, I can find no practical use for FieldBounds().

I thought it might be a hold-over from an old version but it remains in vs. 7.

FieldBounds ( fileName ; layoutName ; fieldName )

Since a field's boundaries never change unless the Developer changes it, we don't need this information. All I can think of is that, if a User is given Design privileges, a script may wish to check it to be sure they didn't move it before continuing a script.

Does anyone have any practical uses for this function? I have been considering this function's purpose for 18 months and can see no way to use it. confused.gif

Posted

Maybe you could use a couple of them to build a layout with a lot of fields from external files which have to be in the exact identical position and you don't want to switch all the time using "Object Size"? But I'm not sure, if this is useful

Posted

But scripts do not run in Layout Mode. If they could, it would be useful.

Which implies it's only informational. And who would care what the dimensions were in Browse mode? As a calculation? I have played with it and it makes no sense to me.

Posted

Well,

Say you have a script GoToField[YourField, select] and a layout where (according to your screen resolution or Layout size) this field can be visible only by scrolling.

The GoToField[YourField, select] will force FM to scroll up to the 'YourField', and will stop just there, with the lower part of your window set to the lower pixel of this 'YourField'.

If for some esthetic reasons, you'd prefer your script to scroll down one page or down the Layout rather than stoping just below this 'YourField', then you'd use a script of type :

GoToField[YourField, Select]

If [MiddleWords(FieldBounds(Status(CurrentFileName), Status(CurrentLayoutName), Status(CurrentFieldName));2;1)>gYourLayoutHeight (can be Status(CurrentScreenHeighth)]

Scroll Window (down)**

Else

Scroll Window (up)

** not sure of this script step name

Surely there are better uses of such functions...

My 2 cents.

Posted

MoonShadow said:

For the life of me, I can find no practical use for FieldBounds().

Does anyone have any practical uses for this function? I have been considering this function's purpose for 18 months and can see no way to use it. confused.gif

Have you ever tried to maintain a complicated layout? Have you ever had to delete obsolete fields, for instance? Have you ever used Metadata Magic reports? With this function you know where to go on the layout. Sometimes in complicated layouts, especially layered layouts, and object can be hard to find. And how about tool tips? Since this information has to be available so that instant web publishing knows how to draw the layout, then it is also available to us. When some of the layout automation tools start arriving, this information will be of additiional value.
Posted

Hi MoonShadow,

If you have *not* explored the internals of your files, you really should do so. I would recommend you go to FM Files - Developers' Area - Analysis Tools and download some of the utilities available there, including:

MetadataMagic by New Millennium

Analyzer 3.0 By: Waves in Motion

Analyzer Lite By: Waves in Motion

DocuScript 2.0 By: Waves in Motion

Visualizer 1.0 By: Waves in Motion

Brushfire153d_macfull_xAp7 By: Chaparral Software

Viewing your files using one or all of these tools can be a real eye opener.

HTH

Lee

yay.gif

This topic is 7525 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.