Show Group fails in standalone
Sivakatirswami
katir at hindu.org
Mon Sep 18 17:42:05 EDT 2006
I have this little podcast downloader working quite nicely.
I always try to build everything into a single card if I can and avoid
modal substacks,
mostly because I'm pushing to keep "scope" as constrained as possible.
Thus I have a strategy to use a small group of controls to give user
feedback on
a download: short field with the numbers from urlStatus... progress bar,
cancel button.
(all hacked out years ago from the MC IDE... but Scott Raney's model is
still
so perfect and readable)
OK on close stack this group is hidden and when I open the stack and
press the
"Get Podcast" button, there's and online-ping-our-server test... and if
it succeeds
it initializes the download and shows the download group of controls..
After the download is done, it hides this group and shows a player
controller
in the same location on the card, and starts playing the audio file.
With all the pain and aggravation of trying to get streaming to work
on Windows, this model sidesteps the problem completely by downloading
the file and playing it from the hard drive. I have other tools like this
that are working fine for all my windows users.
Now: new problem, the
show group "watchDownLoad" with visual effect dissolve fast
works in the Rev IDE, but not in a standalone! the group never appears.
I tried removing the visual effect (had problems with that some years
back on)
The group is the second top most layer on the card and the player
controller is
the very top layer, both hidden to start with, then shown by script...but
it doesn't work in a standalone?? There is a large background graphic
behind everything on the first (bottom most) layer. Is this a known
bug? I can pass this whole url download progress thing to a modal
substack... but I just find the hide show stuff so easy to manage, all
in one stack script.
ON getPodCast
put revCreateXMLTree(gFeed,true,true,true) into tCurrTree
put revXMLNodeContents(tCurrTree,"/rss/channel/item/title/") into tTitle
put
revXMLNodeContents(tCurrTree,"/rss/channel/item/itunes_duration/") into
tDuration
if matchtext(gFeed,"<enclosure url=(.*?)length",gURL) then
replace quote with "" in gURL
end if
showStatus "Downloading....",3
show group "watchDownLoad" with visual effect dissolve fast
put false into gCancelled
load url gURL
put empty into field "progress"
set the thumbPos of sb 1 to 0
send "updateme" && quote & gURL & quote to me in 1 second
put the long seconds into stime
END getPodCast
Curtis... if you are reading this and if your "grabbing audio from the
web" is a streaming
model that is failing, you may benefit by using "load" and then saving
the URL I can post the code
if you need it.
Sivakatirswami
www.himalayanacademy.com
Get Hinduism Today Digital Edition. It's Free!
http://www.hinduismtoday.com/digital/
More information about the use-livecode
mailing list