Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TreeView.clear works in IDE, but doesn't work in Standalone #719

Closed
jaschanarveson opened this issue Jan 24, 2013 · 0 comments
Closed

TreeView.clear works in IDE, but doesn't work in Standalone #719

jaschanarveson opened this issue Jan 24, 2013 · 0 comments

Comments

@jaschanarveson
Copy link
Contributor

Problem: TreeView.clear doesn't work in a Standalone app, although it works fine in a regular SC session.

Specs: MacBook Pro, OS 10.6.8, Standalone downloaded from http://realizedsound.net/josh/StandaloneTemplate.zip (which currently says version 3.6 (dev) )

Here's a simple code example which works in a regular SC session and didn't work in a standalone:

Task({
var w, t;
w = Window.new("...", 400@400);
w.front;
t = TreeView.new();
t.columns_(["one", "two", "three"]);
w.layout = HLayout(t);
loop({
var newItems;
t.clear;
newItems = Array.fill(10, {
[String.rand(3), String.rand(4), rrand(0,100)]
});
newItems.do({|i|
t.addItem(i)
});
1.wait;
});
}).play(AppClock);

...and here's a simple workaround to t.clear in the above example:

t.numItems.do({ t.removeItem(t.itemAt(0)) });

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

No branches or pull requests

3 participants