In general I don't like performparentacripn. Mainly because ot can go wrong if someone uses the widget and forgets to implement the method, or the method isn't visible. I prefer delegates to sub in different behavior.
Simon On Sunday, October 25, 2009, Pascal Robert <[email protected]> wrote: > I'm working on my WOTwitter tutorial and I have a question about the design. > I think the tutorial should have two re-usable component : one to upload the > new post, and the other to show the older tweets. So I have made a > ERXTwitterNewPostComponent component that have : > > - A AjaxUpdateContainer component that have a string who shows the number of > chars typed (just like the Web Twitter client on twitter.com) > > - A WOText component to hold the content of the new post > > - A AjaxObserveField component to update the chars count > > - A AjaxSubmitButton to call an method > > This is working fine, but the question I have is about the action called by > the submit button. What I was about to do is to use performParentAction so > that the actual submit to Twitter is done in the parent. Why? Because you > might need to do something else with the content, in my case I'm calling > bit.ly API to transform any URLs found in the content to a shorter URL. > > If you were using such a component, how would use it? I do plan to give back > to the community. > > -- > > ------------------------------------------------------- > Pascal Robert > > http://www.macti.ca > http://www.linkedin.com/in/macti > > Skype: MacTICanada > AIM/iChat : MacTICanada > _______________________________________________ > Do not post admin requests to the list. They will be ignored. > Webobjects-dev mailing list ([email protected]) > Help/Unsubscribe/Update your Subscription: > http://lists.apple.com/mailman/options/webobjects-dev/simon%40potwells.co.uk > > This email sent to [email protected] > _______________________________________________ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list ([email protected]) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com This email sent to [email protected]
