Replacetext function not found?

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
Simon Knight
Posts: 919
Joined: Wed Nov 04, 2009 11:41 am

Replacetext function not found?

Post by Simon Knight » Wed Sep 29, 2010 1:18 pm

I was trying to use the statement "replactext" but it refuses to pass the syntax checking:

Code: Select all

replaceText("malformed","mal","well") -- returns "wellformed"
stack "ICDTextFileConverter": execution error at line 37 (Handler: can't find handler) near "replaceText", char 1

any ideas?
best wishes
Skids

bn
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 4172
Joined: Sun Jan 07, 2007 9:12 pm

Re: Replacetext function not found?

Post by bn » Wed Sep 29, 2010 2:55 pm

Simon,
replace is a function, you have to tell it what to do.
try

Code: Select all

put replaceText("malformed","mal","well") into field 1 -- returns "wellformed" 
that works for me
regards
Bernd

Simon Knight
Posts: 919
Joined: Wed Nov 04, 2009 11:41 am

Re: Replacetext function not found?

Post by Simon Knight » Wed Sep 29, 2010 5:13 pm

Arrrrrrrrrggggggggggg!

What a fool! I've spent ages trying to find out where I was going wrong....

Thanks
Simon
best wishes
Skids

Klaus
Posts: 14198
Joined: Sat Apr 08, 2006 8:41 am
Contact:

Re: Replacetext function not found?

Post by Klaus » Wed Sep 29, 2010 5:59 pm

Simon, the Rev Dictionary isn't that bad! 8)

Simon Knight
Posts: 919
Joined: Wed Nov 04, 2009 11:41 am

Re: Replacetext function not found?

Post by Simon Knight » Wed Sep 29, 2010 10:12 pm

Klaus,

The dictionary is fine, its me (RTFM)

Simon
best wishes
Skids

Klaus
Posts: 14198
Joined: Sat Apr 08, 2006 8:41 am
Contact:

Re: Replacetext function not found?

Post by Klaus » Thu Sep 30, 2010 11:03 am

Hi Simon,
Simon Knight wrote:Klaus,
The dictionary is fine, its me (RTFM)
Simon
I know, but my good education forced me to put it this more diplomatic way :D

Simon Knight
Posts: 919
Joined: Wed Nov 04, 2009 11:41 am

Re: Replacetext function not found?

Post by Simon Knight » Fri Oct 01, 2010 9:18 am

Klaus,

Ho hummm! :wink:

Simon
best wishes
Skids

Post Reply