• 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
Re: TagNormalizer ?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: TagNormalizer ?


  • Subject: Re: TagNormalizer ?
  • From: Mike Schrag <email@hidden>
  • Date: Fri, 19 Oct 2012 16:54:43 -0400

Whoops … Crap. I lied. That's a cache of entity classes, not a cache of instances. Well .. That's a bummer.

Yeah, so the normalizer field then is only useful for the life of the instance, which makes it kind of stupid and broken, so you win -- it's broken.

I think that has to be rearchitected to have a cache of normalizers based on taggable entity class  … or something .. Basically normalizer can't live as an ivar on that thing, because it's going to die.

Alternatively, one could make a taggableEntity INSTANCE cache. That might be the easier solution, and maybe should have been that way from the beginning. I don't recall why I made it a class cache. The only catch with making an instance cache is that if people have subclassed these, they're going to suddenly have the behavior swapped and it could introduce problems if they made assumptions about how it previously worked. In the long run, they'd probably thank you because it makes more sense …. i think ………

Sooooo Have fun with that :) It's not a big change code-wise.

ms

On Oct 19, 2012, at 4:16 PM, James Cicenia <email@hidden> wrote:

I tried to do this:

  @SuppressWarnings("unchecked")
  public static <T extends ERXGenericRecord> ERTaggableEntity<T> taggableEntity(EOEntity entity) {
    Class<? extends ERTaggableEntity> taggableEntityClass = ERTaggableEntity._taggableEntities.objectForKey(entity.name());
    ERTaggableEntity<T> taggableEntity;
    if (taggableEntityClass == null) {
      taggableEntity = new ERTaggableEntity<T>(entity);
      ERTaggableEntity.setTaggableEntityForEntityNamed(taggableEntity, entity.name());

but get the following compiler error:

The method setTaggableEntityForEntityNamed(Class<? extends ERTaggableEntity<?>>, String) in the type ERTaggableEntity is not applicable for the arguments (ERTaggableEntity<T>, 
 String)


Thanks
James

Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: This email sent to email@hidden
  • Follow-Ups:
    • Re: TagNormalizer ?
      • From: James Cicenia <email@hidden>
References: 
 >TagNormalizer ? (From: James Cicenia <email@hidden>)
 >Re: TagNormalizer ? (From: Mike Schrag <email@hidden>)
 >Re: TagNormalizer ? (From: James Cicenia <email@hidden>)
 >Re: TagNormalizer ? (From: Mike Schrag <email@hidden>)
 >Re: TagNormalizer ? (From: James Cicenia <email@hidden>)
 >Re: TagNormalizer ? (From: Mike Schrag <email@hidden>)
 >Re: TagNormalizer ? (From: James Cicenia <email@hidden>)
 >Re: TagNormalizer ? (From: Mike Schrag <email@hidden>)
 >Re: TagNormalizer ? (From: James Cicenia <email@hidden>)

  • Prev by Date: ERD2WEditToOneRelationship + (toOneUIStyle='popup') + createAction button: is it possible?
  • Next by Date: Date time classes for new Wonder frameworks
  • Previous by thread: Re: TagNormalizer ?
  • Next by thread: Re: TagNormalizer ?
  • Index(es):
    • Date
    • Thread