<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<META NAME="Generator" CONTENT="MS Exchange Server version 6.0.5762.3">
<TITLE>control references</TITLE>
</HEAD>
<BODY>
<!-- Converted from text/plain format -->
<P><FONT SIZE=2>Does Rev. only have one data type: text? Is 'put 3 into T' any different than 'put "3" into T' ? Regardless of the answer to this, I have a suggestion....</FONT></P>
<P><FONT SIZE=2>Seems to me that Rev. would benefit from a special variable type that points to Rev. objects. I frequenty find I'm coding goofy work-arounds such as do "..." whenever I pass a reference to a control into a handler. This is because variables can only hold text.</FONT></P>
<P><FONT SIZE=2>In other words, when I put "field 2" into a variable, Rev. doesn't know (because I have no way of telling it) whether I want this to mean a text string of 7 characters or a reference to the field object. What I would like to say is 'put object field 2 into theField' so that I can later say 'put "whatever" into theField' and it would change the text of the object field 2. Don't you think this would enable us to write cleaner code?</FONT></P>
<P><FONT SIZE=2>Alternatively, if it would be more consistent with xTalk conventions, then perhaps a function could be provided that forces the interpretation of a text string as an object reference. This would be analogous to the conversion that value("5") does to create an integer.</FONT></P>
<BR>
<P><FONT SIZE=2>Here's a code snippet that I'm currently working on:</FONT>
</P>
<P><FONT SIZE=2>on equalizeNlines f1, f2</FONT>
<BR><FONT SIZE=2>-- f1 and f2 are any valid field references</FONT>
<BR><FONT SIZE=2>-- note that I want to be able to pass in short name, ID, or number or long name, ID, or number</FONT>
<BR><FONT SIZE=2>if exists(f1) and exists(f2) then</FONT>
<BR><FONT SIZE=2>put value(f1) into f1Text -- slightly goofy</FONT>
<BR><FONT SIZE=2>put value(f2) into f2Text -- slightly goofy</FONT>
<BR><FONT SIZE=2>...</FONT>
<BR><FONT SIZE=2>...</FONT>
<BR><FONT SIZE=2>do "put f1Text into "& f1 -- very goofy -- wish for: put f1Text into object(f1)</FONT>
<BR><FONT SIZE=2>do "put f1Text into "& f2 -- very goofy -- wish for: put f2Text into object(f2)</FONT>
</P>
<BR>
<BR>
<P><FONT SIZE=2>-- D</FONT>
</P>
</BODY>
</HTML>