Re: binding with tranformer question
Re: binding with tranformer question
- Subject: Re: binding with tranformer question
- From: Theodore Petrosky <email@hidden>
- Date: Fri, 29 Jul 2005 04:38:20 -0700 (PDT)
two classes.
vendorcategories and vendorinfo (with two array
controllers)
vendorinfo has instances of:
vcode, vname, vaddress, vstate, vzip, vcategory (with
setters and getters)
vendorcategories has instances of:
vendorcategoryname, vendorcategorycode (with setters
and getters)
I create an array of vendorinfo from a database query.
so my array is
vendorinfo0
vendorinfo1
vendorinfo2
and I get an array of vendorcategories
vendorcategories0
vendorcategories1
vendorcategories3 etc.
my popup is popuplated from vendorcategories and the
selectedObject is bound to vendorinfo. however
vendorinfo only has the code (I guess I could
de-normalize the database to get the project moving
but I want to figure this out) ... I want to display
the name from the code.
All the binding is done programatically so I thought I
could create a valuetransformer and pass it an array
of vendorcategories so it could transform the display.
1. I can't figure out how to pass this array to the
transformer (and it is conceivable that the array
could change while the app is running)
2. I don't even know that this is the 'best' solution.
Ted
--- Charilaos Skiadas <email@hidden>
wrote:
> I'm a bit confused here. Is vendorcategoryname a
> class of objects,
> and vendorcategorycode another class. Or are they
> both instance
> variables of some class, whose objects the array is
> handling? Can you
> explain your situation more specifically, what
> classes are involved,
> what controllers there are, what are they bound to.
> On Jul 28, 2005, at 4:58 PM, Theodore Petrosky
> wrote:
>
> > I can not figure out if I need a transformer..
> >
> > I have a popupbutton bound to an array of objects
> > (vendorcategoryname vendorcategorycode). the
> > selectedObject is coming from the other array.. my
> > problem is the other array has the
> vendorcategorycode
> > and I want to display the vendorcategoryname.
> >
> > I feel there should be a way to do this without a
> > transformer but I can't seem to get my head around
> it.
> >
> > Any help to point me in the right direction would
> be
> > great.
> >
> > Ted
> >
> >
> >
> >
> ____________________________________________________
> > Start your day with Yahoo! - make it your home
> page
> > http://www.yahoo.com/r/hs
> >
> > _______________________________________________
> > Do not post admin requests to the list. They will
> be ignored.
> > Cocoa-dev mailing list
> (email@hidden)
> > Help/Unsubscribe/Update your Subscription:
> >
>
>
> > 40math.uchicago.edu
> >
> > This email sent to email@hidden
> >
>
> Haris
>
>
>
____________________________________________________
Start your day with Yahoo! - make it your home page
http://www.yahoo.com/r/hs
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden