printing contents of a text field revPrintField

LiveCode is the premier environment for creating multi-platform solutions for all major operating systems - Windows, Mac OS X, Linux, the Web, Server environments and Mobile platforms. Brand new to LiveCode? Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
derek
Posts: 17
Joined: Tue Oct 17, 2006 9:39 pm

printing contents of a text field revPrintField

Post by derek » Sat Jul 21, 2007 10:14 pm

I need to print the contents of a text field. I think I have figured it out. (Once again, Revolution seems to handle a simple, common need in a needlessly complex and obscure way). I post this message to provide the information to others who might search the forum for this topic, and to get further comments from those who know more.

The command revPrintField seems to be what is needed. The Documentation Dictionary says that this command "Prints the contents of a field."

However, it tells us that the command below does NOT work:

revPrintField field "MyField"


Strangely, the command below prints the CONTENTS of a text field:

revPrintField the name of field "display"


If someone can explain this logic, I would appreciate it.

Thanks,

Derek
Derek Roff
Language Learning Center
University of New Mexico

Mark
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 5150
Joined: Thu Feb 23, 2006 9:24 pm
Contact:

Post by Mark » Sat Jul 21, 2007 10:48 pm

Hi Derek,

Field "MyField" is a container, which contains a text. The name of field "MyField" is a reference to that container. The revPrintField command wants a reference to a container rather than the contents of that container. I agree that a command such as "print field 1" would have been easier.

Best,

Mark
The biggest LiveCode group on Facebook: https://www.facebook.com/groups/livecode.developers
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode

Post Reply