Last active 8 months ago
Bump: Also interested in this.
Started exploring the class object.
My simple test:
Add class object, name it "specialView", and set it's subclass to View
In a button action add:
const test= specialView() test.backgroundColor = Color.red test.frame = Rect(0,0,100,100) View1.addSubview(test)
New view created inside View1
Error " Unable to find backgroundColor into class specialView"
The attributes for the filters in the gradient group do not have any effect, nor do they save.
Add an image view.
add an image to the view.
add a linear gradient CIFilter.
Select colours in the filters attributes inspector.
color choice has no effect.
reopen the filters attribute inspector.
Your color choices have not been saved.
The bug seems present in all gradient filters.
I'm not sure, as I haven't tested. But I imagine the way you were trying using:
var secRow = TableView1.indexPathForRowAtPoint(Point(1,0));
Is looking for a row that that point falls within its bounds.
Kind of like "give me the colour of the pixel at point(x,y)".
I guess a use case for that would be if select cells was disabled you could use the coords of the touch event for the point.
Just a guess.
TableView1.selectRow(IndexPath(1,0), true, TableViewScrollPosition.Top)
in windows DidShow event.
@Marco Thanks. So is there a case where the "value" parameter in FileManagers NewValue event would ever be anything other than null at the moment?
Also.. Note in my screenshot above, two files present in Assets (where FileManager is looking), and two hits on the NewValue event (as noted in console). Does this not mean the NewValue event is actually firing once for each file? Perhaps you intentionally skipped the processing of each file in the event, but the event still fires once for each file.
I'm not 100% sure my expectation the value parameter of the NewValue event of the FileManager is correct, but...
I expected the value parameter to contain info about each file the FileManager collects from its data source (Assets in this case).
I expected to be able to access info like this for example:
To get an array of paths to all the files FileManager collects from Assets.
But value always yields null (see attached)
Having given this a lot of thought, I can see how this would be tricky.
Just because the class is sitting in the globals it has no instances until it is initiated at least once.
Here's the a use case, why I considered a class as a data source...
Lets say I have a picker object, and I want to populate it with static values. I could easily use the builtin data source... but... If I want this static values of the picker to be say 0 to 360 degrees, then that would be a chore to manually enter into the builtin data source, but would be really easy to create a class or even a variable to hold an array of 360 strings.
But I see no way to populate the picker object with such an array variable or class property at runtime or via a binding.
I guess I could use a database to hold the 360 values, but it seems overkill for the purpose.
Can a class be a dataSet?
If so how would you implement that?
Say for a simple example...
1 customTemplate containing 1 label. The label text has been exposed as property0 of the customTemplate.
1 view in window with its template set to be the customTemplate
1 class in globals "Class1" with a property "welcome" and an init method, self.welcome = "hello world"
Possible to bind the "welcome" property of "Class1" to the label text "property0" of the custom view?