Issue with CPOutlineView

53 views
Skip to first unread message

Dawood Sangameshwari

unread,
Nov 23, 2011, 1:03:29 AM11/23/11
to objec...@googlegroups.com
Hi,
I am trying to use CPOutlineView and getting following errors. i am on 0.9.5
Uncaught CPInvalidArgumentException: CPScroller does not contain theme attribute 'scroller-width'
Uncaught CPInvalidArgumentException: CPScroller does not contain theme attribute 'knob-inset'
</Dawood>

Randy Luecke

unread,
Nov 23, 2011, 1:33:36 AM11/23/11
to Cappuccino & Objective-J
Can you be more specific?

When are you seeing this error?
Are you just now updating to 0.9.5?
Are you using custom scrollbars that worked in a previous release?
etc...

Somewhere something is setting the scrollbar (not the outlineview)
theme properties...
If it happens when you're building capp, you should try doing a clean
build.

Dawood Sangameshwari

unread,
Nov 23, 2011, 1:41:34 AM11/23/11
to objec...@googlegroups.com
I added CPOutlinView in IB. and when i view it browser i got following error. setting border type of CPScrollView to none in IB and making CPScrollView width  smaller than parent view solved this error. i would need CPScrollView to be as same width as parent view though. 
</Dawood>

--
You received this message because you are subscribed to the Google Groups "Cappuccino & Objective-J" group.
To post to this group, send email to objec...@googlegroups.com.
To unsubscribe from this group, send email to objectivej+...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/objectivej?hl=en.


Dawood Sangameshwari

unread,
Nov 23, 2011, 10:38:44 PM11/23/11
to objec...@googlegroups.com
This happens when i try to make child view spanning entire parent view using IB. if i make child view smaller than parent view then this error seems to go away. and its not consistent. sometime it works, and sometimes it gives error ( in browsers console ).

</Dawood>

On 23-Nov-2011, at 12:03 PM, Randy Luecke wrote:

rob

unread,
Nov 28, 2011, 3:24:53 PM11/28/11
to Cappuccino & Objective-J
I see this too, in a fresh install of 0.9.5. I have a CPTableView that
completely fills the left-hand side of a split view, and I get the
exceptions. If I make the CPTableView one pixel less wide, there's no
exception.


> Uncaught CPInvalidArgumentException: CPScroller does not contain theme attribute 'scroller-width'
> Uncaught CPInvalidArgumentException: CPScroller does not contain theme attribute 'knob-inset'

Antoine Mercadal

unread,
Nov 28, 2011, 6:58:43 PM11/28/11
to objec...@googlegroups.com
Hi,

Is it possible to upload a demo project provoking the problem with your current version of Cappuccino statically installed in Frameworks (not just as symlinks) ?

Thanks,

--
Antoine Mercadal

Nicolas Goy

unread,
Nov 29, 2011, 6:38:15 AM11/29/11
to objec...@googlegroups.com

On 28 nov. 2011, at 21:24, rob wrote:

> I see this too, in a fresh install of 0.9.5. I have a CPTableView that
> completely fills the left-hand side of a split view, and I get the
> exceptions. If I make the CPTableView one pixel less wide, there's no
> exception.
>
>
>> Uncaught CPInvalidArgumentException: CPScroller does not contain theme attribute 'scroller-width'
>> Uncaught CPInvalidArgumentException: CPScroller does not contain theme attribute 'knob-inset'
>

Are you sure you removed your CAPP_BUILD directory? Before a fresh install you have to remove it.


Nicolas

Aparajita Fishman

unread,
Nov 29, 2011, 11:07:06 AM11/29/11
to objec...@googlegroups.com
jake clobber will do this.

> Are you sure you removed your CAPP_BUILD directory? Before a fresh install you have to remove it.

Regards,

Aparajita

Diego Germán Vivero

unread,
Nov 29, 2011, 5:28:32 PM11/29/11
to objec...@googlegroups.com
Hi, I have the same problem with a TableView in cib, if I build a cib
again the problem disapear.

2011/11/29 Aparajita Fishman <apar...@aparajitaworld.com>:

Nigel Goodship

unread,
Nov 30, 2011, 5:18:56 AM11/30/11
to Cappuccino & Objective-J
Hi, I also had this problem after upgrading to 0.9.5. Resizing views
didn't help. I found from the stack backtrace in Safari's Web
Inspector that the call to [super initWithCoder:aCoder] in
CPScroller's initWithCoder was eventually calling CPScrollView's
initWithCoder via CPResponder. (The CPScrollView was next in the
responder chain.) CPScrollView's initWithCoder makes calls to
CPScroller to set the scroller's style and the knob style, but
CPSCroller has not by then been fully initialised because the
execution is still in the call to super in the first line of its
initWithCoder. I commented out the lines in CPScrollView's
initWithCoder that set the CPScroller's styles and tried again.

My app still crashed, but this time complaining about a call to
_updateCornerAndHeaderView. That is also called (via
performSelector:) in CPScrollView's initWithCoder, prefaced by this
comment "Due to the anything goes nature of decoding, our subviews may
not exist yet, so layout at the end of the run loop when we're sure
everything is in a correct state." Indeed so, but it would seem that
even at the end of the run loop is still too soon in this case. I
tried also commenting out the line that calls
_updateCornerAndHeaderView (with a target of the contentView) and my
app then launched without crashing. All my scrollViews and scrollers
look just fine, with the new Lion style. The tableView still needs
the cornerAndHeaderView update, though.

This is obviously an empirical hack (my speciality) and I suspect I've
merely worked around a symptom, but it's got me up and running again
and I hope will help others to find the real cause of this problem and
implement a proper fix.

Nigel

PS In case it helps anyone who doesn't know (I only discovered it
recently), clicking on the Safari Web Inspector bottom-left "pause"
button until it turns purple will pause on uncaught exceptions. (See
this Apple developer article: http://tinyurl.com/2vjzgm2 )

On Nov 29, 10:28 pm, Diego Germán Vivero <dgviv...@gmail.com> wrote:
> Hi, I have the same problem with a TableView in cib, if I build a cib
> again the problem disapear.
>

> 2011/11/29 Aparajita Fishman <aparaj...@aparajitaworld.com>:

Nigel Goodship

unread,
Nov 30, 2011, 5:03:59 AM11/30/11
to Cappuccino & Objective-J
Hi, I also had this problem after upgrading to 0.9.5. I found from

the stack backtrace in Safari's Web Inspector that the call to [super
initWithCoder:aCoder] in CPScroller's initWithCoder was eventually
calling CPScrollView's initWithCoder via CPResponder. The
CPScrollView was next in the responder chain. CPScrollView's

initWithCoder makes calls to CPScroller to set the scroller's style
and the knob style, but CPSCroller has not by then been fully
initialised because the execution is still in the call to super in the
first line of its initWithCoder. I commented out those calls in

CPScrollView's initWithCoder that set the CPScroller's styles and
tried again.

My app still crashed, but this time complaining about a call to
_updateCornerAndHeaderView. That is also called (via
performSelector:) in CPScrollView's initWithCoder, prefaced by this
comment "Due to the anything goes nature of decoding, our subviews may
not exist yet, so layout at the end of the run loop when we're sure
everything is in a correct state." Indeed so, but it would seem that

even at the end of the run loop is still too soon somehow. I tried


also commenting out the line that calls _updateCornerAndHeaderView
(with a target of the contentView) and my app then launched without
crashing. All my scrollViews and scrollers look just fine, with the
new Lion style. The tableView still needs the cornerAndHeaderView
update, though.

This is obviously an empirical hack (my speciality) and I suspect I've
merely worked around a symptom, but it's got me up and running again
and I hope will help others to find the real cause of this problem and
implement a proper fix.

Nigel

PS In case it helps anyone who doesn't know (I only discovered it
recently), clicking on the Safari Web Inspector bottom-left "pause"
button until it turns purple will pause on uncaught exceptions. (See
this Apple developer article: http://tinyurl.com/2vjzgm2 )


On Nov 29, 10:28 pm, Diego Germán Vivero <dgviv...@gmail.com> wrote:

> Hi, I have the same problem with a TableView in cib, if I build a cib
> again the problem disapear.
>

> 2011/11/29 Aparajita Fishman <aparaj...@aparajitaworld.com>:

Aparajita Fishman

unread,
Nov 30, 2011, 9:19:42 PM11/30/11
to objec...@googlegroups.com
I ran into this same problem with the responder chain a long time ago. I discussed the problem and solution here:

http://groups.google.com/group/objectivej-dev/browse_thread/thread/c5d2b526c0e0f38/90959d48c44c44ce?lnk=gst&q=aparajita#90959d48c44c44ce

Maybe you could implement this fix in CPScrollView and CPTableView and submit a pull request. As I noted in the message, ultimately we need to go through all of the classes and check for this kind of problem.

Regards,

Aparajita

Nigel Goodship

unread,
Dec 1, 2011, 6:33:42 AM12/1/11
to Cappuccino & Objective-J
Sorry about the double post, my browser and/or Google Groups seemed to
be playing up yesterday.

I wish I'd noticed or remembered seeing your good advice about
decoding objects, it is indeed exactly the problem here.

About the fix and pull request – I'll certainly give it a try,
although as you can probably tell, I'm not particularly confident
about getting it right.

It seems that the TinyURL to the developer article messed up as
well. :-( If anyone's interested, just Google: Safari Debugging Your
Website.

Nigel


On Dec 1, 2:19 am, Aparajita Fishman <aparaj...@aparajitaworld.com>
wrote:


> I ran into this same problem with the responder chain a long time ago. I discussed the problem and solution here:
>

> http://groups.google.com/group/objectivej-dev/browse_thread/thread/c5...

charlie

unread,
Dec 2, 2011, 3:19:44 AM12/2/11
to Cappuccino & Objective-J
Coincidentally, I had to upgrade the Frameworks folder of one of my
pet projects to 0.9.5.
At first, ScrollViews weren't showing anything, instead I got the same

> Uncaught CPInvalidArgumentException: CPScroller does not contain theme attribute 'scroller-width'
> Uncaught CPInvalidArgumentException: CPScroller does not contain theme attribute 'knob-inset'
So I tried reducing the scrollviews by 1 pixel as per this thread,
which -kind of- worked: content was reappearing and fully functional.
But the scrollbars themselves (at least the vertical ones, I don't
have horizontal ones on this project) were cut in half (that is, were
half as wide and this applies to ALL CPScrollViews, both those
spanning their entire superview and those who don't).
I figured this would stem from the newly introduced scrollerStyles,
taking the width for the overlay style by default, but for some
unknown reason sticking to the legacy imagery.
Up to this point, I did not change anything to my code and it seemed
obvious to me I should add some code to 'force' one or the other style
(I'm on 10.6, XCode 4.0.2, I presume IB 4.1.1 is offering the setting
in the inspector panel). I tried with both +setGlobalScrollerStyle and
-setScrollerStyle on individual instances, but this had no effect
except for the autohide-behaviour (so it did have _some_ effect).
I checked the NSScrollView class reference, but it doesn't seem to
match CPScrollView's entirely (at least not for this topic)
Any resource on how it should be done ?
Should I also -setScrollerKnobStyle ?
I have a sneaky suspicion (or is it hope ?) that the -1 pixel issue
will go away if I get this right...

peace,

k.

Reply all
Reply to author
Forward
0 new messages