Hi,
my diagnosis on the attached debugger is, that between (1) and (2) some other process resulting from an Ajax event has set observee selectedPosition to nil. A solution would be to have a single request from the browser which first does the changes to the model and then updates the required parts of the Webpage. Am I right here? In this example the event should first set selectedPosition to nil (by deleting it) and then Ajax update the grid with no highlighted row and one row missing. And update some other elements of the page. Am I just dense in not seeing how to do this (without refreshing the whole page) or is this currently not possible in AIDA? Cheers, Herbert mailto:[hidden email] _______________________________________________ Aida mailing list [hidden email] http://lists.aidaweb.si/mailman/listinfo/aida |
Hi,
I'm not AIDA expert, but sometimes while debugging something very similar happened to me. I check for notNil and actually is not nil (1), but after that it result that it is nil (2). But this happened sometimes only and while debugging. Regards, Bruno -----Original Message----- From: [hidden email] [mailto:[hidden email]] On Behalf Of Herbert König Sent: Friday, January 15, 2010 9:24 AM To: AidaWeb Mailingliste Subject: [aida] sanity check Hi, my diagnosis on the attached debugger is, that between (1) and (2) some other process resulting from an Ajax event has set observee selectedPosition to nil. A solution would be to have a single request from the browser which first does the changes to the model and then updates the required parts of the Webpage. Am I right here? In this example the event should first set selectedPosition to nil (by deleting it) and then Ajax update the grid with no highlighted row and one row missing. And update some other elements of the page. Am I just dense in not seeing how to do this (without refreshing the whole page) or is this currently not possible in AIDA? Cheers, Herbert mailto:[hidden email] No virus found in this incoming message. Checked by AVG - www.avg.com Version: 8.5.432 / Virus Database: 270.14.140/2621 - Release Date: 01/14/10 12:39:00 _______________________________________________ Aida mailing list [hidden email] http://lists.aidaweb.si/mailman/listinfo/aida |
In reply to this post by Herbert König
Hi Herbert!
Code below is not executing the inner block immediatelly but after the grid is shown! In below code the #rowBlueIfTrue: just sets the block in argument to be executed later. It is therefore plenty if possibilities that selectedPosition is nilled somewhere. I would set a breakpoint in its mutator to see, who is nilling it. It can even be a parallel Ajax request, yes. Best regards Janko On 15. 01. 2010 12:23, Herbert König wrote: > Hi, > > my diagnosis on the attached debugger is, that between (1) and (2) > some other process resulting from an Ajax event has set observee > selectedPosition to nil. > > A solution would be to have a single request from the browser which > first does the changes to the model and then updates the required > parts of the Webpage. > > Am I right here? > > In this example the event should first set selectedPosition to nil (by > deleting it) and then Ajax update the grid with no highlighted row and > one row missing. And update some other elements of the page. > > Am I just dense in not seeing how to do this (without refreshing the > whole page) or is this currently not possible in AIDA? > > > Cheers, > > Herbert mailto:[hidden email] > > > > _______________________________________________ > Aida mailing list > [hidden email] > http://lists.aidaweb.si/mailman/listinfo/aida -- Janko Mivšek AIDA/Web Smalltalk Web Application Server http://www.aidaweb.si _______________________________________________ Aida mailing list [hidden email] http://lists.aidaweb.si/mailman/listinfo/aida |
Hi Janko,
JM> It is therefore plenty if possibilities JM> that selectedPosition is nilled somewhere. I would set a breakpoint in JM> its mutator to see, who is nilling it. It can even be a parallel Ajax JM> request, yes. I know who's nilling it but I obviously can't control when it is nilled (nice word :-) compared to other events. I'd like to go with the spirit of AIDA as much as possible. I think I should: 1- implement printWebPageFor:On: in my model and do all necessary changes in the model and then send the same message to super (Object) to do the rest (maybe several messages for several update requests) plus: 2- change the JS to make sure only one Ajax request is fired which contains all requests. (instead of creating an AjaxUpdater for every element I want updated and one of them changing the model) Or would you propose a different way which is more along the lines of AIDA? Later on (no promise when, time is scarce) 1- above would omit the super send and directly reply some JSON to the browser. Cheers, Herbert mailto:[hidden email] _______________________________________________ Aida mailing list [hidden email] http://lists.aidaweb.si/mailman/listinfo/aida |
Free forum by Nabble | Edit this page |