How to create a new browser window

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

How to create a new browser window

Richard Eng
I was wondering: how can I create a new browser window from within a Seaside
app?

Right now, I have this method,

view: item
        WARenderLoop new call: (GSViewer new path: item path; yourself)

that brings up a new webpage, but I'd like to open it up in a new browser
window instead. (FYI, #view: is invoked by clicking on a clickBlock in a
WATableReport.)

Thanks,
Richard

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

Re: How to create a new browser window

Philippe Marschall
2007/10/4, Richard K Eng <[hidden email]>:

> I was wondering: how can I create a new browser window from within a Seaside
> app?
>
> Right now, I have this method,
>
> view: item
>         WARenderLoop new call: (GSViewer new path: item path; yourself)
>
> that brings up a new webpage, but I'd like to open it up in a new browser
> window instead. (FYI, #view: is invoked by clicking on a clickBlock in a
> WATableReport.)

html popupAnchor
    callback: [ self view: item ];
    with: ....

Cheers
Philippe

> Thanks,
> Richard
>
> _______________________________________________
> 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: How to create a new browser window

Richard Eng
In reply to this post by Richard Eng
I am aware of popupAnchor but that's not exactly what I want to do. From
within WATableReport, I don't have a html object and, at any rate, I don't
want the user to have to click on an additional button or anchor. Clicking
on the clickBlock of WATableReport should be enough to throw up a new
browser window immediately.

Regards,
Richard

2007/10/4, Richard K Eng <richard.eng at rogers.com>:

> I was wondering: how can I create a new browser window from within a
> Seaside
> app?
>
> Right now, I have this method,
>
> view: item
>         WARenderLoop new call: (GSViewer new path: item path; yourself)
>
> that brings up a new webpage, but I'd like to open it up in a new browser
> window instead. (FYI, #view: is invoked by clicking on a clickBlock in a
> WATableReport.)

html popupAnchor
    callback: [ self view: item ];
    with: ....

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: How to create a new browser window

Richard Eng
In reply to this post by Richard Eng
So no one has a suggestion or workaround? Is it really that difficult to do
what I want? Seems to me, what I want to do must be a fairly common idiom...

Richard

--------------
I am aware of popupAnchor but that's not exactly what I want to do. From
within WATableReport, I don't have a html object and, at any rate, I don't
want the user to have to click on an additional button or anchor. Clicking
on the clickBlock of WATableReport should be enough to throw up a new
browser window immediately.

Regards,
Richard

2007/10/4, Richard K Eng <richard.eng at rogers.com>:

> I was wondering: how can I create a new browser window from within a
> Seaside
> app?
>
> Right now, I have this method,
>
> view: item
>         WARenderLoop new call: (GSViewer new path: item path; yourself)
>
> that brings up a new webpage, but I'd like to open it up in a new browser
> window instead. (FYI, #view: is invoked by clicking on a clickBlock in a
> WATableReport.)

html popupAnchor
    callback: [ self view: item ];
    with: ....

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: How to create a new browser window

Philippe Marschall
In reply to this post by Richard Eng
2007/10/4, Richard K Eng <[hidden email]>:
> I am aware of popupAnchor but that's not exactly what I want to do. From
> within WATableReport, I don't have a html object and, at any rate, I don't
> want the user to have to click on an additional button or anchor. Clicking
> on the clickBlock of WATableReport should be enough to throw up a new
> browser window immediately.

Ce n'est pas si façile que ça.
The easiest way to go is probably to subclass WAReportColumn and
WATableReport. In your TableReport class override
#renderColumn:row:on: check if you're your special column class and if
yes do a #popupAnchor.

> So no one has a suggestion or workaround? Is it really that difficult to do
> what I want? Seems to me, what I want to do must be a fairly common idiom...

No, popus tend to be used by users of other frameworks who do not have
#call: or replaceable components and tend to annoy users. That's one
of the reasons why target="_blank" was removed from HTML

Cheers
Philippe

> Regards,
> Richard
>
> 2007/10/4, Richard K Eng <richard.eng at rogers.com>:
> > I was wondering: how can I create a new browser window from within a
> > Seaside
> > app?
> >
> > Right now, I have this method,
> >
> > view: item
> >         WARenderLoop new call: (GSViewer new path: item path; yourself)
> >
> > that brings up a new webpage, but I'd like to open it up in a new browser
> > window instead. (FYI, #view: is invoked by clicking on a clickBlock in a
> > WATableReport.)
>
> html popupAnchor
>     callback: [ self view: item ];
>     with: ....
>
> Cheers
> Philippe
>
> _______________________________________________
> 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: How to create a new browser window

Richard Eng
In reply to this post by Richard Eng
Thanks. I've decided to dispense with the popup.

Popups annoy me, too.  :-)

Regards,
Richard

------------
2007/10/4, Richard K Eng <richard.eng at rogers.com>:
> I am aware of popupAnchor but that's not exactly what I want to do. From
> within WATableReport, I don't have a html object and, at any rate, I don't
> want the user to have to click on an additional button or anchor. Clicking
> on the clickBlock of WATableReport should be enough to throw up a new
> browser window immediately.

Ce n'est pas si façile que ça.
The easiest way to go is probably to subclass WAReportColumn and
WATableReport. In your TableReport class override
#renderColumn:row:on: check if you're your special column class and if
yes do a #popupAnchor.

> So no one has a suggestion or workaround? Is it really that difficult to
> do
> what I want? Seems to me, what I want to do must be a fairly common
> idiom...

No, popus tend to be used by users of other frameworks who do not have
#call: or replaceable components and tend to annoy users. That's one
of the reasons why target="_blank" was removed from HTML

Cheers
Philippe

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