Canvas api for a button

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

Canvas api for a button

Brian Brown-2
Hello all,

I'm trying to create a simple cancel button on a form. I want it to  
perform "self answer: true" when clicked. This is my latest iteration:

        html button text: 'Cancel'; callback: [self answer: true].

but when I click it, it doesn't send the answer to the component, it  
doesn't do anything :)

Any thoughts?

Regards,

Brian


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

RE: Canvas api for a button

Ramon Leon-5
Try this...

html button callback: [self answer: true]; text: 'Cancel';

Remember, #text: is a synonym for #with:, which closes the tag, it must
always come last.

Ramon Leon
http://onsmalltalk.com 

> -----Original Message-----
> From: [hidden email]
> [mailto:[hidden email]] On Behalf
> Of Brian Brown
> Sent: Friday, November 03, 2006 9:11 AM
> To: The Squeak Enterprise Aubergines Server - general discussion.
> Subject: [Seaside] Canvas api for a button
>
> Hello all,
>
> I'm trying to create a simple cancel button on a form. I want
> it to perform "self answer: true" when clicked. This is my
> latest iteration:
>
> html button text: 'Cancel'; callback: [self answer: true].
>
> but when I click it, it doesn't send the answer to the
> component, it doesn't do anything :)
>
> Any thoughts?
>
> Regards,
>
> Brian
>
>
> _______________________________________________
> 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: Canvas api for a button

Brian Brown-2

On Nov 3, 2006, at 9:13 AM, Ramon Leon wrote:

> Try this...
>
> html button callback: [self answer: true]; text: 'Cancel';
>
> Remember, #text: is a synonym for #with:, which closes the tag, it  
> must
> always come last.

Ok, I followed the text: and it was sending #value:, but I should  
have kept going :)

Thanks!

Brian

>
> Ramon Leon
> http://onsmalltalk.com
>
>> -----Original Message-----
>> From: [hidden email]
>> [mailto:[hidden email]] On Behalf
>> Of Brian Brown
>> Sent: Friday, November 03, 2006 9:11 AM
>> To: The Squeak Enterprise Aubergines Server - general discussion.
>> Subject: [Seaside] Canvas api for a button
>>
>> Hello all,
>>
>> I'm trying to create a simple cancel button on a form. I want
>> it to perform "self answer: true" when clicked. This is my
>> latest iteration:
>>
>> html button text: 'Cancel'; callback: [self answer: true].
>>
>> but when I click it, it doesn't send the answer to the
>> component, it doesn't do anything :)
>>
>> Any thoughts?
>>
>> Regards,
>>
>> Brian
>>
>>
>> _______________________________________________
>> 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: Canvas api for a button

Brian Brown-2
In reply to this post by Ramon Leon-5
I spoke too soon, It still doesn't do anything. I'll keep looking...


Brian

On Nov 3, 2006, at 9:13 AM, Ramon Leon wrote:

> Try this...
>
> html button callback: [self answer: true]; text: 'Cancel';
>
> Remember, #text: is a synonym for #with:, which closes the tag, it  
> must
> always come last.
>
> Ramon Leon
> http://onsmalltalk.com
>
>> -----Original Message-----
>> From: [hidden email]
>> [mailto:[hidden email]] On Behalf
>> Of Brian Brown
>> Sent: Friday, November 03, 2006 9:11 AM
>> To: The Squeak Enterprise Aubergines Server - general discussion.
>> Subject: [Seaside] Canvas api for a button
>>
>> Hello all,
>>
>> I'm trying to create a simple cancel button on a form. I want
>> it to perform "self answer: true" when clicked. This is my
>> latest iteration:
>>
>> html button text: 'Cancel'; callback: [self answer: true].
>>
>> but when I click it, it doesn't send the answer to the
>> component, it doesn't do anything :)
>>
>> Any thoughts?
>>
>> Regards,
>>
>> Brian
>>
>>
>> _______________________________________________
>> 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: Canvas api for a button

Ramon Leon-5
>
> I spoke too soon, It still doesn't do anything. I'll keep looking...
>
>
> Brian
>

Silly question, but do you have it in a form?  Do buttons work outside a
form?

Ramon Leon
http://onsmalltalk.com 

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

Re: Canvas api for a button

Philippe Marschall
In reply to this post by Ramon Leon-5
2006/11/3, Ramon Leon <[hidden email]>:
> Try this...
>
> html button callback: [self answer: true]; text: 'Cancel';
>
> Remember, #text: is a synonym for #with:, which closes the tag, it must
> always come last.

Not for input tags. There it is a synonym for #value: an thus does not
have to be the last message.
Leaky abstractions ;)

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

Re: Canvas api for a button

Brian Brown-2
In reply to this post by Ramon Leon-5

On Nov 3, 2006, at 9:26 AM, Ramon Leon wrote:

>>
>> I spoke too soon, It still doesn't do anything. I'll keep looking...
>>
>>
>> Brian
>>
>
> Silly question, but do you have it in a form?  Do buttons work  
> outside a
> form?
>

Yes, I had it in a form; I changed it to this, and everything works  
fine:

        html submitButton callback: [self answer: true]; text: 'Cancel']


> Ramon Leon
> http://onsmalltalk.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