Simon Brown Posted January 28, 2008 Share Posted January 28, 2008 How can I make my FileType plugin save without a dialog box? I override the Save method and add the appropriet flags but when I test my plugin it shows a save dialog box. Any help would be greatly appreciated. Quote Link to comment Share on other sites More sharing options...
Rick Brewster Posted January 28, 2008 Share Posted January 28, 2008 "Save" or "Save Configuration" ? Quote The Paint.NET Blog: https://blog.getpaint.net/ Donations are always appreciated! https://www.getpaint.net/donate.html Link to comment Share on other sites More sharing options...
Simon Brown Posted January 28, 2008 Author Share Posted January 28, 2008 I'm not sure what you mean. But for some reason i've tried again and it now works. Quote Link to comment Share on other sites More sharing options...
Simon Brown Posted January 28, 2008 Author Share Posted January 28, 2008 Sorry, it turns out I do have that problem. I have tried overriding both Save() functions including at the same time and I have also looked for appropriet aruments in the main class. No matter what the following dialog appears when testing my plugin: Quote Link to comment Share on other sites More sharing options...
Rick Brewster Posted January 29, 2008 Share Posted January 29, 2008 Why does it have all the options for the DDS file type? Quote The Paint.NET Blog: https://blog.getpaint.net/ Donations are always appreciated! https://www.getpaint.net/donate.html Link to comment Share on other sites More sharing options...
Simon Brown Posted January 29, 2008 Author Share Posted January 29, 2008 Why does it have all the options for the DDS file type? I have no idea - I used the dds as a guide when creating the template but I know all the code in the plugin. Maybe it's the default of the class with no overrides. Edit: Sorry, it turned out to be because of a conflict problem with AVIImporter which I have now updated. May I suggest you update PDN to identify plugins by name rather than index (or at least count through plugins not supporting the given action) because I believe that is the cause of the problem. Quote Link to comment Share on other sites More sharing options...
Rick Brewster Posted January 29, 2008 Share Posted January 29, 2008 I don't follow you. The configuration UI is pulled from the FileType instance by calling CreateSaveConfigWidget(). If your code was copied from DDS for that, then it will have the same config UI as DDS. Quote The Paint.NET Blog: https://blog.getpaint.net/ Donations are always appreciated! https://www.getpaint.net/donate.html Link to comment Share on other sites More sharing options...
Simon Brown Posted January 29, 2008 Author Share Posted January 29, 2008 I don't follow you. The configuration UI is pulled from the FileType instance by calling CreateSaveConfigWidget(). If your code was copied from DDS for that, then it will have the same config UI as DDS. I didn't copy it from that - I used it as a reference to create the template and I didn't add any non-relevant code. But what about the index thing? Quote Link to comment Share on other sites More sharing options...
BoltBait Posted January 29, 2008 Share Posted January 29, 2008 You might want to check to be sure you aren't in his namespace. Quote Download: BoltBait's Plugin Pack | CodeLab | and a Computer Dominos Game Link to comment Share on other sites More sharing options...
Simon Brown Posted January 29, 2008 Author Share Posted January 29, 2008 You might want to check to be sure you aren't in his namespace. Visual Studio automatically changes the namespace - anyway, I didn't just copy the whole code. Quote Link to comment Share on other sites More sharing options...
Rick Brewster Posted January 29, 2008 Share Posted January 29, 2008 Make sure your implementation of IFileTypeFactory is correct. Why are you saying that Paint.NET is using an index for identity? Did you look at the code, or are you just inferring/guessing? Quote The Paint.NET Blog: https://blog.getpaint.net/ Donations are always appreciated! https://www.getpaint.net/donate.html Link to comment Share on other sites More sharing options...
Simon Brown Posted January 29, 2008 Author Share Posted January 29, 2008 Make sure your implementation of IFileTypeFactory is correct. Why are you saying that Paint.NET is using an index for identity? Did you look at the code, or are you just inferring/guessing? I didn't actually look at the code - but from my problems I am pretty sure it is an indexing consistancey issue. Quote Link to comment Share on other sites More sharing options...
Rick Brewster Posted January 29, 2008 Share Posted January 29, 2008 I'm pretty sure the problem is in your code Quote The Paint.NET Blog: https://blog.getpaint.net/ Donations are always appreciated! https://www.getpaint.net/donate.html Link to comment Share on other sites More sharing options...
Simon Brown Posted January 29, 2008 Author Share Posted January 29, 2008 Well, the reason I think it is an indexing problem is because I got it to work by including the save option constant and the appropriet overrides even though my plugin is designed to open files. Quote Link to comment Share on other sites More sharing options...
Rick Brewster Posted January 30, 2008 Share Posted January 30, 2008 You don't have any logic or proof to back that claim up though. You're just venturing a guess, but asserting it as fact. If you don't want a save configuration dialog for your file type, then you should NOT implement the virtual method CreateSaveConfigWidget(). Nor should you implement the virtual method OnCreateDefaultSaveConfigToken(). Quote The Paint.NET Blog: https://blog.getpaint.net/ Donations are always appreciated! https://www.getpaint.net/donate.html Link to comment Share on other sites More sharing options...
Simon Brown Posted January 30, 2008 Author Share Posted January 30, 2008 If you don't want a save configuration dialog for your file type, then you should NOT implement the virtual method CreateSaveConfigWidget(). Nor should you implement the virtual method OnCreateDefaultSaveConfigToken(). I didn't origionally, which was causing the problems, now that I have everything works. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.