201

(11 replies, posted in Script)

I dont know why i can't attach files, but here's what's going on:

i've got litteraly this writte on the script:


   procedure Form1_Button1_OnClick (Sender: string; var Cancel: boolean);
begin
    if (Form1.Edit1.Text = '') then
    begin
        Cancel := True;
        ShowMessage('Your message here.');
    end;
end;
begin

end.


The form name is exacly named: Form1
The text box is named Edit1
and the button that saves the form into the table that i named "testes" is named... Button1

I Run the script, it doesn't show any errors, i press button1 without inserting anything on text box, it just saves an empty name.
can't make this thing work... maybe it's a bug?

202

(11 replies, posted in Script)

here's the database , i forgot to attach the other files

203

(11 replies, posted in Script)

i think i know what my problem is... lack of programming skills, i just found out (my myself) that a end with ; means that there's more code below, and an end with . means that's the end of the code...

204

(11 replies, posted in Script)

Hello there Dimitry, thanks for replying me, i am still trying to figure out how to work with MVD, but i am hoping to get this working properly.

I don't know if the buttons are called Formname_ButtonName_Onclick or  Formname.ButtonName.Onclick so i tried both, none work, the button doesn't cancel it's action when i press it to save the form, warning me that i have to fill a specific edit box.

If you can point me in the right direction i'll be glad smile
Many thanks

205

(11 replies, posted in Script)

Well, final i was able to write something on the script, thanks to you.
But i am looking for the right call for a button, using if & and's is working for me, but i am looking for the right call for a button being pressed, i am trying to write this:

Begin

if (frmAssistencia.BTGRAVAR.OnClick) and (frmAssistencia.memoavaria.Text = '') then
    begin
        Cancel := True;
        ShowMessage('Your message here.');
    end;

end
.

Of course it doesn't work because i don't know how to write this procedure.

Is there a dicionary avaiable for these procedures?
Is this SQL language?
I am completly new to SQL smile

206

(11 replies, posted in Script)

Dear all. i'm new to MVD and i started working on my database

I Was hoping to get two scrips working:

This:

procedure Form1_Button1_OnClick (Sender: string; var Cancel: boolean);
begin
    if Form1.Edit1.Text = '' then
    begin
        Cancel := True;
        ShowMessage('Your message here.');
    end;
end;

And then i want to use another script (that i can't find it now) that allows me to check if a combo box has an id (example id = 2) it would require a certain box (or in this case another combobox) to be selected...

The problem is, every time i paste a script to my "script" area, the script shows me an error: Begin expected at (12:1 in this case)
Even if i debug the script and rewrite it until it works, it does nothing


P.S. the script i pasted is the "generic script" that i copied from this forum, of course that i'm smart enough to change the camps like: procedure form1_button1_onclick to: "myformname"_"theokbuttonname"_onclick etc etc... smile

Thanks in advance