Code: Select all
on mouseUp
put "start"into fld 1
wait 5 seconds
put "stop" into fld 1
end mouseUp
So the question is: "Why does it not work the same with the message box?" And I know the message box is a mysterious entity.
Craig
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
Code: Select all
on mouseUp
put "start"into fld 1
wait 5 seconds
put "stop" into fld 1
end mouseUp
What isn't? The handler sees msg as a container, no? Just like that field. What happens to the instruction to place a string into message that does not happen when placing that string into a field? How does msg "block" (ignore?) the instruction in the handler after it has already executed?The Message Box contents are driven by messages
Commands and functions.
Message Box contents are not handled via the same mechanisms as other means of putting contents into fields.
Here's the msgChanged handler used in LC's IDE (see the revIDEMessageHandlerLibrary" frontScript):The way the message box functions has been refactored:
- the IDE only global property revMessageBoxRedirect has been removed
- the IDE only global property revMessageBoxLastObject has been removed
- the legacy message box behavior setting the text of the first field of a stack named Message Box has been removed
- the msgChanged message is now sent to the object that changed the message
- IDE plugin developers should subscribe to ideMsgChanged for custom message boxdevelopment.
- If the msgChanged message is not handled the content of the message box will be logged to the system log unless the engine is running in no ui (command line) mode which will write thecontent to STDOUT.revvideograbberend-of
Code: Select all
on msgChanged pHandler, pLine
local tTarget
put the long id of the target into tTarget
local tParams
put tTarget into tParams[1]
put pHandler into tParams[2]
put pLine into tParams[3]
put msg into tParams[4]
send "ideMessageSendWithParameters" && "ideMsgChanged, tTarget, tParams" to stack "revIDELibrary" in 0 milliseconds
pass msgChanged
end msgChanged