Hi again, My issue with IOpenable seems to have been fixed along with some problems i saw people had with Files and Folders plugin.
I can now show you the file in question. http://pastebin.com/m6d68f59f First of all there is no real problem. I just want to know if there is a better way to do this with your platform. I feel that what i am doing is wrong. I want my BibtexFileItem to basically be a FileItem, but i want different Text, Description etc. In short. i want to extend FileItem. I cant find the assembly that will let me extend from fileItem. can you tell me what it is called? As a work around i am extending Item and implementing IFileItem, I have copied allot of code from Do.Platform.Linux/src/Do.Universe/FileItem.cs to get thumbnail icons. (copying code like that seems wrong) How can i do it better with Do? now a design question. If i can extend from Do.Platform.Linux/src/Do.Universe/FileItem.cs it would seem wrong that i am extending from platform specific class. Do you think it is possible or a good idea to have a FileItem in Do.Platfrom.Common that would be generic but on different systems use the specific implementation from another class? So Do.Platform.Common.FileItem.Icon() would in Vista return a thumbnail, in Gnome return a thumbnail but in platform X only return a mimetype icon or whatever it can do. Thanks for all your work. Niall On Fri, Jan 16, 2009 at 2:18 AM, Niall Murphy <[email protected]> wrote: >>> This is fine, however i have copied and pasted 4 functions directly >>> from Do.Platform.Linux/src/Do.Universe/FileItem.cs >>> namely, Uri, Open, Icon (this is awesome) and mimetype. >> >> Are you sure you need these? Just being an IFileItem should get the open >> action for free. What do you need mimetype for? > No, im not sure of anything. :) this is just what i got to work. > When i didnt implement the IOpenable interface it wasnt opening my > files. (there could be other things wrong, i was getting some run time > errors when i tried to open files this way) > Just extending Item gave me Items that i couldnt open. (this is memory > so there are combinations here i cant recall the output of) > Dito just implementing IFileItem (iirc, i just needed to implement Uri > and Path methods) > I dont _need_ mimetype, but when i saw that i could have thumbnails > for icons i had to have them (the plugin opens pdf, ps, djvu etc files > so this is really useful). > >>> On a similar note, the interface IConfigurable seems to be in >>> Do.Platform.Linux >>> to me that seems odd that it is in a system dependant package and not >>> in Do.Platform for example. >> This is because IConfigurable is drawn with Gtk. Although Gtk is a >> crossplatform toolkit, we've put everything that references Gtk into >> Do.Platform.Linux. This will allow us do do native windows and macosx UIs >> later down the road. > Yes i see, i supose having a platfom agnositc configuartion thingy is > a bit much. > Specifying config dialogs in XUL or some such and having it rendered > in GTK or winforms or Coaco might be a few iterations away. ;) > But.... > I accept a ConfigLinux.cs ConfigWin.cs etc but the class that extends > ItemSource needs to implement IConfiguration ... > that just tells Do that in the plugin installation screen that this > plugin needs to activte the "configure" button? > does my main class need to be duplicated for each platform with only > the implements "Iconfiguration" or "IWinConfiguration" line > diffenerent? > >> I think most of your problems come from not being sure >> how to manipulate the tools given to you by core. Could you post a link to >> this file in launchpad so we can see the code in question and tell you how >> we thing you should proceed? I don't think you need to implement anything >> other than IFileItem (remember to subclass Item!) > Definitly thats my problem. > I have certain ideas in my head and im looking at the do code with > these as my lenses. > I know from the length of my IRC backscroll that you guys put alot of > work into platform agnostisim and good software design. > So im pretty sure there is a better way to do this, i just dont know > Unfortunatly im traveling till next tuesday without my laptop so i > cant upload code, or discuss much till then. > > What you just suggested is > " I don't think you need to implement anything other than IFileItem > (remember to subclass Item!)" > is what i am currently doing, (with the addition of Iopenable) but i > am unhappy cos i have basically copied and pasted most of > Do.Platform.Linux.FileItem > code cos thats exactly what i want my fileItem to be, a FileItem, with > an extra method or two. (but i found i couldnt easily extend FileItem > cos i didnt know which assembly it was in) > > sorry for the hastle, > Niall > >> >> -- >> --Alex Launi >> >> >> >> > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "GNOME Do" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/gnome-do?hl=en -~----------~----~----~----~------~----~------~--~---
