messages box strange behavior

Got a LiveCode personal license? Are you a beginner, hobbyist or educator that's new to LiveCode? This forum is the place to go for help getting started. Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller

Post Reply
jmburnod
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 2729
Joined: Sat Dec 22, 2007 5:35 pm
Contact:

messages box strange behavior

Post by jmburnod » Sun Dec 05, 2010 10:43 am

Hi All,

A strange behavior i see first time with RevolutionStudio 4.0

I have a function in the card script :

Code: Select all

function myTestFunction pText 
   put empty into rmyTestFunction
   put char 1 to 10 of pText into rmyTestFunction
   return rmyTestFunction
end myTestFunction
And a fld "fLesPref"

1. if i send from the message box :
put myTestFunction("123456789pli") into fld "flespref"
"123456789p" come in the messages box
But no change in fld "flespref"

2. if i send from the message box :
put myTestFunction("123456789pli") into fld "agdjhgafjahgf" (fld "agdjhgafjahgf" not exists)
"123456789p" come in the messages box without error message (the lockErrorDialogs= false)

3.if i send it from an handler in card script

Code: Select all

on testFromCd
  put myTestFunction("123456789pli") into fld "flespref"
end testFromCd
work fine

Someone have an idea ?

Thank

Jean-Marc
https://alternatic.ch

WaltBrown
Posts: 466
Joined: Mon May 11, 2009 9:12 pm

Re: messages box strange behavior

Post by WaltBrown » Sun Dec 05, 2010 10:59 am

Hi!
I tried both and they worked correctly for me - the first worked and put the correct data in the field, and the second threw a "Message execution error, can't find handler". Interestingly, it did not say something like "No such field". The first one did NOT put the answer in the message box for me. I can only get the correct answer sent to the message box if I erase "into fld "flespref"" from the command.

So it seems like your message box is not processing the "into fld xxx" part of the command, but mine is. I looked in Preferences and didn't see any settings which apply.

I am on LC 4.5.1 and WinVista.
Walt
Walt Brown
Omnis traductor traditor

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

Re: messages box strange behavior

Post by Mark » Sun Dec 05, 2010 11:45 am

Hi Jean-Marc,

The message box is slightly buggy as is (ironically) the error reporting system. Don't worry too much. If it works in a stack, then you probably haven't made any mistakes.

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

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

Re: messages box strange behavior

Post by Klaus » Sun Dec 05, 2010 12:20 pm

Hi all,

yes I already bug bug reported the strange behaviour of the message box back in 2008:
http://quality.runrev.com/qacenter/show_bug.cgi?id=6434

But this is only the message box, and as Mark said, everything will be fine in the standalone :)


Best

Klaus

jmburnod
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 2729
Joined: Sat Dec 22, 2007 5:35 pm
Contact:

Re: messages box strange behavior

Post by jmburnod » Sun Dec 05, 2010 2:23 pm

Thank at all
i'm reassured about my brain :D

Jean-Marc
https://alternatic.ch

Post Reply