22 years later

For discussion of xTalk topics related to education.
Post Reply
User avatar
richmond62
Posts: 2619
Joined: Sun Sep 12, 2021 11:03 am
Location: Bulgaria
Contact:

22 years later

Post by richmond62 »

Cripes: talk about a kick in the prawns!

Here's an 11 year old pupil of mine:
-
SShot 2021-10-08 at 19.14.29.png
SShot 2021-10-08 at 19.14.29.png (184.21 KiB) Viewed 7224 times
-
Which "threw me off" quite a bit as I ALWAYS (in my EFL programs) use a Tick image for end users to check a field's contents.
-
SShot 2021-10-08 at 19.33.06.png
SShot 2021-10-08 at 19.33.06.png (564.13 KiB) Viewed 7223 times
-

I had never used the RETURN key, and had never worked out how to.

SO . . . to the much-maligned built-in Dictionary and found on ReturnInField, which, was, frankly, like being handed the keys to
the Holy Kingdom on a plate:

Code: Select all

on returnInField
   if fld "ff" contains "black" then
      set the vis of img "YES" to true
      set the vis of img "NO" to false
   else
      set the vis of img "YES" to false
      set the vis of img "NO" to true
   end if
   if fld "ff" is empty then
      set the vis of img "YES" to false
      set the vis of img "NO" to false
   end if
end returnInField
Attachments
NO.livecode.zip
Here we are.
(57.03 KiB) Downloaded 331 times
https://richmondmathewson.owlstown.net/
xAction
Posts: 282
Joined: Thu Sep 16, 2021 1:40 pm
Contact:

Re: 22 years later

Post by xAction »

Huh?

Code: Select all

On ReturnInField
set the savedText of me to line 1 to -1 of  of me
pass ReturnInField
End ReturInField

On EnterInField
put the savedText of me into myScript
do myScript
exit EnterInfield
On EnterInField
Just like the multiline part of message box. oh that doesn't work like that anymore? It's a mac thing only?
Oh duh, i turned messages off.

See my stack script for more complete functional action

Oh I'll just post it here.
ReturnInField

Code: Select all

On ReturnInField
   if the controlKey is down then
      SaveFile    
   else
      set the savedText of field 1 to line 1 to -1 of  of field 1
      
      if the label this stack is not the short name of this stack then
         put the label of this stack into tLabel
         replace "*" with empty in tLabel
         set the label of this stack to tLabel& "*"
      end if
      
   end if
   pass ReturnInField
End ReturnInField
EnterInField

Code: Select all

On EnterInField
   if the controlKey is down then
      SaveFile    
   else
      put   line 1 to -1 of  of field 1 into myScript
      set the savedText of field 1 to myScript
      do myScript
   end if
   exit EnterInfield
end EnterInField
SaveFile

Code: Select all

on SaveFile
   put  word 2  of the long name of stack the mainStack of this stack into stName
   replace quote with empty in stName
   set itemDel to "/"
   put item 1 to -2 of stName into stPath
   set the folder to stPath
   ask "Name the file"
   if it is not empty then 
      put it into tFileName
      put "file:" & stPath & "/"& it into tFile
      put line 1 to -1 of field 1  into URL tFile
      set itemDel to "."
      set the label of this stack to  item 1 of tFileName 
   end if
end SaveFile
We used your image in field thing for disclosure arrows way back in 2005. it was pure wizardry to me when we did it. Pretty sure the guy who made it for me helped roll the Tree View for RunRev eventually.
Attachments
MulitLineScriptExecute.zip
executes what you typed on EnterinField, saves file with control key and Return and/or Enter key
(1.48 KiB) Downloaded 335 times
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest