Hi All,
There seems to be a buglet in the browser concerning class variables. When you select and right click on a class variable in the browser it brings up a walk-back. I'm not sure what the procedure is for applying fixes to the code base and have included the fix below: OBCmdBrowseReferencesOfIt>>globalReference | binding | target hasSelector ifFalse: [ ^ nil ]. (requestor selectedClass notNil and: [ (binding := requestor selectedClass bindingOf: target selector) notNil and:[binding value notNil] ]) ifTrue: [ ^ binding value asNode ]. (binding := Smalltalk classNamed: target selector) notNil ifTrue: [ ^ binding value asNode ]. ^ nil I've added the phrase: "and:[binding value notNil]". T. Ted Wrinch _______________________________________________ seaside mailing list [hidden email] http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside |
Thanks I integrated it with
Name: OB-Standard-lr.543 Author: lr Time: 13 July 2011, 9:31:10 am UUID: 51c5067d-fa7e-4d02-8c4a-84fce6c421b2 Ancestors: OB-Standard-lr.542 - fixes a problem with references of class variables (thanks go to Ted Wrinch) Lukas On 13 July 2011 08:42, Ted Wrinch <[hidden email]> wrote: > Hi All, > > There seems to be a buglet in the browser concerning class variables. When you select and right click on a class variable in the browser it brings up a walk-back. I'm not sure what the procedure is for applying fixes to the code base and have included the fix below: > > OBCmdBrowseReferencesOfIt>>globalReference > | binding | > target hasSelector > ifFalse: [ ^ nil ]. > (requestor selectedClass notNil and: [ (binding := requestor selectedClass bindingOf: target selector) notNil and:[binding value notNil] ]) > ifTrue: [ ^ binding value asNode ]. > (binding := Smalltalk classNamed: target selector) notNil > ifTrue: [ ^ binding value asNode ]. > ^ nil > > I've added the phrase: "and:[binding value notNil]". > > T. > > Ted Wrinch > > > > > _______________________________________________ > seaside mailing list > [hidden email] > http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside > -- Lukas Renggli www.lukas-renggli.ch _______________________________________________ seaside mailing list [hidden email] http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside |
Glad to be of help.
T. Ted Wrinch On 13 Jul 2011, at 08:31, Lukas Renggli wrote: > Thanks I integrated it with > > Name: OB-Standard-lr.543 > Author: lr > Time: 13 July 2011, 9:31:10 am > UUID: 51c5067d-fa7e-4d02-8c4a-84fce6c421b2 > Ancestors: OB-Standard-lr.542 > > - fixes a problem with references of class variables (thanks go to Ted Wrinch) > > Lukas > > On 13 July 2011 08:42, Ted Wrinch <[hidden email]> wrote: >> Hi All, >> >> There seems to be a buglet in the browser concerning class variables. When you select and right click on a class variable in the browser it brings up a walk-back. I'm not sure what the procedure is for applying fixes to the code base and have included the fix below: >> >> OBCmdBrowseReferencesOfIt>>globalReference >> | binding | >> target hasSelector >> ifFalse: [ ^ nil ]. >> (requestor selectedClass notNil and: [ (binding := requestor selectedClass bindingOf: target selector) notNil and:[binding value notNil] ]) >> ifTrue: [ ^ binding value asNode ]. >> (binding := Smalltalk classNamed: target selector) notNil >> ifTrue: [ ^ binding value asNode ]. >> ^ nil >> >> I've added the phrase: "and:[binding value notNil]". >> >> T. >> >> Ted Wrinch >> >> >> >> >> _______________________________________________ >> seaside mailing list >> [hidden email] >> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside >> > > > > -- > Lukas Renggli > www.lukas-renggli.ch > _______________________________________________ > 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 |
In reply to this post by Lukas Renggli
Found another one Lukas,
If you go to a class variable usage in the browser, say DefaultDirectory in FileDirectory>>default, and select and right click it, Seaside brings up a walk-back. My fix for this re-writes the existing method a little by using '&' instead of the older 'and:', which I find clearer. What I've done is check that the value can respond to #asNode: globalReference | binding | target hasSelector ifFalse: [ ^ nil ]. (requestor selectedClass notNil & (binding := requestor selectedClass bindingOf: target selector) notNil & binding value notNil & (binding value class selectors includes: #asNode)) ifTrue: [ ^ binding value asNode ]. (binding := Smalltalk classNamed: target selector) notNil ifTrue: [ ^ binding value asNode ]. ^ nil T. Ted Wrinch On 13 Jul 2011, at 08:31, Lukas Renggli wrote: > Thanks I integrated it with > > Name: OB-Standard-lr.543 > Author: lr > Time: 13 July 2011, 9:31:10 am > UUID: 51c5067d-fa7e-4d02-8c4a-84fce6c421b2 > Ancestors: OB-Standard-lr.542 > > - fixes a problem with references of class variables (thanks go to Ted Wrinch) > > Lukas > > On 13 July 2011 08:42, Ted Wrinch <[hidden email]> wrote: >> Hi All, >> >> There seems to be a buglet in the browser concerning class variables. When you select and right click on a class variable in the browser it brings up a walk-back. I'm not sure what the procedure is for applying fixes to the code base and have included the fix below: >> >> OBCmdBrowseReferencesOfIt>>globalReference >> | binding | >> target hasSelector >> ifFalse: [ ^ nil ]. >> (requestor selectedClass notNil and: [ (binding := requestor selectedClass bindingOf: target selector) notNil and:[binding value notNil] ]) >> ifTrue: [ ^ binding value asNode ]. >> (binding := Smalltalk classNamed: target selector) notNil >> ifTrue: [ ^ binding value asNode ]. >> ^ nil >> >> I've added the phrase: "and:[binding value notNil]". >> >> T. >> >> Ted Wrinch >> >> >> >> >> _______________________________________________ >> seaside mailing list >> [hidden email] >> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside >> > > > > -- > Lukas Renggli > www.lukas-renggli.ch > _______________________________________________ > 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 |
Hello Ted,
i think it is better to use 'binding value canRespondTo:' instead of 'binding value class selectors includes:' because #canRespondTo: includes all superclasses of 'binding value' too. mit freundlichen Grüßen / best regards,
Ted Wrinch wrote: Found another one Lukas, If you go to a class variable usage in the browser, say DefaultDirectory in FileDirectory>>default, and select and right click it, Seaside brings up a walk-back. My fix for this re-writes the existing method a little by using '&' instead of the older 'and:', which I find clearer. What I've done is check that the value can respond to #asNode: globalReference | binding | target hasSelector ifFalse: [ ^ nil ]. (requestor selectedClass notNil & (binding := requestor selectedClass bindingOf: target selector) notNil & binding value notNil & (binding value class selectors includes: #asNode)) ifTrue: [ ^ binding value asNode ]. (binding := Smalltalk classNamed: target selector) notNil ifTrue: [ ^ binding value asNode ]. ^ nil T. Ted Wrinch On 13 Jul 2011, at 08:31, Lukas Renggli wrote:Thanks I integrated it with Name: OB-Standard-lr.543 Author: lr Time: 13 July 2011, 9:31:10 am UUID: 51c5067d-fa7e-4d02-8c4a-84fce6c421b2 Ancestors: OB-Standard-lr.542 - fixes a problem with references of class variables (thanks go to Ted Wrinch) Lukas On 13 July 2011 08:42, Ted Wrinch [hidden email] wrote:Hi All, There seems to be a buglet in the browser concerning class variables. When you select and right click on a class variable in the browser it brings up a walk-back. I'm not sure what the procedure is for applying fixes to the code base and have included the fix below: OBCmdBrowseReferencesOfIt>>globalReference | binding | target hasSelector ifFalse: [ ^ nil ]. (requestor selectedClass notNil and: [ (binding := requestor selectedClass bindingOf: target selector) notNil and:[binding value notNil] ]) ifTrue: [ ^ binding value asNode ]. (binding := Smalltalk classNamed: target selector) notNil ifTrue: [ ^ binding value asNode ]. ^ nil I've added the phrase: "and:[binding value notNil]". T. Ted Wrinch _______________________________________________ seaside mailing list [hidden email] http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside-- Lukas Renggli www.lukas-renggli.ch _______________________________________________ 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 |
In reply to this post by Ted Wrinch
On 14 Jul 2011, at 09:56, Ted Wrinch wrote: > by using '&' instead of the older 'and:' Ted, beware, these are not equivalent ! & always evaluates its argument and: only evaluates its argument when necessary ('short circuit boolean evalution'). Sven _______________________________________________ seaside mailing list [hidden email] http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside |
In reply to this post by Ted Wrinch
> If you go to a class variable usage in the browser, say DefaultDirectory in FileDirectory>>default, and select and right click it, Seaside brings up a walk-back.
I cannot reproduce that. Also note, that this is not Seaside related, but OmniBrowser (I thus reply to the Pharo list). > My fix for this re-writes the existing method a little by using '&' instead of the older 'and:', which I find clearer. What I've done is check that the value can respond to #asNode: > > globalReference > | binding | > target hasSelector > ifFalse: [ ^ nil ]. > (requestor selectedClass notNil & (binding := requestor selectedClass bindingOf: target selector) notNil & binding value notNil & (binding value class selectors includes: #asNode)) > ifTrue: [ ^ binding value asNode ]. > (binding := Smalltalk classNamed: target selector) notNil > ifTrue: [ ^ binding value asNode ]. > ^ nil This certainly introduces other bugs. The use of the non-eager #and: is intentional, because if "requestor selectedClass" is nil, "requestor selectedClass bindingOf:" is not supposed to be evaluated. Lukas -- Lukas Renggli www.lukas-renggli.ch _______________________________________________ seaside mailing list [hidden email] http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside |
In reply to this post by Josef Springer
Finally tried some Seaside and going well for now but once I add an
Apache server to my configuration I'm getting this error. The page displays but no css, javascript or images are displayed. Browsing directly to the Smalltalk server port works fine. I checked the mime.types files on the Apache Server and that looks ok. Any idea what I should/can try ? Greetings, Dirk _______________________________________________ seaside mailing list [hidden email] http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside |
In reply to this post by Josef Springer
You're right Josef,
I thought of that too but couldn't quite remember/find the selector. It's been nearly 15 years now since I've done any Smalltalk (was a great fan for 5 years in the early 90s)! T.
Ted Wrinch
On 14 Jul 2011, at 09:05, Josef Springer wrote:
_______________________________________________ seaside mailing list [hidden email] http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside |
In reply to this post by Sven Van Caekenberghe
Damn - I suspected something like that and did a few tests; but not well enough it seems. It's a shame, as '&' is much simpler to write (some things I was never too keen on in the original Smalltalk). '&&' might be a candidate for an 'and:' alternative; but I could understand people not liking this ugly C syntax either.
T. Ted Wrinch On 14 Jul 2011, at 09:10, Sven Van Caekenberghe wrote: > > On 14 Jul 2011, at 09:56, Ted Wrinch wrote: > >> by using '&' instead of the older 'and:' > > Ted, beware, these are not equivalent ! > > & always evaluates its argument > and: only evaluates its argument when necessary ('short circuit boolean evalution'). > > Sven > > _______________________________________________ > 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 |
In reply to this post by Ted Wrinch
He Ted,
will be a mutch greater fun now ! mit freundlichen Grüßen / best regards,
Ted Wrinch wrote: You're right Josef, _______________________________________________ seaside mailing list [hidden email] http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside |
In reply to this post by Dirk Verleysen-2
Got most of the problems solved by changing the DocumentRoot in my
Apache configuration and a rename of some of my document directory. Still having problems though with the javascript files/ that are generated by Seaside. They are not passed correctly by Apache. Any idea what I should do for these ? Op 14/07/2011 10:36, Dirk Verleysen schreef: > Finally tried some Seaside and going well for now but once I add an > Apache server to my configuration I'm getting this error. The page > displays but no css, javascript or images are displayed. > > Browsing directly to the Smalltalk server port works fine. I checked > the mime.types files on the Apache Server and that looks ok. Any idea > what I should/can try ? > > Greetings, > > Dirk > > _______________________________________________ > 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 |
In reply to this post by Ted Wrinch
Not really, the behavior with the lazy and eager evaluation can be
understood even without looking at the code (#and: expects a block, #& a value). Lukas On Thursday, 14 July 2011, Ted Wrinch <[hidden email]> wrote: > Damn - I suspected something like that and did a few tests; but not well enough it seems. It's a shame, as '&' is much simpler to write (some things I was never too keen on in the original Smalltalk). '&&' might be a candidate for an 'and:' alternative; but I could understand people not liking this ugly C syntax either. > > T. > > Ted Wrinch > > > > > On 14 Jul 2011, at 09:10, Sven Van Caekenberghe wrote: > >> >> On 14 Jul 2011, at 09:56, Ted Wrinch wrote: >> >>> by using '&' instead of the older 'and:' >> >> Ted, beware, these are not equivalent ! >> >> & always evaluates its argument >> and: only evaluates its argument when necessary ('short circuit boolean evalution'). >> >> Sven >> >> _______________________________________________ >> 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 > -- Lukas Renggli www.lukas-renggli.ch _______________________________________________ seaside mailing list [hidden email] http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside |
In reply to this post by Lukas Renggli
I guessed it was Omnibrowser, but I will try and post to the appropriate list. Actually, I've just checked Pharo and I can reproduce neither issue there so maybe Seaside isn't the worst list for this. BTW: I'm guessing OB provides all those nice code checking and refactoring tools; in which case I thinks it's a great addition to the Smalltalk environment. One thing I would suggest adding is colour coding for errors in methods that are selected in the browser. It currently only checks code that is being added or modified. It would be particularly helpful feature to partially overcome Smalltalk's weakness in allowing code to exist which references non-existent, renamed or removed methods.
Ok, I've gone back to a clean Seaside image and changed the offending line back to: (requestor selectedClass notNil and: [ (binding := requestor selectedClass bindingOf: target selector) notNil and:[binding value notNil]]) For this case if I go to the ButtonDecodeTable class variable in InputEventSensor and right click I get a walk-back. If I change the line further to: (requestor selectedClass notNil and: [ (binding := requestor selectedClass bindingOf: target selector) notNil and:[binding value notNil and:[binding value class canUnderstand: #asNode]]]) I don't. But testing is hard and I maybe missing something here. T. Ted Wrinch On 14 Jul 2011, at 09:12, Lukas Renggli wrote: >> If you go to a class variable usage in the browser, say DefaultDirectory in FileDirectory>>default, and select and right click it, Seaside brings up a walk-back. > > I cannot reproduce that. > > Also note, that this is not Seaside related, but OmniBrowser (I thus > reply to the Pharo list). > >> My fix for this re-writes the existing method a little by using '&' instead of the older 'and:', which I find clearer. What I've done is check that the value can respond to #asNode: >> >> globalReference >> | binding | >> target hasSelector >> ifFalse: [ ^ nil ]. >> (requestor selectedClass notNil & (binding := requestor selectedClass bindingOf: target selector) notNil & binding value notNil & (binding value class selectors includes: #asNode)) >> ifTrue: [ ^ binding value asNode ]. >> (binding := Smalltalk classNamed: target selector) notNil >> ifTrue: [ ^ binding value asNode ]. >> ^ nil > > This certainly introduces other bugs. The use of the non-eager #and: > is intentional, because if "requestor selectedClass" is nil, > "requestor selectedClass bindingOf:" is not supposed to be evaluated. > > Lukas > > -- > Lukas Renggli > www.lukas-renggli.ch > _______________________________________________ > 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 |
In reply to this post by Dirk Verleysen-2
Did you follow the instructions on book.seaside.st, this is described
in great detail? Lukas On Thursday, 14 July 2011, Dirk Verleysen <[hidden email]> wrote: > Got most of the problems solved by changing the DocumentRoot in my Apache configuration and a rename of some of my document directory. Still having problems though with the javascript files/ that are generated by Seaside. They are not passed correctly by Apache. Any idea what I should do for these ? > > Op 14/07/2011 10:36, Dirk Verleysen schreef: > > Finally tried some Seaside and going well for now but once I add an Apache server to my configuration I'm getting this error. The page displays but no css, javascript or images are displayed. > > Browsing directly to the Smalltalk server port works fine. I checked the mime.types files on the Apache Server and that looks ok. Any idea what I should/can try ? > > Greetings, > > Dirk > > _______________________________________________ > 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 > -- Lukas Renggli www.lukas-renggli.ch _______________________________________________ seaside mailing list [hidden email] http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside |
Got it working ! Think it would be nice if you could use Swazoo for just
a minor site and don't have the extra config trouble of Apache. Op 14/07/2011 15:22, Lukas Renggli schreef: > Did you follow the instructions on book.seaside.st, this is described > in great detail? > > Lukas > > On Thursday, 14 July 2011, Dirk Verleysen<[hidden email]> wrote: >> Got most of the problems solved by changing the DocumentRoot in my Apache configuration and a rename of some of my document directory. Still having problems though with the javascript files/ that are generated by Seaside. They are not passed correctly by Apache. Any idea what I should do for these ? >> >> Op 14/07/2011 10:36, Dirk Verleysen schreef: >> >> Finally tried some Seaside and going well for now but once I add an Apache server to my configuration I'm getting this error. The page displays but no css, javascript or images are displayed. >> >> Browsing directly to the Smalltalk server port works fine. I checked the mime.types files on the Apache Server and that looks ok. Any idea what I should/can try ? >> >> Greetings, >> >> Dirk >> >> _______________________________________________ >> 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 |
In reply to this post by Ted Wrinch
Load the OB package I fixed, because I had to change a few other
things to get everything working correctly. Your suggested patch alone did not solve all problems. Lukas On Thursday, 14 July 2011, Ted Wrinch <[hidden email]> wrote: > I guessed it was Omnibrowser, but I will try and post to the appropriate list. Actually, I've just checked Pharo and I can reproduce neither issue there so maybe Seaside isn't the worst list for this. BTW: I'm guessing OB provides all those nice code checking and refactoring tools; in which case I thinks it's a great addition to the Smalltalk environment. One thing I would suggest adding is colour coding for errors in methods that are selected in the browser. It currently only checks code that is being added or modified. It would be particularly helpful feature to partially overcome Smalltalk's weakness in allowing code to exist which references non-existent, renamed or removed methods. > > Ok, I've gone back to a clean Seaside image and changed the offending line back to: > > (requestor selectedClass notNil and: [ (binding := requestor selectedClass bindingOf: target selector) notNil and:[binding value notNil]]) > > For this case if I go to the ButtonDecodeTable class variable in InputEventSensor and right click I get a walk-back. If I change the line further to: > > (requestor selectedClass notNil and: [ (binding := requestor selectedClass bindingOf: target selector) notNil and:[binding value notNil and:[binding value class canUnderstand: #asNode]]]) > > I don't. But testing is hard and I maybe missing something here. > > T. > > Ted Wrinch > > > > > On 14 Jul 2011, at 09:12, Lukas Renggli wrote: > >>> If you go to a class variable usage in the browser, say DefaultDirectory in FileDirectory>>default, and select and right click it, Seaside brings up a walk-back. >> >> I cannot reproduce that. >> >> Also note, that this is not Seaside related, but OmniBrowser (I thus >> reply to the Pharo list). >> >>> My fix for this re-writes the existing method a little by using '&' instead of the older 'and:', which I find clearer. What I've done is check that the value can respond to #asNode: >>> >>> globalReference >>> | binding | >>> target hasSelector >>> ifFalse: [ ^ nil ]. >>> (requestor selectedClass notNil & (binding := requestor selectedClass bindingOf: target selector) notNil & binding value notNil & (binding value class selectors includes: #asNode)) >>> ifTrue: [ ^ binding value asNode ]. >>> (binding := Smalltalk classNamed: target selector) notNil >>> ifTrue: [ ^ binding value asNode ]. >>> ^ nil >> >> This certainly introduces other bugs. The use of the non-eager #and: >> is intentional, because if "requestor selectedClass" is nil, >> "requestor selectedClass bindingOf:" is not supposed to be evaluated. >> >> Lukas >> >> -- >> Lukas Renggli >> www.lukas-renggli.ch >> _______________________________________________ >> 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 > -- Lukas Renggli www.lukas-renggli.ch _______________________________________________ seaside mailing list [hidden email] http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside |
In reply to this post by Dirk Verleysen-2
2011/7/14 Dirk Verleysen <[hidden email]>:
> Got it working ! Think it would be nice if you could use Swazoo for just a > minor site and don't have the extra config trouble of Apache. Nothing stops you from doing this. Cheers Philippe _______________________________________________ seaside mailing list [hidden email] http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside |
In reply to this post by Lukas Renggli
Can't see that.
T. Ted Wrinch On 14 Jul 2011, at 14:20, Lukas Renggli wrote: > Not really, the behavior with the lazy and eager evaluation can be > understood even without looking at the code (#and: expects a block, #& > a value). > > Lukas > > On Thursday, 14 July 2011, Ted Wrinch <[hidden email]> wrote: >> Damn - I suspected something like that and did a few tests; but not well enough it seems. It's a shame, as '&' is much simpler to write (some things I was never too keen on in the original Smalltalk). '&&' might be a candidate for an 'and:' alternative; but I could understand people not liking this ugly C syntax either. >> >> T. >> >> Ted Wrinch >> >> >> >> >> On 14 Jul 2011, at 09:10, Sven Van Caekenberghe wrote: >> >>> >>> On 14 Jul 2011, at 09:56, Ted Wrinch wrote: >>> >>>> by using '&' instead of the older 'and:' >>> >>> Ted, beware, these are not equivalent ! >>> >>> & always evaluates its argument >>> and: only evaluates its argument when necessary ('short circuit boolean evalution'). >>> >>> Sven >>> >>> _______________________________________________ >>> 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 >> > > -- > Lukas Renggli > www.lukas-renggli.ch > _______________________________________________ > 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 |
In reply to this post by Lukas Renggli
Sounds reasonable. Ok, I'll look forward to picking it up. Any chance of error highlighting as one browses being added?
T. Ted Wrinch On 14 Jul 2011, at 14:28, Lukas Renggli wrote: > Load the OB package I fixed, because I had to change a few other > things to get everything working correctly. Your suggested patch alone > did not solve all problems. > > Lukas > > On Thursday, 14 July 2011, Ted Wrinch <[hidden email]> wrote: >> I guessed it was Omnibrowser, but I will try and post to the appropriate list. Actually, I've just checked Pharo and I can reproduce neither issue there so maybe Seaside isn't the worst list for this. BTW: I'm guessing OB provides all those nice code checking and refactoring tools; in which case I thinks it's a great addition to the Smalltalk environment. One thing I would suggest adding is colour coding for errors in methods that are selected in the browser. It currently only checks code that is being added or modified. It would be particularly helpful feature to partially overcome Smalltalk's weakness in allowing code to exist which references non-existent, renamed or removed methods. >> >> Ok, I've gone back to a clean Seaside image and changed the offending line back to: >> >> (requestor selectedClass notNil and: [ (binding := requestor selectedClass bindingOf: target selector) notNil and:[binding value notNil]]) >> >> For this case if I go to the ButtonDecodeTable class variable in InputEventSensor and right click I get a walk-back. If I change the line further to: >> >> (requestor selectedClass notNil and: [ (binding := requestor selectedClass bindingOf: target selector) notNil and:[binding value notNil and:[binding value class canUnderstand: #asNode]]]) >> >> I don't. But testing is hard and I maybe missing something here. >> >> T. >> >> Ted Wrinch >> >> >> >> >> On 14 Jul 2011, at 09:12, Lukas Renggli wrote: >> >>>> If you go to a class variable usage in the browser, say DefaultDirectory in FileDirectory>>default, and select and right click it, Seaside brings up a walk-back. >>> >>> I cannot reproduce that. >>> >>> Also note, that this is not Seaside related, but OmniBrowser (I thus >>> reply to the Pharo list). >>> >>>> My fix for this re-writes the existing method a little by using '&' instead of the older 'and:', which I find clearer. What I've done is check that the value can respond to #asNode: >>>> >>>> globalReference >>>> | binding | >>>> target hasSelector >>>> ifFalse: [ ^ nil ]. >>>> (requestor selectedClass notNil & (binding := requestor selectedClass bindingOf: target selector) notNil & binding value notNil & (binding value class selectors includes: #asNode)) >>>> ifTrue: [ ^ binding value asNode ]. >>>> (binding := Smalltalk classNamed: target selector) notNil >>>> ifTrue: [ ^ binding value asNode ]. >>>> ^ nil >>> >>> This certainly introduces other bugs. The use of the non-eager #and: >>> is intentional, because if "requestor selectedClass" is nil, >>> "requestor selectedClass bindingOf:" is not supposed to be evaluated. >>> >>> Lukas >>> >>> -- >>> Lukas Renggli >>> www.lukas-renggli.ch >>> _______________________________________________ >>> 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 >> > > -- > Lukas Renggli > www.lukas-renggli.ch > _______________________________________________ > 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 |
Free forum by Nabble | Edit this page |