Does not appear in OS X 10.8. #8

Closed
rpendleton opened this Issue Apr 27, 2012 · 8 comments

Comments

Projects
None yet
2 participants
@rpendleton

In DP3 of Mountain Lion, the Fragaria view doesn't show up when embedded. You can type, copy and paste stuff, and do everything you normally could, you just can't see the view.

@mugginsoft

This comment has been minimized.

Show comment Hide comment
@mugginsoft

mugginsoft Apr 27, 2012

Owner

Hmm..

I don't have DP3 and I am on the end of a very slow ADSL line.

What do you mean when you say you can type etc but the view isn't visible.

Owner

mugginsoft commented Apr 27, 2012

Hmm..

I don't have DP3 and I am on the end of a very slow ADSL line.

What do you mean when you say you can type etc but the view isn't visible.

@rpendleton

This comment has been minimized.

Show comment Hide comment
@rpendleton

rpendleton Apr 27, 2012

So basically, if you try typing without a first responder that accepts text, Mac normally calls NSBeep(). In the case of this view however, if the Fragaria view is the first responder, it doesn't beep. You can actually type in the view, then press apple + a, apple + c. Then if you go to another text field you can see and press apple + v, it shows what you copied from the view. It seems as if the view is still being embedded, but just not being displayed.

So basically, if you try typing without a first responder that accepts text, Mac normally calls NSBeep(). In the case of this view however, if the Fragaria view is the first responder, it doesn't beep. You can actually type in the view, then press apple + a, apple + c. Then if you go to another text field you can see and press apple + v, it shows what you copied from the view. It seems as if the view is still being embedded, but just not being displayed.

@mugginsoft

This comment has been minimized.

Show comment Hide comment
@mugginsoft

mugginsoft Apr 27, 2012

Owner

Still hmmm.
Did you try if with DP1 or 2?
Is there anything in the console?
Is the text cursor being displayed when you type?
Can you paste in text and see if the scroll bars appear?

If I had DP3 I would build the sample app and step through with the debugger.

Owner

mugginsoft commented Apr 27, 2012

Still hmmm.
Did you try if with DP1 or 2?
Is there anything in the console?
Is the text cursor being displayed when you type?
Can you paste in text and see if the scroll bars appear?

If I had DP3 I would build the sample app and step through with the debugger.

@rpendleton

This comment has been minimized.

Show comment Hide comment
@rpendleton

rpendleton Apr 27, 2012

Ok, so things are getting better... After I started the app, I resized it to see if it would redraw. When I made the window bigger, it showed up, but just not full size. Essentially, if the view is originally 100 x 200, then the view is embedded, then resized to 200 x 300, the fragaria view shows up as 100 x 100...

So it seems to just be a layout problem that should be easy enough to fix. I'll look into it a little more.

Ok, so things are getting better... After I started the app, I resized it to see if it would redraw. When I made the window bigger, it showed up, but just not full size. Essentially, if the view is originally 100 x 200, then the view is embedded, then resized to 200 x 300, the fragaria view shows up as 100 x 100...

So it seems to just be a layout problem that should be easy enough to fix. I'll look into it a little more.

@rpendleton

This comment has been minimized.

Show comment Hide comment
@rpendleton

rpendleton Apr 27, 2012

I'm not sure what the actual problem was, but it seems to be working now... It seemed as if it got lost when autoresizing the first time, so I just manually resized it after adding it to the contentView. (I'd make a pull request, but I use ruipacheco's fork since it's more stable. The problem is also in your version as well however...)

I added these lines to the end of the embedInView: method of MGSFragaria, and it fixed the problem. (I don't have a computer running 10.7 to test it on, but I don't see any reason it could cause issues...)

[textScrollView setFrame:NSMakeRect(gutterWidth, 0, [contentView bounds].size.width - gutterWidth, [contentView bounds].size.height)];
[gutterScrollView setFrame:NSMakeRect(0, 0, gutterWidth, contentSize.height)];

I'm not sure what the actual problem was, but it seems to be working now... It seemed as if it got lost when autoresizing the first time, so I just manually resized it after adding it to the contentView. (I'd make a pull request, but I use ruipacheco's fork since it's more stable. The problem is also in your version as well however...)

I added these lines to the end of the embedInView: method of MGSFragaria, and it fixed the problem. (I don't have a computer running 10.7 to test it on, but I don't see any reason it could cause issues...)

[textScrollView setFrame:NSMakeRect(gutterWidth, 0, [contentView bounds].size.width - gutterWidth, [contentView bounds].size.height)];
[gutterScrollView setFrame:NSMakeRect(0, 0, gutterWidth, contentSize.height)];

@rpendleton rpendleton closed this Apr 27, 2012

@mugginsoft

This comment has been minimized.

Show comment Hide comment
@mugginsoft

mugginsoft Apr 27, 2012

Owner

Do you have problems with stability?
I use GC and have no problems. Are you using RC?

Seems okay on 10.7 so I will push to out.

Owner

mugginsoft commented Apr 27, 2012

Do you have problems with stability?
I use GC and have no problems. Are you using RC?

Seems okay on 10.7 so I will push to out.

@rpendleton

This comment has been minimized.

Show comment Hide comment
@rpendleton

rpendleton Apr 27, 2012

I use reference counting, and spent hours trying to make a simple app with just the editor, similar to the sample app. In the end, turning on Garbage Collection fixed all my problems and it was easy to integrate like expected. Then I found ruipacheco's fork and it worked fine without garbage collection, so I've been using it.

The issues may have been fixed since I last tried your version of it, but I'm not sure. I'll test it in a little bit.

I use reference counting, and spent hours trying to make a simple app with just the editor, similar to the sample app. In the end, turning on Garbage Collection fixed all my problems and it was easy to integrate like expected. Then I found ruipacheco's fork and it worked fine without garbage collection, so I've been using it.

The issues may have been fixed since I last tried your version of it, but I'm not sure. I'll test it in a little bit.

@mugginsoft

This comment has been minimized.

Show comment Hide comment
@mugginsoft

mugginsoft Apr 27, 2012

Owner

Rui submitted the original RC code and it has not been touched since.
He did send a pull in some time ago but the RC memory management didn't look 100% so I didn't merge it.
I imagine it is improved now.

Probably a good idea to try and merge it now but we would really need to produce an RC sample app to accompany it.

Owner

mugginsoft commented Apr 27, 2012

Rui submitted the original RC code and it has not been touched since.
He did send a pull in some time ago but the RC memory management didn't look 100% so I didn't merge it.
I imagine it is improved now.

Probably a good idea to try and merge it now but we would really need to produce an RC sample app to accompany it.

ghost pushed a commit to bitstadium/Fragaria that referenced this issue Sep 1, 2015

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment