Piping data to card..

Anything beyond the basics in using the LiveCode language. Share your handlers, functions and magic here.

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
tasdvl9
Posts: 94
Joined: Fri Dec 06, 2013 3:55 am

Piping data to card..

Post by tasdvl9 » Thu Feb 26, 2015 4:25 pm

Greetings all.

Question.

I want to implement a modal window which displays messages from functions I call within my app.

For example, If I open a file and it fails I'd like the failure message sent to a pipe. I can then goto the card which
has a field or grid control and display that message failure in that control to the user.

Any ideas?

Thanks!

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

Re: Piping data to card..

Post by Klaus » Thu Feb 26, 2015 4:58 pm

Hi tasdvl9,

unless you mean something like:
...
put tErrorData into fld "user alert" of cd 1 of stack "your modal display stack here"
modal "your modal display stack here"
...
we need more info! :D


Best

Klaus

FourthWorld
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 10057
Joined: Sat Apr 08, 2006 7:05 am
Contact:

Re: Piping data to card..

Post by FourthWorld » Thu Feb 26, 2015 5:22 pm

In addition to Klaus' good suggestion, the dialogData global property may be helpful.
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn

dave.kilroy
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 858
Joined: Wed Jun 24, 2009 1:17 pm
Contact:

Re: Piping data to card..

Post by dave.kilroy » Thu Feb 26, 2015 5:57 pm

Hi Chris

I'd never heard of Richard's dialogdata until now (think I may be using it though!)

When I need a log I usually set up a substack with a single field as Klaus describes - and where I want the log to begin I'll use something like:

Code: Select all

  go stack "stkLog"
  set the defaultstack to "stkMainStack"
  put tFoobar into fld 1 of cd 1 of stack "stkLog"
Followed by further placing of variables, results, script line numbers etc as required

Code: Select all

 put cr & tVariables after fld 1 of cd 1 of stack "stkLog"
"...this is not the code you are looking for..."

tasdvl9
Posts: 94
Joined: Fri Dec 06, 2013 3:55 am

Re: Piping data to card..

Post by tasdvl9 » Thu Feb 26, 2015 6:31 pm

Thanks all!

Very much appreciate all of the responses.

Post Reply