When can scope operator ("::") be used by complex

jemmy
Member Posts: 247
Dear Folks,
Sorry, I just rewrite the same question in Navision Solution Development chapter-1. :?
When can scope operator ("::") be used by complex datatypes?
I want to ensure that it is used when we call object property (for example: field of table) not using complex variable.
Example:
Thanks in advance.
Jemmy
Sorry, I just rewrite the same question in Navision Solution Development chapter-1. :?
When can scope operator ("::") be used by complex datatypes?
I want to ensure that it is used when we call object property (for example: field of table) not using complex variable.
Example:
Do I have a correct idea on this? :?:Form.Run(Form::"Company Information",CompanyRec)
Thanks in advance.
Jemmy
0
Comments
-
:: is used, when you want to get Option value for some Option variable...0
-
kine wrote::: is used, when you want to get Option value for some Option variable...
Option variable? Does it mean that there're several values possible for the variable?
I saw page 1-6, there's a syntaxAction::LookUp
In VB, I usually type ClassName. then its properties/methods will be shown in list box, then I can choose correctly. But C/Al should be different from it.
Hope you could explain briefly please.. :? Anyway thanks for the reply...
that's all about it.
Jemmy0 -
it means that Action is variable of type Option and have some possible value and one of them is LookUp. If You write Action::aaa and try to compile, you can see, which values are possible to enter. :: have not same meaning as in C++ for example...0
-
kine wrote:it means that Action is variable of type Option and have some possible value and one of them is LookUp.
Hi Kine,
Thanks again for the reply.
But how can we know its type, for example page 1-5.
FORM.RUN (FORM::"Customer Card", CustRec);
FORM is an object (complex data types), isn't it? Then it is also called a variable type option?
A little bit fun, when I typed FORM::"aaa", then compiled it. It would show error message: You cannot enter 'aaa' in FormNo. The cursor is in front of the invalid character.
Then what is the FormNo? I know it is tied to FormID, but how can we know the relationship...
Hope you could explain more briefly with above case.. :?
Sometimes a new term make me confused.
That's all bout it. Thanks again.
Jemmy0 -
Ok, FORM:: CODEUNIT:: TABLE:: etc. is for me special case of this operator. I think, that C/AL is not consistent in using this operator.
:: is Scope operator, but I know only three possible application:
1) Option value <option field>::<option value> (value from scope of the option field)
2) <Object>::<Object name> for identify of object - result is same as if object ID is entered (TABLE::Item = 27) (ID of object from given scope)
3) <atuomation variable>::<automation event name> for identify triggers connected to automation events (events from automation variable scope)
But because C/AL is not fully object oriented language, there is no usage of this operator for other possibility (as static methods etc.).FORM.RUN (FORM::"Customer Card", CustRec);
FORM is an object (complex data types), isn't it? Then it is also called a variable type option?
A little bit fun, when I typed FORM::"aaa", then compiled it. It would show error message: You cannot enter 'aaa' in FormNo. The cursor is in front of the invalid character.
Then what is the FormNo? I know it is tied to FormID, but how can we know the relationship...
FormNo is first parameter of FORM.RUN and it is "Number" of the form. Cite from C/SIDE help:FORM.RUN(Number [, Record] [, Field])
Number
Data type: integer
A number which identifies a form object. If you enter zero (0), the system displays the default lookup window for the current form. You can use the Symbols option on the View menu to choose from a list.
If the form you specify does not exist, a run-time error occurs.0 -
Hello Kine,1) Option value <option field>::<option value> (value from scope of the option field)
2) <Object>::<Object name> for identify of object - result is same as if object ID is entered (TABLE::Item = 27) (ID of object from given scope)
3) <atuomation variable>::<automation event name> for identify triggers connected to automation events (events from automation variable scope)
Well, thanks for the brief explanations.
Now with these, I should be more confident to continue my chapter readings...
Jemmy0
Categories
- All Categories
- 73 General
- 73 Announcements
- 66.6K Microsoft Dynamics NAV
- 18.7K NAV Three Tier
- 38.4K NAV/Navision Classic Client
- 3.6K Navision Attain
- 2.4K Navision Financials
- 116 Navision DOS
- 851 Navision e-Commerce
- 1K NAV Tips & Tricks
- 772 NAV Dutch speaking only
- 617 NAV Courses, Exams & Certification
- 2K Microsoft Dynamics-Other
- 1.5K Dynamics AX
- 320 Dynamics CRM
- 111 Dynamics GP
- 10 Dynamics SL
- 1.5K Other
- 990 SQL General
- 383 SQL Performance
- 34 SQL Tips & Tricks
- 35 Design Patterns (General & Best Practices)
- 1 Architectural Patterns
- 10 Design Patterns
- 5 Implementation Patterns
- 53 3rd Party Products, Services & Events
- 1.6K General
- 1.1K General Chat
- 1.6K Website
- 83 Testing
- 1.2K Download section
- 23 How Tos section
- 252 Feedback
- 12 NAV TechDays 2013 Sessions
- 13 NAV TechDays 2012 Sessions