in the last couple of days I ran into the problem quite a lot where when reloading your browser page you would get an exception like:
CPInvalidArgumentException: CPScroller does not contain theme attribute 'scroller-width'
This has been rather annoying so today I tried to find a solution. But to no avail, as I am not familiar with these parts of the code.
But there is one thing that I am very, very certain of: This problem has nothing to do with how I lay out or resize my controls in Interface Builder.
I noticed that if this problem occurs I simply have to Cmd-S save my NIB file, let XcodeCapp run nib2cib to create the CIB file, and try again to refresh my browser. Most of the time it works and the exception is gone. Sometimes it doesn't so I go back to Xcode, simply save the NIB file again and let nib2cib generate the CIB file again. I just have to do this saving and nib2cib'ing until I can completely reload my browser page without any exception. Usually takes 3 tries.
So today I made a test with nib2cib: I took a NIB file and let nib2cib generate CIB files. I did this 10 times in a row, without changing the NIB file. The result was that I can reload my browser page without any errors in 6 out of 10 cases. The other 4 times I got the "CPScroller does not contain theme attribute 'scroller-width'" exception.
As I said, I did not touch the NIB file. In 4 out of 6 cases nib2cib created a CIB file that I could not load. The other 6 were fine.
In case anyone wants to take a look at those 10 CIB files, you can find them here, together with the originating NIB file:
http://toxe.net/stuff/nib2cib_scroller-width.zip
I am using OX 10.6.8, Xcode 4.0.2 and Cappuccino version 0.9.5+ (Git master trunk, just a couple of days old).
Is there anything I can do to help finding this problem? Just let me know, I think this is a rather annoying bug and I'd love to help squashing it.
Regards,
Toxe.
run jake clobber before jake install to flush all trace of the theme.
Thanks,
--
Antoine Mercadal
> --
> 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.
>
> Hi,
>
> run jake clobber before jake install to flush all trace of the theme.
I am pretty sure I did that the last time, and I don't know why this would explain the behavior I observed, but I'll try that and check if it changes anything.
Toxe.
To my knowledge no one has found a fix, except to make their document
views slightly smaller.
> Hi,
>
> run jake clobber before jake install to flush all trace of the theme.
OK I just did jake clobber and jake install again.
After that I went into my project /Resources directory and, like I explained in my other mail, used nib2cib to convert my NIB file. Then I refreshed my browser (and cleared the cache before that).
4 times in a row nib2cib produced an unusable CIB file. I got the "CPScroller does not contain theme attribute 'scroller-width'" exception again.
CIB file number 5 worked.
So this didn't help, the problem I described in my other mail is still there.
Toxe.
HTH,
James
> To my knowledge no one has found a fix, except to make their document
> views slightly smaller.
From what I experienced about this bug it seems to me that people were just lucky when they resized their views. As I wrote in my first mail, for me it's enough to simply let nib2cib generate the CIB file over and over until you finally got one that works.
Strange bug indeed. Sounds like some kind of race condition or timing problem to me.
Toxe.
I have a bunch of scrollView in about 30 different cib, I never notice anything like this. But I remember I had this issue few months ago, with some random unusable generated cib. What I did was:
rm -rf /usr/local/narwhal
rm -rf $CAPP_BUILD
rm -rf myCappuccino/source/dir
remove any reference of Cappuccino stuff in my .profile then resource it.
And then I reinstalled everything. It worked.
In any case, it would be cool to do this just to be sure there is no junk anywhere preventing the conversion to work.
If it doesn't well at least, we will be sure that it's a problem inside the current sources of Cappuccino.
I'm going to try your sample project now.
Thanks,
--
Antoine Mercadal
--
Antoine Mercadal
> I just try about 20 conversions. Not any problem here :/ it works like a charm
Strange. I just uploaded my whole project, where I had these problems.
http://toxe.net/stuff/DragAndDropImages.zip
I have another project where I got this problem as well. It uses one OutlineView, a TableView and a couple of text fields.
Toxe.
The solution is here:
I'm really swamped right now, if someone else would like to implement and test that fix we'll be happy to review and merge it.
> --
> 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.
>
Regards,
Aparajita
I then noticed that in CPScrollView, encodeWithCoder codes up the
instance variables _scrollerStyle and _scrollerKnobStyle, so I added
lines to simply decode them in initWithCoder in the normal way. I
also added an awakeFromCib method and called [self
_updateScrollerStyle] in there. (Moving the indirect call to
_updateCornerAndHeaderView from initWithCoder to a simple [self
_updateCornerAndHeaderView] in awakeFromCib also seemed necessary.)
I haven't submitted these changes as a pull request yet because I
would first like to investigate and hopefully solve the nib2cib
problem in using awakeAfterUsingCoder, as this does look like the
proper fix, but I've been diverted to a more urgent task for the time
being. I'll try and get back to the issue soon, but I offer the above
info here in case it helps anyone having problems with this right now.
Nigel
On Dec 13, 10:10 pm, Aparajita Fishman <aparaj...@aparajitaworld.com>
wrote:
> This was discussed already here:
>
> http://groups.google.com/group/objectivej/browse_thread/thread/7ddbe9...
>
> The solution is here:
>
> http://groups.google.com/group/objectivej-dev/browse_thread/thread/c5...
--
Antoine Mercadal
Regards,
Aparajita
> I haven't submitted these changes as a pull request yet because I
> would first like to investigate and hopefully solve the nib2cib
> problem in using awakeAfterUsingCoder, as this does look like the
> proper fix, but I've been diverted to a more urgent task for the time
> being. I'll try and get back to the issue soon, but I offer the above
> info here in case it helps anyone having problems with this right now.
>
> Nigel
Great! That sounds very promising! :-)