CPTextfield changed appearance

79 views
Skip to first unread message

Arjen Schipmolder

unread,
Mar 14, 2016, 7:03:35 AM3/14/16
to objec...@googlegroups.com
Hi all,

I updated to the latest cappuccino a few days ago and am running into a problem with the appearance of the CPTextfields since.
The text in the fields seems to be getting all kinds of different sizes depending on whether they’re highlighted or not. It sometimes also drops the text off the bottom of the text field.

So, I made sure i used clobber, i removed any old ribs in the project, reset the project but all to no avail.
I then created a completely new project (capp gen -t NibApplication test2) and added a second text field to it in Xcode and that also appears to have the issue and the highlighted field has a different font and size as the non-highlighted one (see screenshot).

I then checked the Aristo2 theme but couldn’t find anything out of the ordinary there either.

Does anyone have any pointers how i can get my project to display correctly again?

Thanks
Arjen

Martin Carlberg

unread,
Mar 14, 2016, 7:25:54 AM3/14/16
to objec...@googlegroups.com
Hi!

I don’t know if it will work but try to completely remove the Build folder. I think jake clobber does not remove everything.

- Martin


<Screen Shot 2016-03-14 at 10.52.52.png><Screen Shot 2016-03-14 at 11.02.43.png>

-- 
You received this message because you are subscribed to the Google Groups "Cappuccino & Objective-J" group.
To unsubscribe from this group and stop receiving emails from it, send an email to objectivej+...@googlegroups.com.
To post to this group, send email to objec...@googlegroups.com.
Visit this group at https://groups.google.com/group/objectivej.
For more options, visit https://groups.google.com/d/optout.

Arjen Schipmolder

unread,
Mar 14, 2016, 8:14:38 AM3/14/16
to objec...@googlegroups.com, Martin Carlberg
Thanks Martin,

I just tried that as well, but still the same.

Besides, the test project i created hasn’t been compiled yet so that didn’t have a build folder yet.

Unless I can figure it out before, I’l probably get myself a different machine and reinstall everything fresh and try if it does the same there as I’m running out of ideas myself.

Arjen

Martin Carlberg

unread,
Mar 14, 2016, 8:59:17 AM3/14/16
to objec...@googlegroups.com
Hi!

I was referring to remove the Build folder before you build the new version of Cappuccino, not your project. I think 'jake clobber' will not remove everything from the build folder. Old theme stuff can still be present and when you build the the new version of Cappuccino it can be broken.

Sorry for not being specific about what I meant.

- Martin

Arjen Schipmolder

unread,
Mar 14, 2016, 4:36:17 PM3/14/16
to objec...@googlegroups.com, Martin Carlberg
Hi Martin,

I have just deleted anything related to the old cappuccino build, so old source code, narwhal folders and build folders.
Then I downloaded the latest master, ran jake all, bootstrapped, rebuild xcodecapp.
Then removed any old build files of the old project, including cibs and .XcodeSupport folder.
xCodeCapp rebuild all ribs but it doesn’t appear to have made a difference.

Am I missing something here?

Thanks
Arjen

Martin Carlberg

unread,
Mar 14, 2016, 5:33:50 PM3/14/16
to objec...@googlegroups.com
Then it must be something else. Sounds very strange…. I don’t have that problem…

Anyone else has a clue?

- Martin

Arjen Schipmolder

unread,
Mar 14, 2016, 5:48:03 PM3/14/16
to objec...@googlegroups.com, Martin Carlberg
I’ll grab a completely fresh machine in the morning and just set up a clean nib application project to see if that works, if not then at least i have something to troubleshoot properly…

Thanks for your help!

Didier Korthoudt

unread,
Mar 14, 2016, 6:39:11 PM3/14/16
to Cappuccino & Objective-J
Hi !

I remember having something like this...

My buggy memory seems to remember that it was related to fontinfo. The wrong version was called, never the new one...

Search for all fontinfo instances, remove them, rebuild cappuccino.

Hoping this can help,


Didier.

Dogild

unread,
Mar 15, 2016, 12:34:36 AM3/15/16
to Cappuccino & Objective-J
Hi, 

Make a reduction and we can take a look

Frederik Temmermans

unread,
Mar 17, 2016, 4:36:13 AM3/17/16
to Cappuccino & Objective-J

This is a common problem, discussed here as well: https://groups.google.com/forum/#!topic/objectivej/LyjndJQJAuc

Unfortunately, so far there doesn't seem to be a convenient solution...

Frederik

Arjen Schipmolder

unread,
Mar 27, 2016, 10:46:03 AM3/27/16
to objec...@googlegroups.com
Hi all,

Apologies for the late reply but I have finally figured out what was causing my problems.

Firstly, yes there also was the CSS thing going on as suggested by several of you (possibly caused by fontinfo versions) and adding a few additional css properties (especially font-size for textarea) fixed the font size, however it didn't fix the shifting of the text within the text field (text shifted down partially outside the field in the original screenshot).

When I tried to replicate this in a new project I couldnt so I knew this had to be caused by something in my project.
Anyway, several days of troubleshooting later (it's a rather complex project) I found that all text fields' text shifted down the moment one specific NIB was loaded. It didn't even needed to be displayed or used, just loading was enough. The NIB itself ( a view controller with one view) was actually very simple with just a text field a button and a few labels, but for some reason it caused all text fields in the entire app to change.

I eventually ended up removing the 7 objects from the controller's view and re-added them fresh which resolved all issues, but I have absolutely no idea why this would have caused this problem in the first place.

I don't think anyone can tell me what caused this exactly without seeing the problem itself but if anyone has any ideas then please let me know. Even if it's just tips how to make troubleshooting this easier next time.

Thanks for everyone's suggestions!

Arjen

17 March 2016 at 08:36

This is a common problem, discussed here as well: https://groups.google.com/forum/#!topic/objectivej/LyjndJQJAuc

Unfortunately, so far there doesn't seem to be a convenient solution...

Frederik

On Tuesday, March 15, 2016 at 5:34:36 AM UTC+1, Dogild wrote:
--
You received this message because you are subscribed to the Google Groups "Cappuccino & Objective-J" group.
To unsubscribe from this group and stop receiving emails from it, send an email to objectivej+...@googlegroups.com.
To post to this group, send email to objec...@googlegroups.com.
Visit this group at https://groups.google.com/group/objectivej.
For more options, visit https://groups.google.com/d/optout.
15 March 2016 at 04:34
Hi, 

Make a reduction and we can take a look

On Monday, March 14, 2016 at 3:39:11 PM UTC-7, Didier Korthoudt wrote:
--
You received this message because you are subscribed to the Google Groups "Cappuccino & Objective-J" group.
To unsubscribe from this group and stop receiving emails from it, send an email to objectivej+...@googlegroups.com.
To post to this group, send email to objec...@googlegroups.com.
Visit this group at https://groups.google.com/group/objectivej.
For more options, visit https://groups.google.com/d/optout.
14 March 2016 at 22:39
Hi !

I remember having something like this...

My buggy memory seems to remember that it was related to fontinfo. The wrong version was called, never the new one...

Search for all fontinfo instances, remove them, rebuild cappuccino.

Hoping this can help,


Didier.

Arjen Schipmolder

unread,
Mar 27, 2016, 11:33:25 AM3/27/16
to objec...@googlegroups.com
Ok, a bit more digging and I think i found the root cause of this.
Although my previous observations were correct it turns out that the view loaded in the NIB had a cptextfield on it that had different font settings then the default regular system font (size 26 in this case).
As a result, and I believe this shouldn't happen(?), all cptextfields loaded after this one all get the same properties assigned. Almost as if the system font is changed.

I then changed it to a standard text field with regular font but set the font size in code, but that had the same result. It didn't matter if i set the font property or the themed value of "font-size", both resulted in all text fields getting this property.

Please see the attached example project which shows two text fields with regular size. Open the subcontroller which loads the 26px textfield and notice the first field in the original view change once you close the subcontroller.

Could someone please confirm this is a bug?

Thanks
Arjen

27 March 2016 at 15:45
font_test.zip

Dogild

unread,
Mar 29, 2016, 2:56:32 AM3/29/16
to Cappuccino & Objective-J
Hi Arjen,

I can reproduce this issue as well on my system with your sources! However on the master, I nib2cib your both xib and the issue is not here anymore.

You should try to update Cappuccino with the master, or if you don't like that wait 2 days and the 0.9.9 will be released and your problem will vanish ;)

Alex,

Arjen Schipmolder

unread,
Mar 29, 2016, 3:30:35 AM3/29/16
to objec...@googlegroups.com
Thanks a lot alex, at least I know I'm not going mad!

I shoudl already be on master (or at least of this weekend) but I'll wait for the offcial release and will try again then.

Thanks
Arjen

29 March 2016 at 07:56

Frederik Temmermans

unread,
Mar 30, 2016, 8:47:09 AM3/30/16
to Cappuccino & Objective-J
Just tested the sample project with the master version. Unfortunately, after rebuilding the CIBs it seems the issue still remains.

Frederik
Reply all
Reply to author
Forward
0 new messages