Two revlets on a page
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
Two revlets on a page
Not sure if this is the right place, but is it feasible to have two revlets on the same webpage and have them able to interact? I want to place two elements of my revlet in disparate places on the page, to account for the other elements on the page and overall usability.
Alternately, if I install the server CGI on my host, can I use that to interact with a revlet on the page. I have a tight deadline and I'm trying to avoid having to re-code everything.
Thanks!
carly
Alternately, if I install the server CGI on my host, can I use that to interact with a revlet on the page. I have a tight deadline and I'm trying to avoid having to re-code everything.
Thanks!
carly
Re: Two revlets on a page
Hi Carly,
I did that a while ago and used Jaqueline Landman's description, which I cant find at the moment.
What I did was a teststack with a substack and show them next to each other on a page. Then you can send commands from the main stack to the substack.
http://berndniggemann.on-rev.com/stackandsub/
I append the stack and the index.html.
The trick is to configure the index.html manually so that the stacks appear next to each other or wherever you want. Have a look, I think you figure that out faster than I can explain it. You just copy the upper part (the automatic part) and replace the part that places the stack onto the browser page.
Don't you like deadlines?
regards
Bernd
Edit: I appended the original stack and substack, forgot that. I think the only difference is that I played a bit more with the blendlevel compared to the revlet.
I did that a while ago and used Jaqueline Landman's description, which I cant find at the moment.
What I did was a teststack with a substack and show them next to each other on a page. Then you can send commands from the main stack to the substack.
http://berndniggemann.on-rev.com/stackandsub/
I append the stack and the index.html.
The trick is to configure the index.html manually so that the stacks appear next to each other or wherever you want. Have a look, I think you figure that out faster than I can explain it. You just copy the upper part (the automatic part) and replace the part that places the stack onto the browser page.
Don't you like deadlines?

regards
Bernd
Edit: I appended the original stack and substack, forgot that. I think the only difference is that I played a bit more with the blendlevel compared to the revlet.
- Attachments
-
- doppeltstack.rev.zip
- (2.65 KiB) Downloaded 292 times
-
- stackandsub.zip
- (16.43 KiB) Downloaded 259 times
Last edited by bn on Mon Dec 20, 2010 10:11 pm, edited 1 time in total.
Re: Two revlets on a page
Bernd,
This is brilliant, thank you! I think I get the idea and can easily incorporate this into my project. You are my hero! :
This is brilliant, thank you! I think I get the idea and can easily incorporate this into my project. You are my hero! :

Re: Two revlets on a page
Hi Carly,
I forgot to upload the original stack.
I uploaded it to the above post with the link to the revlet.
regards
Bernd
I forgot to upload the original stack.
I uploaded it to the above post with the link to the revlet.
regards
Bernd
Re: Two revlets on a page
Bernd,
So I've been having trouble with this. I got the two revlets to appear on the same page, and they load consistently. The substack revlet is a single button whose only job is to call the mouseup of a submit button in the main stack. Sadly, I can't get it to work.
This particular submit button does a whole lot, using the EnhancedQT external and then a POST command with custom HTTP headers to send the final file that it creates to a server. When I click the button by hand, it works great. When I try to call it from the substack button, very little of it works. Not even the first line of the script, which is
I've attempted to load the same externals into the substack, but that doesn't really explain why the simple line above doesn't work. I've also tried specifying the defaultstack property of the substack to be the mainstack. But no go.
Right now, the substack button code is:
Do you have any tips on what I could try next?
Thank you in advance!
So I've been having trouble with this. I got the two revlets to appear on the same page, and they load consistently. The substack revlet is a single button whose only job is to call the mouseup of a submit button in the main stack. Sadly, I can't get it to work.
This particular submit button does a whole lot, using the EnhancedQT external and then a POST command with custom HTTP headers to send the final file that it creates to a server. When I click the button by hand, it works great. When I try to call it from the substack button, very little of it works. Not even the first line of the script, which is
Code: Select all
set the visible of fld "Submitting" to true


I've attempted to load the same externals into the substack, but that doesn't really explain why the simple line above doesn't work. I've also tried specifying the defaultstack property of the substack to be the mainstack. But no go.

Right now, the substack button code is:
Code: Select all
on mouseUp
go stack "LL Feedback Recorder"
send "mouseup" to btn "Submit" of stack "LL Feedback Recorder"
end mouseUp
Thank you in advance!
Re: Two revlets on a page
Hi Carly,
I just tried to send "mouseUp" from the substack to a button on the main stack. It did not work.
Then I took the main part of the mouseUp handler and put it into a separate handler within the button script.
Actually I scripted the two buttons in the stack I posted that hide the field on the mainstack and show the field.
The script I made was
And I made a button on the substack with the script
This worked in the revlet. Apparently the revlet does not like send "mouseUp". But a revlet can send a message across the stacks. No need to actually go there.
You might try something analogous to the above and see if it works. That would be the fastest way.
Alternatively you could move your handler into the card/stack script and again do a.
Kind regards
Bernd
I just tried to send "mouseUp" from the substack to a button on the main stack. It did not work.
Then I took the main part of the mouseUp handler and put it into a separate handler within the button script.
Actually I scripted the two buttons in the stack I posted that hide the field on the mainstack and show the field.
The script I made was
Code: Select all
on hideMe
hide field 1
put the script of me into field 1
end hideMe
Code: Select all
on mouseUp
send "hideMe" to btn "bHideField" of stack "doppeltstack"
end mouseUp
This worked in the revlet. Apparently the revlet does not like send "mouseUp". But a revlet can send a message across the stacks. No need to actually go there.
You might try something analogous to the above and see if it works. That would be the fastest way.
Alternatively you could move your handler into the card/stack script and again do a
Code: Select all
send "myHandlerName" to card/stack xyz
Kind regards
Bernd
Re: Two revlets on a page
Hi Carly,
a little more testing shows this in the script of the button on the substack:
Apparently the mouseUp wants the full path, including the card. Which is always a good idea anyways.
Kind regards
Bernd
a little more testing shows this in the script of the button on the substack:
Code: Select all
on mouseUp
send "mouseUp" to btn "bHideField" of card 1 of stack "doppeltstack"
end mouseUp
Kind regards
Bernd
Re: Two revlets on a page
Bernd,
I had tried sending the message to the specific card like you suggest in your last post. But that does not have much effect.
I will try moving the script to the card and see what I get.
I had tried sending the message to the specific card like you suggest in your last post. But that does not have much effect.
I will try moving the script to the card and see what I get.
Re: Two revlets on a page
Hi Carly,
I upload the little teststack with the substack that shows that sending a message from the substack to the mainstack works. There must be something other than the simple send command that is not working?
It has the stack/substack as .rev stack, the revlet and the test.html page.
should be working out of the box locally.
Kind regards
Bernd
I upload the little teststack with the substack that shows that sending a message from the substack to the mainstack works. There must be something other than the simple send command that is not working?
It has the stack/substack as .rev stack, the revlet and the test.html page.
should be working out of the box locally.
Kind regards
Bernd
- Attachments
-
- doppeltstack13.zip
- (19.88 KiB) Downloaded 283 times
Re: Two revlets on a page
Bernd,
Thanks for the samples. I think I have all of the syntax right, but what seems to be stalled is the use of the EQT bundle. A call to launch an Applescript app works later, but it doesn't have all of the right data because the EQT is not parsing the files that it's supposed to.
Like I said, even the first line of the mouseup on the mainstack is not done. Yet a call to an external app in a command further down the chain is done.
I don't think it's consistent, what works and what doesn't. I've tried making sure that the external is loaded in the substack, too. As well as setting the defaultstack to the mainstack. Nothing produces different results.
I guess I will need to rethink my layout to accommodate only one button.
Thanks for the samples. I think I have all of the syntax right, but what seems to be stalled is the use of the EQT bundle. A call to launch an Applescript app works later, but it doesn't have all of the right data because the EQT is not parsing the files that it's supposed to.
Like I said, even the first line of the mouseup on the mainstack
Code: Select all
set the visible of fld "Submitting" to true
I don't think it's consistent, what works and what doesn't. I've tried making sure that the external is loaded in the substack, too. As well as setting the defaultstack to the mainstack. Nothing produces different results.
I guess I will need to rethink my layout to accommodate only one button.

Re: Two revlets on a page
Correction:
It seems the root of the problem may be that when called from the substack button, the commands in the mainstack are not pulling data from the array. When the button on the mainstack is clicked itself, everything works swimmingly.
So it seems to be about context. I've tried setting the defaultstack of substack to be the mainstack. But maybe I'm not doing that right? This is what I have:
It seems the root of the problem may be that when called from the substack button, the commands in the mainstack are not pulling data from the array. When the button on the mainstack is clicked itself, everything works swimmingly.
So it seems to be about context. I've tried setting the defaultstack of substack to be the mainstack. But maybe I'm not doing that right? This is what I have:
Code: Select all
set defaultstack to "LL Feedback Recorder"
Re: Two revlets on a page
Hi Carly,
?
What I would try in the btn handler:
This is not tested but should work. I always have trouble with setting the default stack so I really dont use it. Maybe that would work also.
In the above code you actually are in the mainsack when you go there.
good luck
Bernd
did you tryset the visible of fld "Submitting" to true
Code: Select all
set the visible of fld "Submitting" of card x of stack y to true
What I would try in the btn handler:
Code: Select all
on mouseUp
push card -- remember where we came from
go card x of stack y
-- do your commands
-- more commands
-- in case you want to be back where you came from
pop card
end mouseUp
In the above code you actually are in the mainsack when you go there.
good luck
Bernd
Re: Two revlets on a page
Hi Bernd,
I did try, but it behaved no differently.
I've had to move on to plan B for this particular version of the software. Students and teachers need to be using this starting Jan 3rd!
When i get a change, I'll probably come back to this and see if I can get it to work. But for now, I've just rearranged the elements on the webpage so that I can keep the Submit button near the rest of the revlet objects.
Thanks for your help!
I did try
Code: Select all
set the visible of fld "Submitting" of card x of stack y to true
I've had to move on to plan B for this particular version of the software. Students and teachers need to be using this starting Jan 3rd!
When i get a change, I'll probably come back to this and see if I can get it to work. But for now, I've just rearranged the elements on the webpage so that I can keep the Submit button near the rest of the revlet objects.
Thanks for your help!