[iphone-python] creating a selector for UISwitch
Michael Kramer
kramtek at gmail.com
Sat Feb 14 15:45:46 UTC 2009
Hi,
I would love to see what you have put together. I have been meaning to
>> push forward with this but haven't really had a chance yet. The more example
>> code the better.
>>
>
> Hi Mike,
>
> I second John : would you agree to share what you have done so far ?<http://bubblenet.be>
>
sorry for not getting something out sooner, i've been swamped with work.
but as a basic overview, i'm trying to create a structure such that
individual
'panels' can be included that are independent of UIKit, while still
providing
UIKit access through a wrapper class - for example generalize the concept of
an AlertView so that UIKit-independent python modules can
access/configure/show
and alert view - while leaving the door open such that the the UIKit wrapper
class could be replaced for other GUI options (e.g. pyqt, pygtk py-efl,
etc).
the problem i'm facing is getting the external support class to offer
delegate functions
for UIKit elements that are created outside the main UIApplication class.
Currently
all buttons/swithces/sliders clicked table view elements, etc are handled
with delagates
in the main UIApplication class, and these can be assigned to access
callback functions
in the individual 'panel' classes/files, but i'd like to create a few
generic 'alert' style
views that could be accessed externally _and_ have non-None delegates.
For exaple, a generic 'popup-picker' (an alert view with UIPicker) such that
a general list of items could be provided, the picker assinged with these
items, and
when the alert view is closed the selected item is passed back to the
calling function,
but this will need to have a non-trivial delegate assigned.
when i try to include the alertView_clickedItemAtIndex (or whatever its
called) into
the general external class, and have the alterView allocated in the external
class and
delegate set to self, it doesn't seem to work. No errors are thrown and it
doesn't complain
about the delegate setting, but it also doesn't seem to get to the delegate
function.
Does anyone have an idea on how this might be solved? i suppose my code
example will
go a long way in helping to explain the problem so i better get that out
there soon.... what
i have is probably terrribly ugly and in-efficient but hopefully it will
provide some examples
for me to learn from my mistakes.
thanks again for the interest, cheers,
Mike
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.telesphoreo.org/pipermail/iphone-python/attachments/20090214/209d4cec/attachment.htm
More information about the iPhone-Python
mailing list