Re: how to get the type of an attribute in code

2010-10-27 Thread Ramsey Gurley
Also d2wContext().valueForKeyPath("smartAttribute.className"); Ramsey On Oct 27, 2010, at 9:44 AM, Simon wrote: brilliant - thanks to all for the input !! Simon On 27 October 2010 14:08, Farrukh Ijaz wrote: Hi Simon, Does this make sense to you? EOModelGroup .defaultGroup ().entityNamed (

Re: how to get the type of an attribute in code

2010-10-27 Thread David Avendasora
Hi Simon, My question is why do you need it? If it's not for something UI-specific, then you may be doing something in a not-so-optimal way... I'm not saying you _are_ doing something wrong, just that any time I think of using instanceof or similar, I stop and review my design decisions to make

Re: how to get the type of an attribute in code

2010-10-27 Thread Simon
brilliant - thanks to all for the input !! Simon On 27 October 2010 14:08, Farrukh Ijaz wrote: > Hi Simon, > Does this make sense to you? > EOModelGroup.defaultGroup().entityNamed("EntityName")._attributeForPath("attributeName").className() > Farrukh > On 2010-10-27, at 3:57 PM, Simon wrote: > >

Re: how to get the type of an attribute in code

2010-10-27 Thread Mike Schrag
oh -- my bad -- i interpreted that as "in the code editor" rather than actually the java code to check it. ms On Oct 27, 2010, at 9:08 AM, Farrukh Ijaz wrote: > Hi Simon, > > Does this make sense to you? > > EOModelGroup.defaultGroup().entityNamed("EntityName")._attributeForPath("attributeNam

Re: how to get the type of an attribute in code

2010-10-27 Thread Farrukh Ijaz
Hi Simon, Does this make sense to you? EOModelGroup.defaultGroup().entityNamed("EntityName")._attributeForPath("attributeName").className() Farrukh On 2010-10-27, at 3:57 PM, Simon wrote: > hi all - is there an easy / quick way to figure out the type of a > particular attribute in code ? > >

Re: how to get the type of an attribute in code

2010-10-27 Thread David LeBer
On 2010-10-27, at 8:57 AM, Simon wrote: > hi all - is there an easy / quick way to figure out the type of a > particular attribute in code ? > > e.g. i want to know what type (ie. Integer, BigDecimal, String) the > column X is of entity Y See EOEntity, EOAttribute, ERXEOAccessUtilities: If y

Re: how to get the type of an attribute in code

2010-10-27 Thread Pascal Robert
It's somewhat easy, check er.rest.util.ERXRestSchema.schemaPropertiesForEntityNamed() to get ideas. > hi all - is there an easy / quick way to figure out the type of a > particular attribute in code ? > > e.g. i want to know what type (ie. Integer, BigDecimal, String) the > column X is of entity

Re: how to get the type of an attribute in code

2010-10-27 Thread Mike Schrag
if you have eogenerated classes, just hovering on the method call to the accessor should show you the method declaration. if you are just talking about an arbitrary entity and attribute, the fastest in 3.6 is probably to cmd-shift-v lookup the entity and then look at the attribute definition in

how to get the type of an attribute in code

2010-10-27 Thread Simon
hi all - is there an easy / quick way to figure out the type of a particular attribute in code ? e.g. i want to know what type (ie. Integer, BigDecimal, String) the column X is of entity Y thanks, simon ___ Do not post admin requests to the list. They