On Sun, 23 Mar 2014 17:35:15 +0100 Davide Andreoli <[email protected]> said:
> 2014-03-23 3:46 GMT+01:00 Jeff Hoogland <[email protected]>: > > > The solution to this was creating the file using python and THEN loading it > > using file_set. > > > > Yes, this is the expected behavior, you cannot set a non-existing file to > the Entry. actually you can, just the return of elm_entry_file_set() varies depending on the loadability of the file. if it can't be loaded it returns false, but it still works. the entry is emptied totally and any changes to it, if any are made, are auto-written to the file if auto save is on, or on an explicit save request. see elementary_test "Entry Notepad" test. it opens "note.txt" int he current working directory. it'll work if note.txt exists or not, just the initial return value varies to let you know of the ability to load to begin with. :) > > On Sat, Mar 22, 2014 at 5:56 PM, Jeff Hoogland <[email protected] > > >wrote: > > > > > I am getting the following error when trying to set a new file for an > > > elementary.entry object: > > > > > > Traceback (most recent call last): File "object.pyx", line 295, in > > > efl.elementary.object._object_callback (efl/elementary/object.c:7609) > > File > > > "ePad.py", line 122, in fileSelected self.mainEn.file_set(file_selected, > > > ELM_TEXT_FORMAT_PLAIN_UTF8) File "entry.pyx", line 1548, in > > > efl.elementary.entry.Entry.file_set (efl/elementary/entry.c:10609) > > > RuntimeError: Could not set file > > > > > > The var file_selected is simply the full file path to where the file is > > > located. > > > > > > Any ideas what I might be doing wrong? Full source is here< > > https://github.com/JeffHoogland/ePad/blob/master/ePad.py> > > > . > > > > > > -- > > > ~Jeff Hoogland <http://jeffhoogland.com/> > > > Thoughts on Technology <http://jeffhoogland.blogspot.com/>, Tech Blog > > > Bodhi Linux <http://bodhilinux.com/>, Enlightenment for your Desktop > > > > > > > > > > > -- > > ~Jeff Hoogland <http://jeffhoogland.com/> > > Thoughts on Technology <http://jeffhoogland.blogspot.com/>, Tech Blog > > Bodhi Linux <http://bodhilinux.com/>, Enlightenment for your Desktop > > > > ------------------------------------------------------------------------------ > > Learn Graph Databases - Download FREE O'Reilly Book > > "Graph Databases" is the definitive new guide to graph databases and their > > applications. Written by three acclaimed leaders in the field, > > this first edition is now available. Download your free book today! > > http://p.sf.net/sfu/13534_NeoTech > > _______________________________________________ > > enlightenment-devel mailing list > > [email protected] > > https://lists.sourceforge.net/lists/listinfo/enlightenment-devel > > > ------------------------------------------------------------------------------ > Learn Graph Databases - Download FREE O'Reilly Book > "Graph Databases" is the definitive new guide to graph databases and their > applications. Written by three acclaimed leaders in the field, > this first edition is now available. Download your free book today! > http://p.sf.net/sfu/13534_NeoTech > _______________________________________________ > enlightenment-devel mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/enlightenment-devel > -- ------------- Codito, ergo sum - "I code, therefore I am" -------------- The Rasterman (Carsten Haitzler) [email protected] ------------------------------------------------------------------------------ Learn Graph Databases - Download FREE O'Reilly Book "Graph Databases" is the definitive new guide to graph databases and their applications. Written by three acclaimed leaders in the field, this first edition is now available. Download your free book today! http://p.sf.net/sfu/13534_NeoTech _______________________________________________ enlightenment-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
