Method confusions
New Community Forums available at http://forums.ext.net
 

Coolite Forums

Welcome Guest ( Login | Register )
 
Method confusions
Subscribe
Last Login: 7/14/2010 5:04:03 PM
Posts: 717,
Posted 5/26/2009 8:10:02 AM

Group: Coolite Premium Member & Early Adopter

It seems like there are often multiple methods/properties that do the same thing.  The difference is that one should be used during initial page load while the other is for AjaxEvent.  Is it possible to separate them somehow or make it more apparent when to use one vs the other? 

For example, I am adding listitems to a combobox dynamically in code during pageload.  I originally used ComboBox.Items.Add.  After getting latest, I saw there's a new ComboBox.AddItem method.  I thought, "nice, a shortcut so less code for me to write."  Of course, after making the change, I get the error message that this method must be called during an AjaxMethod.


Me.cbRanges.AddItem("Test", "Test")
Me.cbRanges.Items.Add(New Coolite.Ext.Web.ListItem("Test", "Test"))



It would be nice to somehow mark that method as Ajax only.  Even putting it as part of the method description with intellisense would be nice.

Me.cbRanges.AjaxAddItem("Test", "Test")
Me.cbRanges.Ajax.AddItem("Test", "Test")


« Prev Topic | Next Topic »
Reading This Topic
Active Users: 0 ( 0 guests, 0 members, 0 anonymous members )
No members currently viewing this topic.
All times are GMT -5:00, Time now is 11:10pm