Dave thanks for the reply Im gonna try it right away.

Gustavo.


On Aug 13, 2010, at 3:39 PM, Dave DeLong wrote:

> This is only resizing the textfield of the row *template*, not the row 
> itself. I've found that the easiest way to do what you're wanting is to 
> subclass NSPredicateEditorRowTemplate and override the templateViews method. 
> In that method you'll invoke super's implementation, then alter the frame of 
> the last view in the array (just like you posted), and then return the array. 
> 
> Don't forget to change the row class in IB either!
> 
> Dave DeLong
> 
> Sent from my iPhone
> 
> On Aug 13, 2010, at 7:33 AM, Gustavo Pizano <gustavxcodepic...@gmail.com> 
> wrote:
> 
>> Hello all, I come to you asking for humble guidance.
>> 
>> after reading the way to resize the TextFields in some other topic, I tried 
>> myself, without success..
>> 
>> This is what I have.
>> 
>> A parent view which display the panel that contains the predicate editor, 
>> this predicate editor controller  (NSWindowController) has an @property 
>> (assign) pointing to the parent controller. In the parent controller I have 
>> a NSPredicate ivar which at the moment before initializing the panel, I 
>> initialize it with a Default Predicate.
>> 
>> In IB, I set via Bindings the value for the predicate editor to 
>> _parentController.predicate.
>> 
>> So when I run and click the button that display the panel, the panel appears 
>> and the predicate editor is there with the default predicate I set up. So 
>> far so Good.
>> 
>> But I can' t rezise the NSTextField view of a Floating-Double number, in my 
>> PanelController on the awakefromNib method I added this code:
>> 
>>   NSArray    * rtemplates = [pe rowTemplates];
>>   for(NSPredicateEditorRowTemplate * peRT in rtemplates){
>>       if([peRT rightExpressionAttributeType] == NSDoubleAttributeType){
>>           NSView * v = [[peRT templateViews] lastObject];
>>           if([v isKindOfClass:[NSTextField class]]){
>>               NSRect frame = [v frame];  // comment 1
>>               frame.size.width = 200;
>>               [v setFrame:frame];
>> 
>>           }                
>>       }
>>   }
>> 
>> I set a Breakpoint into  //comment 1, and I get the size of the field which 
>> is 25, then as you see I set it up to 200 and re-set the frame property.
>> 
>> But nothing happens I still see that field with the small size ....
>> 
>> 
>> What can I do?, what am I missing?... I have tried moving the code above to 
>> different methods such as the initWithNibName:, just testing ... with no 
>> good results either.
>> 
>> 
>> thanks
>> 
>> Gustavo
>> 
>> 
>> _______________________________________________
>> 
>> Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
>> 
>> Please do not post admin requests or moderator comments to the list.
>> Contact the moderators at cocoa-dev-admins(at)lists.apple.com
>> 
>> Help/Unsubscribe/Update your Subscription:
>> http://lists.apple.com/mailman/options/cocoa-dev/davedelong%40me.com
>> 
>> This email sent to davedel...@me.com
> _______________________________________________
> 
> Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
> 
> Please do not post admin requests or moderator comments to the list.
> Contact the moderators at cocoa-dev-admins(at)lists.apple.com
> 
> Help/Unsubscribe/Update your Subscription:
> http://lists.apple.com/mailman/options/cocoa-dev/gustavxcodepicora%40gmail.com
> 
> This email sent to gustavxcodepic...@gmail.com

_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to