5

I am using Delphi/AppMethod XE6, and adding a Firemonkey Mobile HD form to a blank project.

On the form, I've dropped a BindSourceDB component and am viewing it in the Structure Window, There, I can see a ScopeMappings child property. I can also see the ScopeMappings property in the Object Inspector Window which shows it's of TScopeMappings type.

For the life of me, I CAN NOT figure out what this property is/does, and what ScopeMappings really are.

All I find from the Embarcadero documentation is the following at this URL: http://docwiki.embarcadero.com/Libraries/XE6/en/Data.Bind.DBScope.TBindSourceDB.ScopeMappings

Data.Bind.DBScope.TBindSourceDB.ScopeMappings

The ScopeMappings property specifies an owned collection whose elements are scope mappings. ScopeMappings are used to add name/value pairs that can be referenced by expressions that reference this source component.

Obviously, this isn't terribly helpful.

I've searched everywhere on the web, including here on SO and can't find anything. Please help.

Community
  • 1
  • 1
  • Can you tell what you're actually trying to do with the bindings? ("This documentation is unclear" is not a programming question.) – Warren P Aug 28 '14 at 13:24
  • 1
    There is a tutorial here, did you go through it? http://docwiki.embarcadero.com/RADStudio/XE6/en/Tutorial:_Using_LiveBinding_to_Create_an_Application_Without_Code – Warren P Aug 28 '14 at 13:25
  • 1
    Hey @WarrenP... I realize that... but, according to SO guidelines about On-Topic questions **[HERE](http://stackoverflow.com/help/on-topic)**... it doesn't have to be. ***Rather it should be***: *-a specific programming problem, or* *+a software algorithm, or* *+software tools commonly used by programmers; and is* *+a practical, answerable problem that is unique to software development* –  Aug 29 '14 at 16:56
  • 1
    @WarrenP - just saw the 2nd comment was yours too. Yes, thanks. I have. I have used bindings many times and have them working under many different scenarios. The issue is that I can't find ANY documentation, examples, or even theoretical write-ups on WHAT a ScopeMappings are, when I might use them, and how to implement them. You probably already know that Emb docs, in particular, the DocWiki is pretty bad, and it's not uncommon to have ONLY a class inheritance diagram and details of the type and interface, and linkes to methods, and properties WITHOUT any further explanation. :-( –  Aug 29 '14 at 17:03
  • 2
    I think that ScopeMappings are how you would register information to be visible within a Lexical Scope, making them available for invocation as a function within a binding expression. In other words, imagine I want to define a function `IsValidId()` that I could use to determine a boolean enable/disabled state, and then bind that to something. The docwiki lacks an example of how to write and invoke your own. Is that it? – Warren P Aug 29 '14 at 17:54
  • Your question is not very *answerable* due to it being unclear what you want to do. Bindings are for use with visual binding tool. Since you clearly don't want to do the visual binding style, you must have some IDEA what you wanted to accomplish. – Warren P Aug 29 '14 at 17:55
  • @WarrenP I'm NOT saying I don't want to use the visual binding style... I am saying I have no idea what `ScopeMappings` are and when/how to use them. Why are they advantageous, when are they meant to be used, how are they designed to be used... e.g. you can use a `DBConnection` (visual or not) to store your connection info (SQL, Text File, etc..), then you can assign it to the `Connection` prop of a `Query`... **OR** you could simply specific the `ConnectionString` prop. Unless I understand (i.e. it's explained to me) what a `Connection` object is, I wouldn't KNOW how/if I want to use it. –  Dec 14 '14 at 22:40

1 Answers1

1

This is the closest documentation I could find.

enter image description here

System.Bindings.CustomScope [http://docwiki.embarcadero.com/Libraries/XE8/en/System.Bindings.CustomScope][2]

System.Bindings.CustomWrapper [http://docwiki.embarcadero.com/Libraries/XE8/en/System.Bindings.CustomWrapper][3]