How do I subclass WASession

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

How do I subclass WASession

Long Haired David
 I have a problem when displaying my data screens on an iPad. I enlarge the text when displaying on an iPad as I want to see the data from a distance.  However, the buttons at the bottom of the form and the Home link are unchanged and thus are very small. I need to enlarge these as well.

One way would be to make the buttons larger but I am not even sure if that is possible. The other way that I can think of doing it is to  put a link on the bottom of the page in a large font size. However, to do this, the link would have to be able to send the data ID back to the previous page. In VAST WebConnection, I would do this by adding my own field to the SessionData object and saving the ID there. In all the Seaside documentation, people imply that this can be done but that I must subclass WASession. If I make a new object called - say - OBSLSession how would I ensure that this is used instead of the standard session. Sorry to be so ignorant.

BTW, the previous help on getting the browser ID worked perfectly.

David


Message sent using Winmail Mail Server

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

Re: How do I subclass WASession

Bob Nemec
David,
I use... 

application := WAAdmin register: MyApplication at: 'My Application Name'.
...
application preferenceAt: #sessionClass put: MySession.

HTH

Bob Nemec
HTS


On Wednesday, November 12, 2014 12:04 PM, David Pennington <[hidden email]> wrote:


 I have a problem when displaying my data screens on an iPad. I enlarge the text when displaying on an iPad as I want to see the data from a distance.  However, the buttons at the bottom of the form and the Home link are unchanged and thus are very small. I need to enlarge these as well.

One way would be to make the buttons larger but I am not even sure if that is possible. The other way that I can think of doing it is to  put a link on the bottom of the page in a large font size. However, to do this, the link would have to be able to send the data ID back to the previous page. In VAST WebConnection, I would do this by adding my own field to the SessionData object and saving the ID there. In all the Seaside documentation, people imply that this can be done but that I must subclass WASession. If I make a new object called - say - OBSLSession how would I ensure that this is used instead of the standard session. Sorry to be so ignorant.

BTW, the previous help on getting the browser ID worked perfectly.

David


Message sent using Winmail Mail Server

_______________________________________________
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
Bob Nemec
Reply | Threaded
Open this post in threaded view
|

Re: How do I subclass WASession

Udo Schneider
In reply to this post by Long Haired David
Hi David,

using your own WASession subclass is a (per-app) configuration option.
So you can either set it manually using the config app
(http:/127.0.0.1:8080/config) or by code. You can use something like
this when registering/configuring your app:

MyCoolWAApp class>>#register
   ^ (WAAdmin register: self asApplicationAt: 'coolapp')
     preferenceAt: #sessionClass put: MyCoolWASession;
     yourself

Just being curious: Why did you decide against CSS media queries to
render different sizes/styles to different devices?

CU,

Udo



On 12.11.14 17:56, David Pennington wrote:

>   I have a problem when displaying my data screens on an iPad. I enlarge
> the text when displaying on an iPad as I want to see the data from a
> distance.  However, the buttons at the bottom of the form and the Home
> link are unchanged and thus are very small. I need to enlarge these as well.
>
> One way would be to make the buttons larger but I am not even sure if
> that is possible. The other way that I can think of doing it is to  put
> a link on the bottom of the page in a large font size. However, to do
> this, the link would have to be able to send the data ID back to the
> previous page. In VAST WebConnection, I would do this by adding my own
> field to the SessionData object and saving the ID there. In all the
> Seaside documentation, people imply that this can be done but that I
> must subclass WASession. If I make a new object called - say -
> OBSLSession how would I ensure that this is used instead of the standard
> session. Sorry to be so ignorant.
>
> BTW, the previous help on getting the browser ID worked perfectly.
>
> David
>
> ------------------------------------------------------------------------
>
> Message sent using Winmail Mail Server
>
>
>
> _______________________________________________
> 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