Open rupertdaniel opened 7 years ago
@bbowman this looks different from the rt_dynamic_cast issue we saw elsewhere?
Yeah looks different. fileTypeChoices appears to be a required parameter so the second callstack makes sense. The first one though I'll need to dig in to see if there is something wrong with the projections internals.
Reassigning to @mukhole ... a first glance suggests a projections bug with how the iterator is being produced.
The runtime class which implements "fileTypeChoices" does not implement IIterable interface and so this type cannot be enumerated. The exception is caused when we try to create an iterator for this type. This has been fixed now.
This was fixed with #1310
Reopening as per #2892.
@DHowett-MSFT Thank you for opening this again. It turns out that this works:
self.fileSavePicker.fileTypeChoices[@"Plain Text"] = @[@".txt"];
but attempting to access fileTypeChoices itself does not work, so for example this bombs:
NSLog(@"self.fileSavePicker.fileTypeChoices: %@", self.fileSavePicker.fileTypeChoices); // bombs
so, this does not work:
id fileChoices = self.fileSavePicker.fileTypeChoices; // bombs here
[fileChoices setValue:@[@".txt"] forKey:@"Plain Text"];
In any event, using the working pattern above is enough of a workaround.
Sincerely,
Ed
I'm having some trouble using WSPFileSavePicker, it seems to throw an exception whenever I call
[WSPFileSavePicker pickSaveFileAsyncWithSuccess:failure:]
Here is how I'm setting it up:
Here is the stack trace I'm getting...
I've tried not supplying the
fileTypeChoices
value, but that also throws an exception...Am I doing some thing wrong in the setup of the WSPFileSavePicker instance or is there something broken internally?