3.0.7 developer release

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
23 messages Options
12
Reply | Threaded
Open this post in threaded view
|

Re: Weird back button problem

Larry Kellogg
Hello Bob,
  I installed this code and went though all of the interfaces on my site. I only hit the halt once so I guess most of my code is ok.
I took out the extra form and don't hit this halt anymore. Thanks.

Regards,

Larry


On Apr 6, 2012, at 9:17 AM, Bob Arning wrote:

> This might help spot such problems:
>
> WAFormTag>>with:
>
> with: aBlock
>
>    | uniqueMessage |
>
>    uniqueMessage _ 'starting a form'.
>    Notification signal: uniqueMessage.
>    [
>        super with: aBlock
>    ] on: Notification do: [ :ex |
>        ex messageText = uniqueMessage ifTrue: [self halt].
>        ex pass
>    ]
>
> Cheers,
> Bob
>
> On 4/6/12 7:38 AM, Lawrence Kellogg wrote:
>> On Apr 6, 2012, at 7:05 AM, Johan Brichau wrote:
>>
>>> Larry,
>>>
>>> I'm really answering off the top of my head now, but nested html forms are indeed not allowed. It's likely that this is causing the trouble.
>>>
>>> You might consider replacing the cancel button with a cancel link (i.e. an anchor with 'cancel'). That probably will give you the behavior you are looking for.
>>> I'm never using a cancel button because we do it with links throughout the application.
>>   Yes, that is it! It works after I changed the 'html cancelButton' to 'html anchor'. Thanks, I never would have gotten that on my own.
>>
>>   I am a little confused about whether I nest html forms or not. I have so many different components with html form in them that I must be nesting forms. So, there should only one html form: for the entire page? Perhaps I can refactor my code to make that happen, although everything seems to work pretty well as it is written. What goes wrong when forms are nested?
>>
>>   Regards,
>>
>>   Larry
>>
>>
>>
>>>
>>>
>>> On 06 Apr 2012, at 12:48, Lawrence Kellogg wrote:
>>>
>>>> Johan,
>>>>  Unfortunately, changing it from value: to with: does not make any difference, the bug is still there. I looked through my code and it looks like I am calling html form: for all the resources I am rendering, as far as I can tell.
>>>>
>>>>  Does this snippet of code provide any clue?
>>>> ….
>>>> <form accept-charset="utf-8" method="post" action="/PracticeJournalLoginTask?_s=MQjCWJGC8kOo0deT&amp;_k=ZS373GZpYr33sacc"><br/>
>>>> <input class="btn submit" name="12" value="Back" type="submit"/>
>>>> <br/><br/><br/>
>>>> <form accept-charset="utf-8" method="post" action="/PracticeJournalLoginTask?_s=MQjCWJGC8kOo0deT&amp;_k=ZS373GZpYr33sacc"><object>
>>>> <param name="width" value="586"></param>
>>>> <param name="height" value="355"></param>
>>>> <param name="movie" value="http://www.youtube.com/v/PIlDmg2iFgA?fs=1&amp;hl=es&amp;rel=0&amp;cc_load_policy=1&amp;cc_lang_pref=es&amp;version=3"></param><param name="cc_load_policy" value="1"></param>
>>>> <param name="allowFullScreen" value="false"></param><param name="allowScriptAccess" value="always"></param>
>>>> <embed src="http://www.youtube.com/v/PIlDmg2iFgA?fs=1&amp;hl=es&amp;rel=0&amp;cc_load_policy=1&amp;cc_lang_pref=es&amp;version=3" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="false" width="586" height="355"></embed></object><br/></form><br/>
>>>>
>>>> <input class="btn submit" name="13" value="Back" type="submit"/><br/></form></div></div><div class="wa-toolbar"></div>
>>>>
>>>> <script type="text/javascript">/*<![CDATA[*/function onLoad(){};/*]]>*/</script></body></html>
>>>>
>>>> Regards,
>>>>
>>>> Larry
>>>> www.practicemusic.com
>>>>
>>>> On Apr 6, 2012, at 6:35 AM, Johan Brichau wrote:
>>>>
>>>>> It's a guess but did you try replacing
>>>>>
>>>>> value: 'Back'
>>>>>
>>>>> with
>>>>>
>>>>> with: 'Back'
>>>>>
>>>>> ?
>>>>>
>>>>> Otherwise, a snippet of the 'weird rendering' might help
>>>>>
>>>>> Johan
>>>>>
>>>>> On 05 Apr 2012, at 23:10, Lawrence Kellogg wrote:
>>>>>
>>>>>> Hello,
>>>>>> I noticed a weird issue with rendering the Back button. If I have
>>>>>>
>>>>>> renderBackButtonOn: html
>>>>>> html break.
>>>>>> html cancelButton
>>>>>> class: 'btn';
>>>>>> callback: [ self back ];
>>>>>> value: 'Back'.
>>>>>> html break
>>>>>>
>>>>>> and this:
>>>>>>
>>>>>> back
>>>>>> self answer: false
>>>>>>
>>>>>> and then this:
>>>>>>
>>>>>> html
>>>>>> form: [
>>>>>> self renderBackButtonOn: html.
>>>>>>
>>>>>> self resources do: [: each | html render: each].
>>>>>>
>>>>>> self renderBackButtonOn: html].
>>>>>>
>>>>>>
>>>>>> I often see the case where the first rendering of the Back button works correctly, but the last render does not work. I press the button and nothing happens. Any idea what is going on here?
>>>>>>
>>>>>> Regards,
>>>>>>
>>>>>> Larry Kellogg
>>>>>> www.practicemusic.com
>>>>>> _______________________________________________
>>>>>> seaside mailing list
>>>>>> [hidden email]
>>>>>> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
>>>>> _______________________________________________
>>>>> seaside mailing list
>>>>> [hidden email]
>>>>> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
>>>> _______________________________________________
>>>> seaside mailing list
>>>> [hidden email]
>>>> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
>>> _______________________________________________
>>> seaside mailing list
>>> [hidden email]
>>> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
>> _______________________________________________
>> seaside mailing list
>> [hidden email]
>> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
>>
> _______________________________________________
> seaside mailing list
> [hidden email]
> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside

_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

Re: Weird back button problem

Bob Arning-2
Could you tell if the html generated in that one case was actually not working correctly in some way (as in your original problem)?

Cheers,
Bob

On 4/6/12 4:18 PM, Lawrence Kellogg wrote:
Hello Bob,
  I installed this code and went though all of the interfaces on my site. I only hit the halt once so I guess most of my code is ok. 
I took out the extra form and don't hit this halt anymore. Thanks.

Regards,

Larry


On Apr 6, 2012, at 9:17 AM, Bob Arning wrote:

This might help spot such problems:

WAFormTag>>with:

with: aBlock

   | uniqueMessage |

   uniqueMessage _ 'starting a form'.
   Notification signal: uniqueMessage.
   [
       super with: aBlock
   ] on: Notification do: [ :ex |
       ex messageText = uniqueMessage ifTrue: [self halt].
       ex pass
   ]

Cheers,
Bob

On 4/6/12 7:38 AM, Lawrence Kellogg wrote:
On Apr 6, 2012, at 7:05 AM, Johan Brichau wrote:

Larry,

I'm really answering off the top of my head now, but nested html forms are indeed not allowed. It's likely that this is causing the trouble.

You might consider replacing the cancel button with a cancel link (i.e. an anchor with 'cancel'). That probably will give you the behavior you are looking for.
I'm never using a cancel button because we do it with links throughout the application.
  Yes, that is it! It works after I changed the 'html cancelButton' to 'html anchor'. Thanks, I never would have gotten that on my own.

  I am a little confused about whether I nest html forms or not. I have so many different components with html form in them that I must be nesting forms. So, there should only one html form: for the entire page? Perhaps I can refactor my code to make that happen, although everything seems to work pretty well as it is written. What goes wrong when forms are nested?

  Regards,

  Larry




On 06 Apr 2012, at 12:48, Lawrence Kellogg wrote:

Johan,
 Unfortunately, changing it from value: to with: does not make any difference, the bug is still there. I looked through my code and it looks like I am calling html form: for all the resources I am rendering, as far as I can tell.

 Does this snippet of code provide any clue?
….
<form accept-charset="utf-8" method="post" action="/PracticeJournalLoginTask?_s=MQjCWJGC8kOo0deT&amp;_k=ZS373GZpYr33sacc"><br/>
<input class="btn submit" name="12" value="Back" type="submit"/>
<br/><br/><br/>
<form accept-charset="utf-8" method="post" action="/PracticeJournalLoginTask?_s=MQjCWJGC8kOo0deT&amp;_k=ZS373GZpYr33sacc"><object>
<param name="width" value="586"></param>
<param name="height" value="355"></param>
<param name="movie" value="http://www.youtube.com/v/PIlDmg2iFgA?fs=1&amp;hl=es&amp;rel=0&amp;cc_load_policy=1&amp;cc_lang_pref=es&amp;version=3"></param><param name="cc_load_policy" value="1"></param>
<param name="allowFullScreen" value="false"></param><param name="allowScriptAccess" value="always"></param>
<embed src="http://www.youtube.com/v/PIlDmg2iFgA?fs=1&amp;hl=es&amp;rel=0&amp;cc_load_policy=1&amp;cc_lang_pref=es&amp;version=3" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="false" width="586" height="355"></embed></object><br/></form><br/>

<input class="btn submit" name="13" value="Back" type="submit"/><br/></form></div></div><div class="wa-toolbar"></div>

<script type="text/javascript">/*<![CDATA[*/function onLoad(){};/*]]>*/</script></body></html>

Regards,

Larry
www.practicemusic.com

On Apr 6, 2012, at 6:35 AM, Johan Brichau wrote:

It's a guess but did you try replacing

	value: 'Back'

with

	with: 'Back'

?

Otherwise, a snippet of the 'weird rendering' might help

Johan

On 05 Apr 2012, at 23:10, Lawrence Kellogg wrote:

Hello,
I noticed a weird issue with rendering the Back button. If I have

renderBackButtonOn: html
	html break.
	html cancelButton
		class: 'btn';
		callback: [ self back ];
		value: 'Back'.
	html break

and this:

back
	self answer: false

and then this:

	html
		form: [
			self renderBackButtonOn: html.

			self resources do: [: each | html render: each].
			
			self renderBackButtonOn: html].
		

I often see the case where the first rendering of the Back button works correctly, but the last render does not work. I press the button and nothing happens. Any idea what is going on here?

Regards,

Larry Kellogg
www.practicemusic.com
_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside

_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside


_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

Re: Weird back button problem

Larry Kellogg

On Apr 6, 2012, at 5:55 PM, Bob Arning wrote:

Could you tell if the html generated in that one case was actually not working correctly in some way (as in your original problem)?


  Actually, that code was working fine. It was a popup anchor button within a table. So, what does that tell us?

  Regards,

  Larry
 

Cheers,
Bob

On 4/6/12 4:18 PM, Lawrence Kellogg wrote:
Hello Bob,
  I installed this code and went though all of the interfaces on my site. I only hit the halt once so I guess most of my code is ok. 
I took out the extra form and don't hit this halt anymore. Thanks.

Regards,

Larry


On Apr 6, 2012, at 9:17 AM, Bob Arning wrote:

This might help spot such problems:

WAFormTag>>with:

with: aBlock

   | uniqueMessage |

   uniqueMessage _ 'starting a form'.
   Notification signal: uniqueMessage.
   [
       super with: aBlock
   ] on: Notification do: [ :ex |
       ex messageText = uniqueMessage ifTrue: [self halt].
       ex pass
   ]

Cheers,
Bob

On 4/6/12 7:38 AM, Lawrence Kellogg wrote:
On Apr 6, 2012, at 7:05 AM, Johan Brichau wrote:

Larry,

I'm really answering off the top of my head now, but nested html forms are indeed not allowed. It's likely that this is causing the trouble.

You might consider replacing the cancel button with a cancel link (i.e. an anchor with 'cancel'). That probably will give you the behavior you are looking for.
I'm never using a cancel button because we do it with links throughout the application.
  Yes, that is it! It works after I changed the 'html cancelButton' to 'html anchor'. Thanks, I never would have gotten that on my own.

  I am a little confused about whether I nest html forms or not. I have so many different components with html form in them that I must be nesting forms. So, there should only one html form: for the entire page? Perhaps I can refactor my code to make that happen, although everything seems to work pretty well as it is written. What goes wrong when forms are nested?

  Regards,

  Larry



On 06 Apr 2012, at 12:48, Lawrence Kellogg wrote:

Johan,
 Unfortunately, changing it from value: to with: does not make any difference, the bug is still there. I looked through my code and it looks like I am calling html form: for all the resources I am rendering, as far as I can tell.

 Does this snippet of code provide any clue?
….
<form accept-charset="utf-8" method="post" action="/PracticeJournalLoginTask?_s=MQjCWJGC8kOo0deT&amp;_k=ZS373GZpYr33sacc"><br/>
<input class="btn submit" name="12" value="Back" type="submit"/>
<br/><br/><br/>
<form accept-charset="utf-8" method="post" action="/PracticeJournalLoginTask?_s=MQjCWJGC8kOo0deT&amp;_k=ZS373GZpYr33sacc"><object>
<param name="width" value="586"></param>
<param name="height" value="355"></param>
<param name="movie" value="http://www.youtube.com/v/PIlDmg2iFgA?fs=1&amp;hl=es&amp;rel=0&amp;cc_load_policy=1&amp;cc_lang_pref=es&amp;version=3"></param><param name="cc_load_policy" value="1"></param>
<param name="allowFullScreen" value="false"></param><param name="allowScriptAccess" value="always"></param>
<embed src="http://www.youtube.com/v/PIlDmg2iFgA?fs=1&amp;hl=es&amp;rel=0&amp;cc_load_policy=1&amp;cc_lang_pref=es&amp;version=3" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="false" width="586" height="355"></embed></object><br/></form><br/>

<input class="btn submit" name="13" value="Back" type="submit"/><br/></form></div></div><div class="wa-toolbar"></div>

<script type="text/javascript">/*<![CDATA[*/function onLoad(){};/*]]>*/</script></body></html>

Regards,

Larry
www.practicemusic.com

On Apr 6, 2012, at 6:35 AM, Johan Brichau wrote:

It's a guess but did you try replacing

	value: 'Back'

with

	with: 'Back'

?

Otherwise, a snippet of the 'weird rendering' might help

Johan

On 05 Apr 2012, at 23:10, Lawrence Kellogg wrote:

Hello,
I noticed a weird issue with rendering the Back button. If I have

renderBackButtonOn: html
	html break.
	html cancelButton
		class: 'btn';
		callback: [ self back ];
		value: 'Back'.
	html break

and this:

back
	self answer: false

and then this:

	html
		form: [
			self renderBackButtonOn: html.

			self resources do: [: each | html render: each].
			
			self renderBackButtonOn: html].
		

I often see the case where the first rendering of the Back button works correctly, but the last render does not work. I press the button and nothing happens. Any idea what is going on here?

Regards,

Larry Kellogg
www.practicemusic.com
_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside

_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside

_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside


_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
12