Friday, 21 October 2016

Form _Splitters

Form _Splitters

Example : Tutorial_from_split





Create a new form by name - pramod_Splitters

Add a new static text control  and add a new string control

set autodeclarations for both controls to Yes

Drag and drop the group control from the tutorial_form_split to the newly created form in
 between the static
 text and string edit controls

In the class declaration

public class FormRun extends ObjectRun
{
    SysFormSplitter_Y _formSplitter;
}

override init() method of the element and instantiate the sysFormSplitter_y class object

public void init()
{
    super();

     _formSplitter = new SysFormSplitter_Y(groupSplitter,StaticText,element);
}

Three important methods on the group control which will help to resize the splitters are mouseup, mousemove, mousedown

int mouseUp(int x, int y, int button, boolean ctrl, boolean shift)
{
    int ret;

    ret = super(x, y, button, ctrl, shift);

    Return _formSplitter.mouseUp(x, y, button, ctrl, shift);
}

int mouseMove(int x, int y, int button, boolean ctrl, boolean shift)
{
    int ret;

    ret = super(x, y, button, ctrl, shift);

    Return _formSplitter.mouseMove(x,y,button,ctrl,shift);
}

int mouseDown(int x, int y, int button, boolean ctrl, boolean shift)
{
    int ret;

    ret = super(x, y, button, ctrl, shift);

    Return _formSplitter.mouseDown(x, y, button, ctrl, shift);
}






Saturday, 1 October 2016

Insert method, Update method and delete method

static void insert(Args _args)
{
    //LopTable        lopTable;
    //lopTable.Age = 12;
    //lopTable.Name ="pramod";
    //lopTable.Sid = "1001";
    //lopTable.insert();
    //{
        //info("all record  insered");
    //}
   // temTable.setTmp();
 
   
    LopTable            lopTable;
    ;
   
    //
    //ttsBegin;
       //update_recordSet lopTable setting Sid="10";
    //
    //
    //
    //lopTable.Sid ="151";
    //lopTable.update();
    //ttsCommit;
    //
    //{
        //info(strFmt("All record updated"));
    //}
   
   
    //ttsBegin;
    //
    //select  forUpdate lopTable where lopTable.Sid;
    //
    //lopTable.Sid = "160";
    //lopTable.update();
    //ttsCommit;
   
    ttsBegin;
    delete_from lopTable
   
    where lopTable.Sid =="160";
    ttsCommit;
   
    {
        info(strFmt("%1",lopTable.Sid));
    }
   
   
}