Render into a separate document while sharing context

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

Render into a separate document while sharing context

NorbertHartl
I'm doing a page at the moment that contains a google map. On the html page there is a list with all entries and on the map there are the markers on the geo position.

To place a marker I need to call some javascript function. That function takes latitude, longitude and a definition of a window that pops up if the marker is pressed. The popup window needs to contain an html anchor. Therefor I need to add the callbacks to the current renderer.

Is there something that assists in doing this. WABuilder would be fine but it creates a new render context.

thanks,

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

Natural language translation

Larry Kellogg
  So, I would like to translate my Seaside site into French and Spanish. I probably should have kept all of the text in one place for easy translation, but that didn't happen. :-)

  Is there some place I can hook into the Seaside rendering cycle so as to lookup text strings in a dictionary and substitute the translated string?

Regards,

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

RE: Natural language translation

Boris Popov, DeepCove Labs (SNN)
Lawrence,

In VisualWorks you can use message catalogs to do the translation of
UserMessage instances during rendering depending on the locale of the
session,

(html label)
 for: 'form-company';
 with: #Company << #raven

en.lbl
 encoding: #UTF_8
 catalog: #raven
 cacheSize: 500
 Company='Company'

fr.lbl
 encoding: #UTF_8
 catalog: #raven
 cacheSize: 500
 Company='Entreprise'

de.lbl
 encoding: #UTF_8
 catalog: #raven
 cacheSize: 500
 Company='Firma'

HTH,

-Boris

-----Original Message-----
From: [hidden email]
[mailto:[hidden email]] On Behalf Of
Lawrence Kellogg
Sent: Wednesday, May 16, 2012 12:42 PM
To: Seaside - general discussion
Subject: [Seaside] Natural language translation

  So, I would like to translate my Seaside site into French and Spanish.
I probably should have kept all of the text in one place for easy
translation, but that didn't happen. :-)

  Is there some place I can hook into the Seaside rendering cycle so as
to lookup text strings in a dictionary and substitute the translated
string?

Regards,

Larry
_______________________________________________
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: Natural language translation

Boris Popov, DeepCove Labs (SNN)
As a hack, you could try doing this in String>>renderOn: as well.

-Boris


-----Original Message-----
From: [hidden email]
[mailto:[hidden email]] On Behalf Of Boris
Popov, DeepCove Labs
Sent: Wednesday, May 16, 2012 12:52 PM
To: Seaside - general discussion
Subject: RE: [Seaside] Natural language translation

Lawrence,

In VisualWorks you can use message catalogs to do the translation of
UserMessage instances during rendering depending on the locale of the
session,

(html label)
 for: 'form-company';
 with: #Company << #raven

en.lbl
 encoding: #UTF_8
 catalog: #raven
 cacheSize: 500
 Company='Company'

fr.lbl
 encoding: #UTF_8
 catalog: #raven
 cacheSize: 500
 Company='Entreprise'

de.lbl
 encoding: #UTF_8
 catalog: #raven
 cacheSize: 500
 Company='Firma'

HTH,

-Boris

-----Original Message-----
From: [hidden email]
[mailto:[hidden email]] On Behalf Of
Lawrence Kellogg
Sent: Wednesday, May 16, 2012 12:42 PM
To: Seaside - general discussion
Subject: [Seaside] Natural language translation

  So, I would like to translate my Seaside site into French and Spanish.
I probably should have kept all of the text in one place for easy
translation, but that didn't happen. :-)

  Is there some place I can hook into the Seaside rendering cycle so as
to lookup text strings in a dictionary and substitute the translated
string?

Regards,

Larry
_______________________________________________
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: Natural language translation

Larry Kellogg
In reply to this post by Boris Popov, DeepCove Labs (SNN)
Thanks, Boris, that's exactly what I need. Unfortunately, I'm on Pharo.

Maybe I can write something similar on my own.

Larry

Sent from my iPhone

On May 16, 2012, at 12:52 PM, "Boris Popov, DeepCove Labs" <[hidden email]> wrote:

> Lawrence,
>
> In VisualWorks you can use message catalogs to do the translation of
> UserMessage instances during rendering depending on the locale of the
> session,
>
> (html label)
> for: 'form-company';
> with: #Company << #raven
>
> en.lbl
> encoding: #UTF_8
> catalog: #raven
> cacheSize: 500
> Company='Company'
>
> fr.lbl
> encoding: #UTF_8
> catalog: #raven
> cacheSize: 500
> Company='Entreprise'
>
> de.lbl
> encoding: #UTF_8
> catalog: #raven
> cacheSize: 500
> Company='Firma'
>
> HTH,
>
> -Boris
>
> -----Original Message-----
> From: [hidden email]
> [mailto:[hidden email]] On Behalf Of
> Lawrence Kellogg
> Sent: Wednesday, May 16, 2012 12:42 PM
> To: Seaside - general discussion
> Subject: [Seaside] Natural language translation
>
>  So, I would like to translate my Seaside site into French and Spanish.
> I probably should have kept all of the text in one place for easy
> translation, but that didn't happen. :-)
>
>  Is there some place I can hook into the Seaside rendering cycle so as
> to lookup text strings in a dictionary and substitute the translated
> string?
>
> Regards,
>
> Larry
> _______________________________________________
> 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: Natural language translation

Yanni Chiu
On 16/05/12 12:56 PM, Lawrence Kellogg wrote:
> Thanks, Boris, that's exactly what I need. Unfortunately, I'm on Pharo.
>
> Maybe I can write something similar on my own.

Pharo/Squeak has had a multi-language framework for years.

Look at implementers of #translated, which should lead you to the class
NaturalLanguageTranslator.


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

Re: Natural language translation

fstephany
There is also the GetText package which can work with Seaside.

Sebastian wrote a blog post about a custom solution:
http://blog.flowingconcept.com/brandIt/multiligual-web-applications-design-ala-smalltalk


On 16/05/12 10:02, Yanni Chiu wrote:

> On 16/05/12 12:56 PM, Lawrence Kellogg wrote:
>> Thanks, Boris, that's exactly what I need. Unfortunately, I'm on Pharo.
>>
>> Maybe I can write something similar on my own.
>
> Pharo/Squeak has had a multi-language framework for years.
>
> Look at implementers of #translated, which should lead you to the class
> NaturalLanguageTranslator.
>
>
> _______________________________________________
> seaside mailing list
> [hidden email]
> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside

--
http://tulipemoutarde.be
CA: +1 778 558 3225
BE: +32 65 709 131
_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

Re: Natural language translation

Larry Kellogg
Thanks, Stephane and Yanni, I'll check it out.

Larry

Sent from my iPhone

On May 16, 2012, at 1:08 PM, Francois Stephany <[hidden email]> wrote:

> There is also the GetText package which can work with Seaside.
>
> Sebastian wrote a blog post about a custom solution:
> http://blog.flowingconcept.com/brandIt/multiligual-web-applications-design-ala-smalltalk
>
>
> On 16/05/12 10:02, Yanni Chiu wrote:
>> On 16/05/12 12:56 PM, Lawrence Kellogg wrote:
>>> Thanks, Boris, that's exactly what I need. Unfortunately, I'm on Pharo.
>>>
>>> Maybe I can write something similar on my own.
>>
>> Pharo/Squeak has had a multi-language framework for years.
>>
>> Look at implementers of #translated, which should lead you to the class
>> NaturalLanguageTranslator.
>>
>>
>> _______________________________________________
>> seaside mailing list
>> [hidden email]
>> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
>
> --
> http://tulipemoutarde.be
> CA: +1 778 558 3225
> BE: +32 65 709 131
> _______________________________________________
> 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: Render into a separate document while sharing context

Paul DeBruicker
In reply to this post by NorbertHartl
On 05/16/2012 09:16 AM, Norbert Hartl wrote:
> To place a marker I need to call some javascript function. That function takes latitude, longitude and a definition of a window that pops up if the marker is pressed. The popup window needs to contain an html anchor. Therefor I need to add the callbacks to the current renderer.
>
> Is there something that assists in doing this. WABuilder would be fine but it creates a new render context.
>
> thanks,
>
> Norbert____


Could you do something like what I suggested in the Zinc Callback Limit
thread a few days ago?

http://forum.world.st/Zinc-Callback-Limit-tp4630181p4630195.html
_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

Re: Render into a separate document while sharing context

NorbertHartl

Am 16.05.2012 um 20:50 schrieb Paul DeBruicker:

> On 05/16/2012 09:16 AM, Norbert Hartl wrote:
>> To place a marker I need to call some javascript function. That function takes latitude, longitude and a definition of a window that pops up if the marker is pressed. The popup window needs to contain an html anchor. Therefor I need to add the callbacks to the current renderer.
>>
>> Is there something that assists in doing this. WABuilder would be fine but it creates a new render context.
>>
>> thanks,
>>
>> Norbert____
>
>
> Could you do something like what I suggested in the Zinc Callback Limit thread a few days ago?
>
> http://forum.world.st/Zinc-Callback-Limit-tp4630181p4630195.html

I don't think so. You are tunneling virtual callbacks over one real callback. But that one real callback you need to draw in this canvas. My problem is the place where the rendered string should be drawn. Basically I have

...
   "this is anchor1"
   html anchor
        onClick: (html jQuery ajax ...)
        with: 'foo'.
   html script: (JSStream on: '

      var aMarker = new google.maps.Marker({
         position: new google.maps.LatLng(marker.lat, marker.lon),
         map: map
      });
      google.maps.event.addListener(aMarker, "click", clickedMarker);
      aMarker.info = new google.maps.InfoWindow({
         content: '<a href="...">foo</a>'
      }); '.
...

So I have anchor1 that is rendered on the canvas. Then I need to render a script on that canvas that creates a marker on a map. If you look at the "content: '<a..." there I need to render anchor1 (or similar) again. So it is perfect if the anchor registers its callback but then I need the string presentation of that link in order to be able to add it to the javascript stream. I have the impression that the solution is quite easy and I'm just missing a link.

Norbert


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

Re: Render into a separate document while sharing context

NorbertHartl
Or different asked:

Using

WARenderCanvas builder render: [:h| ...]

enables me to render something into a string. But if the rendered block produces callbacks they aren't registered anywhere and cannot be called aftwards, right?

Norbert
Am 17.05.2012 um 11:32 schrieb Norbert Hartl:

>
> Am 16.05.2012 um 20:50 schrieb Paul DeBruicker:
>
>> On 05/16/2012 09:16 AM, Norbert Hartl wrote:
>>> To place a marker I need to call some javascript function. That function takes latitude, longitude and a definition of a window that pops up if the marker is pressed. The popup window needs to contain an html anchor. Therefor I need to add the callbacks to the current renderer.
>>>
>>> Is there something that assists in doing this. WABuilder would be fine but it creates a new render context.
>>>
>>> thanks,
>>>
>>> Norbert____
>>
>>
>> Could you do something like what I suggested in the Zinc Callback Limit thread a few days ago?
>>
>> http://forum.world.st/Zinc-Callback-Limit-tp4630181p4630195.html
>
> I don't think so. You are tunneling virtual callbacks over one real callback. But that one real callback you need to draw in this canvas. My problem is the place where the rendered string should be drawn. Basically I have
>
> ...
>   "this is anchor1"
>   html anchor
> onClick: (html jQuery ajax ...)
>        with: 'foo'.
>   html script: (JSStream on: '
>
>      var aMarker = new google.maps.Marker({
>         position: new google.maps.LatLng(marker.lat, marker.lon),
>         map: map
>      });
>      google.maps.event.addListener(aMarker, "click", clickedMarker);
>      aMarker.info = new google.maps.InfoWindow({
>         content: '<a href="...">foo</a>'
>      }); '.
> ...
>
> So I have anchor1 that is rendered on the canvas. Then I need to render a script on that canvas that creates a marker on a map. If you look at the "content: '<a..." there I need to render anchor1 (or similar) again. So it is perfect if the anchor registers its callback but then I need the string presentation of that link in order to be able to add it to the javascript stream. I have the impression that the solution is quite easy and I'm just missing a link.
>
> Norbert
>
>
> _______________________________________________
> 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: Render into a separate document while sharing context

Paul DeBruicker
When I send a 'reset your password' email I think I'm doing what you're
asking about in your original question. e.g.

MyWAComponentSubclass>>#sendPasswordResetLinkToUser:html
newUrl := html context actionUrl
        withParameter:
                (html callbacks
                        store:
                                (WAValueCallback
                                        on: [self home.
                                                self show: (ResetPassword new user: member) ])).
                       
urlToEmail := html context resourceUrl greaseString , newUrl greaseString.

self sendMailWithUrl: urlToEmail toMember: member.



So when clicked in their email their browser opens up the 'reset
password' form in a page on my site.  It doesn't use WABuilder and does
store a callback that does get executed in the current render context.
It also expires when the current session expires.






On 05/17/2012 08:59 AM, Norbert Hartl wrote:

> Or different asked:
>
> Using
>
> WARenderCanvas builder render: [:h| ...]
>
> enables me to render something into a string. But if the rendered block produces callbacks they aren't registered anywhere and cannot be called aftwards, right?
>
> Norbert
> Am 17.05.2012 um 11:32 schrieb Norbert Hartl:
>
>>
>> Am 16.05.2012 um 20:50 schrieb Paul DeBruicker:
>>
>>> On 05/16/2012 09:16 AM, Norbert Hartl wrote:
>>>> To place a marker I need to call some javascript function. That function takes latitude, longitude and a definition of a window that pops up if the marker is pressed. The popup window needs to contain an html anchor. Therefor I need to add the callbacks to the current renderer.
>>>>
>>>> Is there something that assists in doing this. WABuilder would be fine but it creates a new render context.
>>>>
>>>> thanks,
>>>>
>>>> Norbert____
>>>
>>>
>>> Could you do something like what I suggested in the Zinc Callback Limit thread a few days ago?
>>>
>>> http://forum.world.st/Zinc-Callback-Limit-tp4630181p4630195.html
>>
>> I don't think so. You are tunneling virtual callbacks over one real callback. But that one real callback you need to draw in this canvas. My problem is the place where the rendered string should be drawn. Basically I have
>>
>> ...
>>    "this is anchor1"
>>    html anchor
>> onClick: (html jQuery ajax ...)
>>         with: 'foo'.
>>    html script: (JSStream on: '
>>
>>       var aMarker = new google.maps.Marker({
>>          position: new google.maps.LatLng(marker.lat, marker.lon),
>>          map: map
>>       });
>>       google.maps.event.addListener(aMarker, "click", clickedMarker);
>>       aMarker.info = new google.maps.InfoWindow({
>>          content: '<a href="...">foo</a>'
>>       }); '.
>> ...
>>
>> So I have anchor1 that is rendered on the canvas. Then I need to render a script on that canvas that creates a marker on a map. If you look at the "content: '<a..." there I need to render anchor1 (or similar) again. So it is perfect if the anchor registers its callback but then I need the string presentation of that link in order to be able to add it to the javascript stream. I have the impression that the solution is quite easy and I'm just missing a link.
>>
>> Norbert
>>
>>
>> _______________________________________________
>> 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: Render into a separate document while sharing context

NorbertHartl
Paul,


Am 17.05.2012 um 18:19 schrieb Paul DeBruicker:

> When I send a 'reset your password' email I think I'm doing what you're asking about in your original question. e.g.
>
> MyWAComponentSubclass>>#sendPasswordResetLinkToUser:html
> newUrl := html context actionUrl
> withParameter:
> (html callbacks
> store:
> (WAValueCallback
> on: [self home.
> self show: (ResetPassword new user: member) ])).
>
> urlToEmail := html context resourceUrl greaseString , newUrl greaseString.
>
> self sendMailWithUrl: urlToEmail toMember: member.
>
>
>
> So when clicked in their email their browser opens up the 'reset password' form in a page on my site.  It doesn't use WABuilder and does store a callback that does get executed in the current render context. It also expires when the current session expires.
>
Thanks for this tip. This is part of the solution I need. I need also to render some markup surrounding that link. So I'm looking for some intermediate canvas that can be drawn on and from which I can get the html as string.

thanks,

Norbert

>
>
>
>
>
> On 05/17/2012 08:59 AM, Norbert Hartl wrote:
>> Or different asked:
>>
>> Using
>>
>> WARenderCanvas builder render: [:h| ...]
>>
>> enables me to render something into a string. But if the rendered block produces callbacks they aren't registered anywhere and cannot be called aftwards, right?
>>
>> Norbert
>> Am 17.05.2012 um 11:32 schrieb Norbert Hartl:
>>
>>>
>>> Am 16.05.2012 um 20:50 schrieb Paul DeBruicker:
>>>
>>>> On 05/16/2012 09:16 AM, Norbert Hartl wrote:
>>>>> To place a marker I need to call some javascript function. That function takes latitude, longitude and a definition of a window that pops up if the marker is pressed. The popup window needs to contain an html anchor. Therefor I need to add the callbacks to the current renderer.
>>>>>
>>>>> Is there something that assists in doing this. WABuilder would be fine but it creates a new render context.
>>>>>
>>>>> thanks,
>>>>>
>>>>> Norbert____
>>>>
>>>>
>>>> Could you do something like what I suggested in the Zinc Callback Limit thread a few days ago?
>>>>
>>>> http://forum.world.st/Zinc-Callback-Limit-tp4630181p4630195.html
>>>
>>> I don't think so. You are tunneling virtual callbacks over one real callback. But that one real callback you need to draw in this canvas. My problem is the place where the rendered string should be drawn. Basically I have
>>>
>>> ...
>>>  "this is anchor1"
>>>  html anchor
>>> onClick: (html jQuery ajax ...)
>>>       with: 'foo'.
>>>  html script: (JSStream on: '
>>>
>>>     var aMarker = new google.maps.Marker({
>>>        position: new google.maps.LatLng(marker.lat, marker.lon),
>>>        map: map
>>>     });
>>>     google.maps.event.addListener(aMarker, "click", clickedMarker);
>>>     aMarker.info = new google.maps.InfoWindow({
>>>        content: '<a href="...">foo</a>'
>>>     }); '.
>>> ...
>>>
>>> So I have anchor1 that is rendered on the canvas. Then I need to render a script on that canvas that creates a marker on a map. If you look at the "content: '<a..." there I need to render anchor1 (or similar) again. So it is perfect if the anchor registers its callback but then I need the string presentation of that link in order to be able to add it to the javascript stream. I have the impression that the solution is quite easy and I'm just missing a link.
>>>
>>> Norbert
>>>
>>>
>>> _______________________________________________
>>> 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: Render into a separate document while sharing context

NorbertHartl
Just for the record. What I was looking for is

^ String streamContents: [:stream| | canvas |
      canvas := WARenderCanvas new
         initializeWithContext: (
            aCanvas context copy
               document: (WAHtmlDocument  on: stream codec: GRNullCodec new)).
         aBlock value: canvas.
         canvas flush ]

Norbert

Am 22.05.2012 um 17:42 schrieb Norbert Hartl:

> Paul,
>
>
> Am 17.05.2012 um 18:19 schrieb Paul DeBruicker:
>
>> When I send a 'reset your password' email I think I'm doing what you're asking about in your original question. e.g.
>>
>> MyWAComponentSubclass>>#sendPasswordResetLinkToUser:html
>> newUrl := html context actionUrl
>> withParameter:
>> (html callbacks
>> store:
>> (WAValueCallback
>> on: [self home.
>> self show: (ResetPassword new user: member) ])).
>>
>> urlToEmail := html context resourceUrl greaseString , newUrl greaseString.
>>
>> self sendMailWithUrl: urlToEmail toMember: member.
>>
>>
>>
>> So when clicked in their email their browser opens up the 'reset password' form in a page on my site.  It doesn't use WABuilder and does store a callback that does get executed in the current render context. It also expires when the current session expires.
>>
> Thanks for this tip. This is part of the solution I need. I need also to render some markup surrounding that link. So I'm looking for some intermediate canvas that can be drawn on and from which I can get the html as string.
>
> thanks,
>
> Norbert
>>
>>
>>
>>
>>
>> On 05/17/2012 08:59 AM, Norbert Hartl wrote:
>>> Or different asked:
>>>
>>> Using
>>>
>>> WARenderCanvas builder render: [:h| ...]
>>>
>>> enables me to render something into a string. But if the rendered block produces callbacks they aren't registered anywhere and cannot be called aftwards, right?
>>>
>>> Norbert
>>> Am 17.05.2012 um 11:32 schrieb Norbert Hartl:
>>>
>>>>
>>>> Am 16.05.2012 um 20:50 schrieb Paul DeBruicker:
>>>>
>>>>> On 05/16/2012 09:16 AM, Norbert Hartl wrote:
>>>>>> To place a marker I need to call some javascript function. That function takes latitude, longitude and a definition of a window that pops up if the marker is pressed. The popup window needs to contain an html anchor. Therefor I need to add the callbacks to the current renderer.
>>>>>>
>>>>>> Is there something that assists in doing this. WABuilder would be fine but it creates a new render context.
>>>>>>
>>>>>> thanks,
>>>>>>
>>>>>> Norbert____
>>>>>
>>>>>
>>>>> Could you do something like what I suggested in the Zinc Callback Limit thread a few days ago?
>>>>>
>>>>> http://forum.world.st/Zinc-Callback-Limit-tp4630181p4630195.html
>>>>
>>>> I don't think so. You are tunneling virtual callbacks over one real callback. But that one real callback you need to draw in this canvas. My problem is the place where the rendered string should be drawn. Basically I have
>>>>
>>>> ...
>>>> "this is anchor1"
>>>> html anchor
>>>> onClick: (html jQuery ajax ...)
>>>>      with: 'foo'.
>>>> html script: (JSStream on: '
>>>>
>>>>    var aMarker = new google.maps.Marker({
>>>>       position: new google.maps.LatLng(marker.lat, marker.lon),
>>>>       map: map
>>>>    });
>>>>    google.maps.event.addListener(aMarker, "click", clickedMarker);
>>>>    aMarker.info = new google.maps.InfoWindow({
>>>>       content: '<a href="...">foo</a>'
>>>>    }); '.
>>>> ...
>>>>
>>>> So I have anchor1 that is rendered on the canvas. Then I need to render a script on that canvas that creates a marker on a map. If you look at the "content: '<a..." there I need to render anchor1 (or similar) again. So it is perfect if the anchor registers its callback but then I need the string presentation of that link in order to be able to add it to the javascript stream. I have the impression that the solution is quite easy and I'm just missing a link.
>>>>
>>>> Norbert
>>>>
>>>>
>>>> _______________________________________________
>>>> 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