‏إظهار الرسائل ذات التسميات Basics of Built-ins. إظهار كافة الرسائل
‏إظهار الرسائل ذات التسميات Basics of Built-ins. إظهار كافة الرسائل

الاثنين، ٩ مارس ٢٠٠٩

Built-in Object IDs

Some built-in subprograms accept object IDs as actual parameters. An object ID is an internal, opaque handle that is assigned to each object when created in Oracle Forms. Object IDs are internally managed and cannot be externally viewed by the user. The only method you can use to retrieve the ID is to define a local or global variable and assign the return value of the object to the variable.

You make the assignment by way of the FIND_ built-in functions. Once you have used FIND_ within a PL/SQL block, you can use the variable as an object ID while still in that block. The valid PL/SQL type for each object is included in the syntax descriptions for each parameter. The description for the FIND_BLOCK built-in provides an example of how to obtain an object ID.



========================



بعض الـ Built-ins يأخذون معرف هوية الكائن او ما يعرف بـ Object ID كـ Parameter لهم ، و بما أن الـ Object ID ينشاء داخلياً من خلال الـ Forms Builder عند أنشاء اى كائن فانه من المستحيل ان يتعامل المبرمج مع الـ Object ID مباشرتاً ، و لكن بالامكان التعامل معه فى حال تعريف متغير على مستوى النماذج او على مستوى نموذج واحد ( Global Variable , Local Variable ) و وضع قيمة العائدة من الكائن الى هذا المتغير ؛ و وضع هذه القيمة بيتم من خلال الـ Built-in الذى يدعى _Find

فمثلاً فى هذا المثال سنأتى بقيمة معرفة الهوية الخاص بالـ Block ، لكى نتأكد من أنه متواجد بالفعل ام لا .


FIND_BLOCK Example

/*

** Built-in: FIND_BLOCK
** Example: Return true if a certain blockname exists
*/
FUNCTION Does_Block_Exist( bk_name VARCHAR2 )
RETURN BOOLEAN IS
bk_id Block;
BEGIN
/*
** Try to locate the block by name
*/
bk_id := Find_Block( bk_name );
/*
** Return the boolean result of whether we found it.
** Finding the block means that its bk_id will NOT be NULL
*/
RETURN (NOT Id_Null(bk_id));
END;



هنا أحنا عرفنا المتغير bk_id بأنه Block ثم أوجدنا معرفة هوية الخاص بالبلوك التى أنشأنها مسبقاً فى الـ Form Builder - و التى تم تعريفها هنا فى هذه الدالة كعامل الـ bk_name - من خلال الـ Find_Block كما هو موضح فى المثال السابق .

و سوف يتم شرح الـ FIND_BLOCK Built-in بالتفصيل فالدروس الاحقة ...... المهم هنا احنا عرفنا اذاى نحضر الـ ID الخاص بأى كائن .


Share/Save/Bookmark

Built-in Named Parameters

The named parameter should be followed with the equal/greater than signs (=>), which point to the actual parameter that follows the named parameter. For example, if you intend to change the milliseconds in the SET_TIMER Built-in you can directly use that parameter with the following syntax:

SET_TIMER(timer_name => 'my_timer', milliseconds => 12000, iterate => NO_REPEAT);

Also, you can continue to call the built-in with the following syntax:

SET_TIMER('my_timer', 12000, NO_REPEAT);



==================


الفكرة هنا انه بيقولك انه مش شرط تكتب الـ Parameters فى اماكنها المحدده طالما انك بتستخدم اداة الأشارة هذه <= للدلاله على Parameter فيما بين الأقواس .

كما هو موضوح فى المثال السابق .


Share/Save/Bookmark

الأحد، ١ فبراير ٢٠٠٩

Individual Built-in Descriptions

The remainder of this chapter presents individual built-in descriptions. Each built-in is presented in the following format or a subset of the format, as applicable:

Syntax

Describes the syntax of the built-in. If there are multiple formats for a Built-in then all formats are shown. For example, if the target object of a built-in can be called by name or by object ID, then both forms of syntax are displayed.

Built-in Type Indicates whether the built-in is restricted or unrestricted

Returns Indicates the return value or data type of a built-in function

Enter Query Mode Indicates the capability to call the built-in during enter query mode.

Description

Indicates the general purpose and use of the built-in.

Parameters

Describes the parameters that are included in the syntax diagrams. Underlined parameters usually are the default.

Individual built-in descriptions Restrictions

Indicates any restrictions.

Individual built-in descriptions Examples

Provides an actual example that can be used in conjunction with the syntax to develop a realistic call to the built-in.

===========================================

الموضوع ببساطه انه بيشرح الشكل او التنسيق اللى انت غالباً هتشوفه لما هتفتح الـ Documentary لأى Built-in

( ذى ده مثلاً >>> CREATE_TIMER Built-in )

أول الصفحة هتلاقى الـ Description و هو يصف الغرض او الهدف من هذا الـ Built-in .

و ثانى شىء هو الـ Syntax و هو الصيغة اللى بيتكتب بيها الـ Built-in ، و بأسفله بيكتب أيضاً نوعه Type ( مقيد ام غير مقيد ) ، و القيمة العائده - دا فى حال اذا كان داله Function و ليس اجراء Procedure - و أمكانية استدعائه من Enter Query Mode أم لا.

و ثالث شىء هو العوامل Parameters و هى التى ذكرت فى الصيغة و هنا بيتم شرح ما هى العوامل التى سوف تستخدم وفقاً للصيغة .

و رابع شىء هى القيود (أن وجدت) و هى تشرح ما هى قيود الاستخدام لهذا الـ Built-in .

و خامساً الـ Examples ..... يوجد بعض الـ Built-ins ليس لها أمثلة .

من يرى اى شىء غامض بهذا الدرس ، فلـــــــيسأل !


Share/Save/Bookmark

الخميس، ٢٩ يناير ٢٠٠٩

Built-in Constants

Many of the built-in subprograms take numeric values as arguments. Often, constants have been defined for these numeric arguments. A constant is a named numeric value. When passing a constant to a built-in do not enclose the constant value in quotation marks.

Constants can only appear on the right side of an operator in an expression.

In some cases, a built-in can take a number of possible constants as arguments. Possible constants are listed in the descriptions for each parameter.

In the following example, BLOCK_SCOPE is a constant that can be supplied for the parameter constant VALIDATION_UNIT. Other constants listed in the description are FORM, RECORD, and ITEM.


SET_FORM_PROPERTY('my_form', VALIDATION_UNIT, BLOCK_SCOPE);


=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

الخلاصه هنا انه بيتكلم على وجود ثوابت معينه بتوضع
كأجابة لعوامل محدده فى بعض الـ built-in

فدعنا نشرح المثال السابق :-
فالـ SET_FORM_PROPERTY هو الـ Built-in
و ما بين القوسيين يدعى Parameters ( عوامل )
و أول عامل هو أسم الفورمه : 'my_form'
و ثانى عامل هو مستوى الفاعلية الذى يحدد مجال فاعلية الفورم .
و ثالث عامل (اللى هو احنا بنتكلم عليه فى الدرس ده ) هو العامل الذى يأتى
كأجابه للعامل الثانى ، و هو مكتوب فى المثال
BLOCK_SCOPE
و الفكره هنا هى اننا منقدرش نكتب غير عبارة واحده من العبارات التالية :-
DEFAULT_SCOPE, BLOCK_SCOPE, RECORD_SCOPE, ITEM_SCOPE
و فى حال أذا وضعت أى عبارة أخرى فسوف ينتج خطأ .... و لذلك نحن نقول على هذا بالعوامل الثابته ( Built-in Constants ) .


Share/Save/Bookmark

الأربعاء، ٢٨ يناير ٢٠٠٩

Restricted Built-in Subprograms

يوجد نوعان من الـ Built-in :-
  1. Restricted built-ins
  2. Unrestricted built-ins
بالنبسة للـ Restricted built-ins (الـ built-ins المقيده ) فهى تؤثر فى التنقل الداخلى (و هو يحدث فى خلفية الـ Form Builder و هذا بالطبع لا نراه ) و تؤثر أيضاً فى التنقل الخارجى ( و هذا ما نراه فى الـ Form Builder ) .

و لذلك يتم استخدام الـ Restricted built-ins عندما لا تتواجد اى تنقلات داخلية ..... و من ثم فهو من الخطاء تماماً أن نستخدم الـ Restricted built-ins فى الـ Pre , Post triggers لأن هذه الـ Triggers يتم أطلاقها عند التنقل من كائن لأخر .

و لكن يمكن أستدعاء الـ Restricted built-ins من الـ When triggers المخصصه لوجهة الـ items كالـ When-Button-Pressed و When-Checkbox-Changed ، و أيضاً يمكن أستدعاء الـ Restricted built-ins من أى When-New-"object"-Instance triggers أو أى key triggers .

أما بالنسبه للـ Unrestricted built-ins فهى لا تؤثر بأى شكل فى التنقل المنطقى او الفيزيائى و يمكن أستدعائها من أى Triggers .

و فى كل وصف لـ Built-in يوجد عبارة الـ Built-In Type التى تصف اذا كان الـ Built-in مقيد أم لا .

Share/Save/Bookmark

مقدمه عن الـ Built-ins الخاصه بـ Forms 10g

الـ Built-ins هى أجراءات و دوال جاهزة توضع فى الـ Triggers المناسبه لتفيذ اوامر معينه فى البرنامج (الفورمه) .

و سوف أشرح فى هذا الكورس كل الـ Built-ins الموجوده فى Forms 10g ... أضغط على هذه الصوره لزيادة التوضيح :-


و هذا رابط الـ Documentary الخاص بالـ Built-ins الموضح فى الصورة السابقة ... أضغط هنا

أتمنى ان أرى تفاعل مع الدروس التى سوف توضع حتى أستطيع أن أكمل الكرس بالكامل .

Share/Save/Bookmark
Older Posts Home Page