Changeset 668


Ignore:
Timestamp:
01/08/14 14:20:46 (10 years ago)
Author:
jts21
Message:

Add gotoURL action that can be used for storing hyperlinks that have not yet been downloaded + parsed
Usage: Just add the action "gotoURL http://www.example.com" to any text item.
When clicked, a frame will be created with the name of the text item, the URL will be parsed into it, and the text item's action will be replaced with a link to the frame.
TODO: Get headless parsing working correctly (currently it thinks the page is very narrow, and also for some reason any images created on the generated frame appear as "ghosts" on the parent frame).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/expeditee/actions/Misc.java

    r660 r668  
    15641564                return sb.toString();
    15651565        }
     1566       
     1567        public static void gotoURL(Text link, String URL) {
     1568                Frame frame = FrameIO.CreateNewFrame(link);
     1569                link.setAction(null);
     1570                link.setLink("" + frame.getNumber());
     1571               
     1572                WebParser.parseURL(URL, frame);
     1573               
     1574                frame.change();
     1575               
     1576                FrameIO.SaveFrame(frame);
     1577        }
    15661578}
Note: See TracChangeset for help on using the changeset viewer.