On Tue, August 19, 2008 7:21 am, Lukas Renggli wrote:
Btw, #save answers the changed model and #cancel
answers nil.
I saw that onAnswer was called for the cancel action but didn't get
a breakpoint
in the onAnswer block when 'save' was selected.. Do I just assume
that if my
block isn't triggered that 'save' was selected?
I guess this has to do with the other bugs you had in your code ;-)
An #onAnswer: block like this should actually work:
[ :answer |
answer isNil
ifTrue: [ self inform: 'You cancelled editing' ]
ifFalse: [ self inform: 'The object was saved: ' , answer
printString ] ]
Thanks Lukas! I will modify the code tonight to 'fix' the bugs you
mentioned.. I had code like that last night but everytime I hit the 'save'
or 'cencel' button, Seaside could complain about my #children being messed
up or misconfigured. I had created a #children method on my above
MSWLI_Contact object in addition to my main application class that also
answers #children with about a dozen or so classes listed -- do I need to
only have a single #children in my entire object hierarchy or am I allowed
to have some objects add children at run-time? When I had the runtime
variant initially set to return 'nil' for children at startup and then
changed to return a real value once a user logged in, that was still failing
the children test w/ Seaside.. Anyway, I know I've got a bug but am not
exactly sure how to make Seaside happy. One of my permutations last night
was rendering empty Magritte forms for some reason -- never figured that one
out but it was related to building my #component inst variable at the wrong
time apparently.. Anyway, I'm trying to find the happy medium so I can
continue on with more productive work! Thanks for all the help you all!
-- Rick