This repository has been archived by the owner. It is now read-only.

edit_box does not "disable" #230

Open
daneb opened this Issue Dec 7, 2012 · 2 comments

Comments

Projects
None yet
2 participants
@daneb

daneb commented Dec 7, 2012

Hi

[Part 2] When I run the following code, only the edit_line disables it's state not edit_box. It appears that this does not work at all.

Shoes.app do
stack do
flow {
edit_box :width => 200, :state => "disabled";
edit_line :width => 200, :state => "disabled"
}
end
end

Running:
10.7.5 Mac OS X
Intel Core 2 Duo

Version of Shoes:
Shoes 3.10

PS. I did search issue tracker

Dane

@daneb

This comment has been minimized.

Show comment
Hide comment
@daneb

daneb Dec 7, 2012

After some investigation, I noticed that edit_box is based on NsTextView.

Here is some info from Apple on how to disable/enable NsTextView;
http://developer.apple.com/library/mac/#qa/qa1461/_index.html

-(void)enableTextView:(BOOL)enableIt
{
[textView setSelectable: enableIt];
[textView setEditable: enableIt];
if (enableIt)
[textView setTextColor: [NSColor controlTextColor]];
else
[textView setTextColor: [NSColor disabledControlTextColor]];
}

daneb commented Dec 7, 2012

After some investigation, I noticed that edit_box is based on NsTextView.

Here is some info from Apple on how to disable/enable NsTextView;
http://developer.apple.com/library/mac/#qa/qa1461/_index.html

-(void)enableTextView:(BOOL)enableIt
{
[textView setSelectable: enableIt];
[textView setEditable: enableIt];
if (enableIt)
[textView setTextColor: [NSColor controlTextColor]];
else
[textView setTextColor: [NSColor disabledControlTextColor]];
}

@ccoupe

This comment has been minimized.

Show comment
Hide comment
@ccoupe

ccoupe Jul 27, 2014

Contributor

I've fixed this bug in Shoes 3.2.13. Thanks for the test case and the hint on the solution.

Contributor

ccoupe commented Jul 27, 2014

I've fixed this bug in Shoes 3.2.13. Thanks for the test case and the hint on the solution.

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