Page 1 of 1

PostPosted: Sun Mar 18, 2007 4:56 pm
by steveK
Firstly Hello again!

I registered Architect and OrbFOrms about a your ago then promptly disappeared. I found OrbC too hard for my brain, so I've been self teaching on VBA in Word. Am back now, but still with a little brain. THis will be a very simple problem for all of you...

I have a simple OrbForms project with 1 field (fldName), a button (btnGreetMe), and a string variable (strName). My idea is the I'd be able to type my name into the field, then upon clicking the button, strName would assume the value of fldName. It would then display "Hello Steve." The compiler keeps hanging on the assignment
strName = fldName;
I've scoured the help files and it seems like the syntax should work ... here's the code:

// mainform.oc
// Created for mainForm

string strName;

handler mainForm.onopen() {
alert("Enter your name then click the buttton");
}

handler mainOptionsAbout.onselect() {
alert("This is an OrbForms Designer Application");
}


handler btnGreetMe.onselect() {
strName = fldName;
alert("Hello" + strName);
}

Ideas? Thanks in advance...
Sincerely, Codeless.

PostPosted: Sun Mar 18, 2007 7:31 pm
by nmc
try fldName.text if you want the contents of that object :-)

PostPosted: Sun Mar 18, 2007 7:51 pm
by steveK
Yes, because I don't want the entire text field object... only the property that is gotten by .text !!

That worked perfectly, thank you !! :D