Jump to content

10 Tidbits from FM7 Tech Notes


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

Recommended Posts

Very paraphrased, the technotes have details. I listed ones that I thought are common issues. The 10 is a coincidence, not a reference to Dave Letterman's Top 10...

1) Boolean calculations (including scripts) are now short-circuited.

2) FM7 uses TrueType fonts only.

3) FM7 uses a new anti-aliasing engine for text and vector graphics.

4) Count() now evaluates only non-empty data (it used to include empties)

5) Numeric expressions including text return 0 instead of empty.

6) Substitute() has been expanded to allow nesting in one call.

7) Semicolon is the new calculation parameter separator, comma was the old.

8) Field validations occur on record commit, not on field exit.

9) Boolean fields do not support True, etc., 0 and 1 must be used.

10) In a columnar list layout, editable fields can reside in any part, not just the Body.

Sam

Version: v7.x

Platform: Mac OS X Panther

Link to comment
Share on other sites

A few more text oriented features:

11) Calculation engine now preserves text styles (whether you want it to or not ;-)

12) You can set Font or Styles via calculation

13) Text engine supports 2-byte languages, such as Japanese

14) "Furigana" option can auto-enter a translation of language into a 2nd field.

Link to comment
Share on other sites

Boolean calcs "short-circuited"? I'm not sure what that means... Will FM7 parse "X and Y and Z" without need for "X and (Y and Z)", as long as different parens don't actually make a difference? Very happy not to have to count out "Substitute(Substitute(Substitute(...)))" again!

Link to comment
Share on other sites

I think what CyborgSam may have been trying to explain is that items such as the CAse and Choose functions no longer evaluate all the rests and all the results before returning the first true one.

BTW, that list may need some caveates to several of its points, especially about field validations and record commits.

Steven

Link to comment
Share on other sites

To quote FileMaker's Tech info article 108816, at http://www.filemaker.com/ti/108816.html

"FileMaker Pro now provides for short-circuiting of evaluations. This means that affected functions and operators perform only the work that they need to do without evaluating everything that is written in the calculation."

It is worth reading this article for insight into the issues, especially if you use external functions.

Short circuiting (in any language) means that calculations are exited as soon as a result is found. Short circuiting does not affect the language's order of precedence of operators, parentheses, variables, functions, etc.

Some examples:

Expression: X or Y or Z, with X=True: X is evaluated, Y and Z are not.

Expression: If( A and (B or C), V, W), with A=B=True: A, B, and V are evaluated, C and W are not.

Expression: Case( X=23, Y, A=M*N, Z, B=(P*Q)/R, S, T) with X=14, A=10, M=5, and N=2: X, A, M, N, and Z are evaluated, Y, B, P, Q, R, S, and T are not.

Expression: ((A*: = 24) or C with A=3, B=17, and C=True: A, B and C are evaluated. FileMaker (like most languages), has it's order of precedence from left to right (all other factors being equal). The expression ((A*: = 24) is calculated before C.

Programming Tip: to take advantage of short circuiting, arrange expression so the most common results will trigger short-circuiting with minimum evaluation. For example, if you're checking age groups and you know that the most common demographic in your DB is 15-19, the second most common is 20-25, etc., do this:

Case(

(Age >= 15) and (Age <= 19), CommonResult,

(Age >= 20) and (Age <= 25), Result25,

(Age < 12), Result12,

...

OldFartsLikeSam

)

Version: v7.x

Platform: Mac OS X Panther

Link to comment
Share on other sites

"You can set font and size by calculation"

Question:

Does that mean I could setup some sort of preferences screen for users to set default fonts on reports different then the layout font?? I have "canned" reports that the user can select (this is in a runtime appl.) Some have asked if they could select a different font for the header information. Will that be possible with this new feature?

Link to comment
Share on other sites

This topic is 7369 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.