Mailing List Archive: 49091 messages
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search
 

pair-edit style - desktop url argument

 [1/10] from: anton::lexicon::net at: 20-Jun-2002 23:14


Yeah, I thought this too. 'desktop should be like 'browse. We could probably patch desktop to do this, I reckon. Looking in ctx-viewtop: desktop ; first go to desktop and then exit to console print mold first ctx-viewtop I see some interesting looking words: load-index goto-url find-site goto-view but it turns out that the function we want is show-folder, which takes a url argument eg. ctx-viewtop/show-folder site/index.r Now we just need to patch desktop so it takes an optional argument. Here's the original desktop: desktop: func [][ if block? ctx-viewtop [ctx-viewtop: context ctx-viewtop] ctx-viewtop/init-desktop do-events ] The patched version: desktop: func [url [url! file! any-type!]][ if block? ctx-viewtop [ctx-viewtop: context ctx-viewtop] ctx-viewtop/init-desktop if value? 'url [ctx-viewtop/show-folder :url] do-events ] Now you can go directly to my site first (: desktop http://www.lexicon.net/anton/rebol/gui/index.r
>From there, it's one click to demo-pair-edit.r :)
Seems to work pretty well, though I thought I noticed it not working once in a new rebol. Anyone else notice this, please report it. Anton.

 [2/10] from: carl:cybercraft at: 21-Jun-2002 15:40


Hi Anton! (: On 21-Jun-02, Anton wrote:
> Yeah, I thought this too. 'desktop should be like 'browse. > We could probably patch desktop to do this, I reckon.
<<quoted lines omitted: 28>>
> Seems to work pretty well, though I thought I noticed it not working > once in a new rebol. Anyone else notice this, please report it.
It won't work if you're in local mode and the site's not in your local directory. (Of course:) But the Desktop handles it gracefully and just shows what we normally get at startup.
> Anton.
That's real cool Anton! Except instead of calling the function 'desktop I've called it 'Antop. (; And added it to my user.r. It also handles leaving off the index.r too, though the trailing slash is required. ie... antop http://www.lexicon.net/anton/rebol/gui/ Now, how do we get everyone to start using Antop and to paste their rebsite URLs using the above format? ...
>>>> Desktop/REBOL.com/Sites/Anton/gui/demo-pair-edit.r >> I've been wondering about a better way to go to pages on the
<<quoted lines omitted: 6>>
>> discussion. Or does IOS already have some method for doing this >> that will be in future versions of View?
-- Carl Read

 [3/10] from: anton:lexicon at: 22-Jun-2002 19:57


> That's real cool Anton! Except instead of calling the function > 'desktop I've called it 'Antop. (; And added it to my user.r.
<<quoted lines omitted: 3>>
> Now, how do we get everyone to start using Antop and to paste their > rebsite URLs using the above format? ...
Good luck, because I am not going to use Antop ! This word doesn't describe what it does very well. I think it's better to keep the same name, as a patch, for now. What I wanted to do was check with everyone that it works well, then submit it to feedback as a feature request to modify the desktop function. It's only one and a half lines different, after all. Anton.

 [4/10] from: carl:cybercraft at: 23-Jun-2002 23:51


On 22-Jun-02, Anton wrote:
>> That's real cool Anton! Except instead of calling the function >> 'desktop I've called it 'Antop. (; And added it to my user.r.
<<quoted lines omitted: 4>>
>> rebsite URLs using the above format? ... > Good luck, because I am not going to use Antop !
(: I'll remember it though. Sounds like a name an Egyptian Pharaoh may have had. I'd keep it in mind for another program one day Anton.
> This word doesn't describe what it does very well. > I think it's better to keep the same name, as a patch, > for now. > What I wanted to do was check with everyone that it > works well, then submit it to feedback as a feature > request to modify the desktop function.
That's a good idea, and it works fine with me as far as I can tell. One problem though is it still doesn't cater for the Reb-path, so to speak. At the Desktop level, your... http://www.lexicon.net/anton/rebol/gui/ could be described as this... REBOL.com/sites/anton/gui/ and it'd be good if the Desktop could handle that. (It'd have to drill down a page at a time to get there so it could find the real URLs of course, but there'd be no need for it to waste time displaying each page as it passed by.) A new protocol perhaps? Maybe... reb://REBOL.com/sites/anton/gui/ Any other suggestions for how it could be handled? -- Carl Read

 [5/10] from: anton:lexicon at: 24-Jun-2002 2:02


> > Good luck, because I am not going to use Antop ! > > (: I'll remember it though. Sounds like a name an Egyptian Pharaoh > may have had. I'd keep it in mind for another program one day Anton.
Alright.
> One problem though is it still doesn't cater for the Reb-path, so to > speak. At the Desktop level, your... > > http://www.lexicon.net/anton/rebol/gui/ > > could be described as this... > > REBOL.com/sites/anton/gui/
Oh I see.
> and it'd be good if the Desktop could handle that. (It'd have to > drill down a page at a time to get there so it could find the real
<<quoted lines omitted: 5>>
> -- > Carl Read
It's gonna be slow. The index file fo every part of the path must be read to determine the next piece. reb://REBOL.com/sites/anton/gui/ But it should be easy to work this into the desktop patch, using just a lit-path for now instead of a new pseudo-protocol. Anton.

 [6/10] from: carl:cybercraft at: 25-Jun-2002 10:16


On 24-Jun-02, Anton wrote:
>> One problem though is it still doesn't cater for the Reb-path, so >> to speak. At the Desktop level, your...
<<quoted lines omitted: 16>>
> It's gonna be slow. The index file fo every part of the > path must be read to determine the next piece.
Yes, but it should be faster than clicking through by hand.
> reb://REBOL.com/sites/anton/gui/ > But it should be easy to work this into the desktop patch, > using just a lit-path for now instead of a new pseudo-protocol.
Hmmm. I'm sure it's possible, but how would you grab all the path at the console...
>> x: func [n][probe n] >> x /a-path/blah
/a-path == /blah ? -- Carl Read

 [7/10] from: ammon:rcslv at: 26-Jun-2002 12:22


Hi,
>> x: func ['n][
[ probe n [ ]
>> x 'a-path/blah
a-path/blah notice the explicit use of *literals* the function must take path literally and the path must be given literally! HTH Ammon On Monday 24 June 2002 10:16 pm, you wrote:

 [8/10] from: anton:lexicon at: 28-Jun-2002 1:17


What? Or, not true, check this:
>> f: func ['n][probe n print mold type? n] ; taken literally >> f foot/war ; but not given literally
foot/war path!
>> f /foot/war ; try a path beginning with a slash
/foot refinement! == /war Either way, it doesn't look like we can pass a path that begins with a slash.
>> f '/root/war
** Syntax Error: Invalid word-lit -- ' ** Near: (line 1) f '/root/war Oops. I'll tell you why. A path beginning with a slash is not a path! - it's actually a refinement! (or a number of refinements) Anton.

 [9/10] from: ammon:rcslv at: 27-Jun-2002 9:42


Hi, Here is a copy of an actual console session: REBOL/View 1.2.1.4.2 21-Jun-2001 Copyright 2000-2001 REBOL Technologies. All rights reserved. REBOL is a trademark of REBOL Technologies. WWW.REBOL.COM Type DESKTOP or SET-USER for settings.
>> f: func ['n][probe n print mold type? n] ; taken literally >> f foot/war
** Script Error: foot has no value ** Where: f ** Near: probe n print mold type?
>> foot: context [] >> f foot/war
** Script Error: Invalid path value: war ** Where: f ** Near: probe n print mold type?
>> foot: context [war: 'foo] >> f foot/war
foo word! Are you using the new beta? Enjoy!! Ammon On Thursday 27 June 2002 03:17 pm, you wrote:

 [10/10] from: anton:lexicon at: 28-Jun-2002 19:03


Yes I am. (REBOL/View 1.2.5.3.1 6-May-2002) My apologies, I should have thought of that. Anton.

Notes
  • Quoted lines have been omitted from some messages.
    View the message alone to see the lines that have been omitted