[MonoTouch] Button CommandArgument Equivalent?
David Black
David.Black at casewise.com
Wed Oct 26 11:43:27 EDT 2011
Hi Joe
Usually I derive a class from UIButton and put an enum property on it.
David Black
Technical Manager (Web projects)
Casewise Systems Ltd | www.casewise.com<http://www.casewise.com/>
+44 1923 830300 office
+44 1923 830270 direct
64 Clarendon Road, Watford WD17 1DA
[cid:image001.jpg at 01CC93FE.6274F4B0]<http://www.facebook.com/casewise#!/pages/Casewise/471345470297>[cid:image002.jpg at 01CC93FE.6274F4B0]<http://www.linkedin.com/company/16238?trk=saber_s000001e_1000>[cid:image003.jpg at 01CC93FE.6274F4B0]<http://twitter.com/#!/casewise>[cid:image004.jpg at 01CC93FE.6274F4B0]<http://www.youtube.com/user/CasewiseLimited?blend=1&ob=5>
"When You Can See More, You Can Do More!"
[cid:image005.jpg at 01CC93FE.6274F4B0] <http://www.casewise.com/products/communicator>
From: monotouch-bounces at lists.ximian.com [mailto:monotouch-bounces at lists.ximian.com] On Behalf Of Jason Awbrey
Sent: 26 October 2011 16:37
To: MilkyJoe
Cc: monotouch at lists.ximian.com
Subject: Re: [MonoTouch] Button CommandArgument Equivalent?
I use Tag for this. It works, and I haven't found a better way to do it
On Wed, Oct 26, 2011 at 10:18 AM, MilkyJoe <leigh.bowers at curvenet.co.uk<mailto:leigh.bowers at curvenet.co.uk>> wrote:
In ASP.Net, I use the CommandArgument property of the Button control to pass
values to the OnCommand event. Is there an equivalent in iOS/MonoTouch?
Basically, I have a collection of buttons that are all attached to the same
TouchUpInside action. I need to be able to assign a value to each button so
that, when clicked, I can load the appropriate data from the database.
At the moment, I'm using the Tag property for this, although I'm guessing
this is not its intended purpose.
Thanks
--
View this message in context: http://monotouch.2284126.n4.nabble.com/Button-CommandArgument-Equivalent-tp3940979p3940979.html
Sent from the MonoTouch mailing list archive at Nabble.com.
_______________________________________________
MonoTouch mailing list
MonoTouch at lists.ximian.com<mailto:MonoTouch at lists.ximian.com>
http://lists.ximian.com/mailman/listinfo/monotouch
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.ximian.com/pipermail/monotouch/attachments/20111026/88cf5bed/attachment-0001.html
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image001.jpg
Type: image/jpeg
Size: 890 bytes
Desc: image001.jpg
Url : http://lists.ximian.com/pipermail/monotouch/attachments/20111026/88cf5bed/attachment-0005.jpg
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image002.jpg
Type: image/jpeg
Size: 1022 bytes
Desc: image002.jpg
Url : http://lists.ximian.com/pipermail/monotouch/attachments/20111026/88cf5bed/attachment-0006.jpg
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image003.jpg
Type: image/jpeg
Size: 886 bytes
Desc: image003.jpg
Url : http://lists.ximian.com/pipermail/monotouch/attachments/20111026/88cf5bed/attachment-0007.jpg
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image004.jpg
Type: image/jpeg
Size: 808 bytes
Desc: image004.jpg
Url : http://lists.ximian.com/pipermail/monotouch/attachments/20111026/88cf5bed/attachment-0008.jpg
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image005.jpg
Type: image/jpeg
Size: 5574 bytes
Desc: image005.jpg
Url : http://lists.ximian.com/pipermail/monotouch/attachments/20111026/88cf5bed/attachment-0009.jpg
More information about the MonoTouch
mailing list