Does anyone have a sample form usage that works with the new Canvas API
in Seaside 2.6+ that you'd like to share? I'm having some problems with my old school API version of a form and am not sure what the problem is and after browsing my Seaside code, I'm not sure if the stuff I'm looking at is the old or new.. By the way, why are a bunch of the Seaside classes now RED in VW after I upgraded my Seaside version from 2.5b8 to 2.6a2? Here' the form code that's giving me problems (note that most lines are commented out for debugging purposes..) : html form: [ html defaultAction: [self confirmLogin]. "html heading: 'Welcome to my site' level: 3." "html bold: 'Enter login name:'." "html textInputWithValue: '' callback: [:v | self login: v]." "html br; br." "html space; space; space; bold: Enter password:." "html passwordInputWithCallback: [:c | self password: ((MD5 hash: c) asHexString asLowercase) ]." "html paragraph." "html attributes value: Login!." "html submitButton." ]. _______________________________________________ Seaside mailing list [hidden email] http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside |
Rick Flower a écrit :
> Does anyone have a sample form usage that works with the new Canvas > API in Seaside 2.6+ that you'd like to share? > > I'm having some problems with my old school API version of a form and > am not sure what the problem is and after browsing > my Seaside code, I'm not sure if the stuff I'm looking at is the old > or new.. By the way, why are a bunch of the Seaside classes > now RED in VW after I upgraded my Seaside version from 2.5b8 to 2.6a2? > Let me make some assumption about what you actually did. 1) You started with VW 7.4 2) You loaded the SeasideForWebToolkit parcel into the image using the parcel manager; the Seaside parcels on the VW distribution are for version 2.5b8 3) Thereafter you loaded the SeasideForWebToolkit bundle (version 2.6a2.115.0 ?) from the public repository This is creating a mess (although it may work somehow). Instead, you should unload all the Seaside parcels prior to loading from the public repository or even better, you should rebuild a Seaside 2.6 image starting from a virgin image. In case you want to try the unload method, the parcels to unload are SeasideBase, SeasideForWebToolkit and SqueakBase. > Here' the form code that's giving me problems (note that most lines > are commented out for debugging purposes..) : > > html form: [ > html defaultAction: [self confirmLogin]. > "html heading: 'Welcome to my site' level: 3." > "html bold: 'Enter login name:'." > "html textInputWithValue: '' callback: [:v | self login: v]." > "html br; br." > "html space; space; space; bold: Enter password:." > "html passwordInputWithCallback: [:c | self password: ((MD5 > hash: c) asHexString asLowercase) ]." > "html paragraph." > "html attributes value: Login!." > "html submitButton." > ]. > However, I can quickly spot a few errors. a) You need quotes around 'Enter password'. b) You need quotes around 'Login!' c) You should use #break rather than #br. Also you may want to combine html attributes value: 'Login!'. html submitButton. as html submitButtonWithText: 'Login!'. I do not have a sample form usage, but the Canvas version of your code would look like this (html form) defaultAction: [self confirmLogin]; with: [(html heading) level3; with: 'Welcome to my site'. html bold: 'Enter login name:'. (html textInput) withValue: ''; callback: [:v | self login: v]. html break; break; space: 3; bold: 'Enter password:'. (html passwordInput) callback: [:c | self password: ((MD5 hash: c) asHexString asLowercase) ]. html paragraph. (html submitButton) text: 'Login!']. HTH Michel. > _______________________________________________ > 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 |
Michel Bany wrote:
> Rick Flower a écrit : > >> Does anyone have a sample form usage that works with the new Canvas >> API in Seaside 2.6+ that you'd like to share? >> >> I'm having some problems with my old school API version of a form and >> am not sure what the problem is and after browsing >> my Seaside code, I'm not sure if the stuff I'm looking at is the old >> or new.. By the way, why are a bunch of the Seaside classes >> now RED in VW after I upgraded my Seaside version from 2.5b8 to 2.6a2? >> > Let me make some assumption about what you actually did. > 1) You started with VW 7.4 > 2) You loaded the SeasideForWebToolkit parcel into the image using the > parcel manager; > the Seaside parcels on the VW distribution are for version 2.5b8 > 3) Thereafter you loaded the SeasideForWebToolkit bundle (version > 2.6a2.115.0 ?) > from the public repository > > This is creating a mess (although it may work somehow). Instead, you > should unload all > the Seaside parcels prior to loading from the public repository or > even better, you should > rebuild a Seaside 2.6 image starting from a virgin image. In case you > want to try the unload > method, the parcels to unload are SeasideBase, SeasideForWebToolkit > and SqueakBase. > the original VW image and re-loaded Seaside + Glorp and a few other things I had in my bad image and all seems to be working fine now.. Thanks.. I'll checkout the other stuff you had to say in the morning.. Thanks again! -- Rick _______________________________________________ Seaside mailing list [hidden email] http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside |
In reply to this post by Michel Bany-3
Michel Bany wrote:
> [ ... ] >> >> html form: [ >> html defaultAction: [self confirmLogin]. >> "html heading: 'Welcome to my site' level: 3." >> "html bold: 'Enter login name:'." >> "html textInputWithValue: '' callback: [:v | self login: v]." >> "html br; br." >> "html space; space; space; bold: Enter password:." >> "html passwordInputWithCallback: [:c | self password: ((MD5 >> hash: c) asHexString asLowercase) ]." >> "html paragraph." >> "html attributes value: Login!." >> "html submitButton." >> ]. >> > You did not say what symptoms are produced by your code. > However, I can quickly spot a few errors. > a) You need quotes around 'Enter password'. > b) You need quotes around 'Login!' > c) You should use #break rather than #br. > Also you may want to combine > html attributes value: 'Login!'. > html submitButton. > as > html submitButtonWithText: 'Login!'. Cool.. Good to know! > I do not have a sample form usage, but the Canvas version of your code > would look like this > > (html form) > defaultAction: [self confirmLogin]; > with: > [(html heading) > level3; > with: 'Welcome to my site'. > html bold: 'Enter login name:'. > (html textInput) > withValue: ''; > callback: [:v | self login: v]. > html > break; > break; > space: 3; > bold: 'Enter password:'. > (html passwordInput) > callback: [:c | self password: ((MD5 hash: c) > asHexString asLowercase) ]. > html paragraph. > (html submitButton) > text: 'Login!']. > "value:" since withValue doesn't exist.. I searched through the example code looking for other areas that used "textInput" and found that.. Thanks for the rest of the help.. The form appears to be working as expected.. Much thanks! -- Rick _______________________________________________ Seaside mailing list [hidden email] http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside |
Free forum by Nabble | Edit this page |