• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Rerun value transformer
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Rerun value transformer


  • Subject: Rerun value transformer
  • From: Trygve Inda <email@hidden>
  • Date: Wed, 20 Sep 2006 06:19:01 +0000
  • Thread-topic: Rerun value transformer

I have a value transformer that is ultimately controlling the enabled state
of a button. The transformer needs some info that is only available once the
app is fully running.

[NSValueTransformer setValueTransformer:[[[IsExportableValueTransformer
alloc] initWithObject:self] autorelease] forName: @"isExportable"];


My value transformer class has an init method and gets a pointer back to my
main AppController object so it can inquire about the data it needs.


The problem is that after it is all loaded, I need to "fire" the transformer
again so properly set the button state... Since the transformer needs data
that is only obtained after applicationWillFinishLaunching completes.

Calling [myButton setNeedsDisplay:YES] does not work.

Any thoughts?

If I move the NSValueTransformer above into applicationWillFinishLaunching
then it crashes since IB has a reference to isExportable.

Thanks,

Trygve


 _______________________________________________
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

  • Follow-Ups:
    • Re: Rerun value transformer
      • From: Jim Correia <email@hidden>
  • Prev by Date: Re: Localizing a Managed Object Model default value
  • Next by Date: Re: stepbystep tutorials
  • Previous by thread: Re: stepbystep tutorials
  • Next by thread: Re: Rerun value transformer
  • Index(es):
    • Date
    • Thread