r3wp [groups: 83 posts: 189283]
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search
 

World: r3wp

[View] discuss view related issues

Terry
20-Jan-2010
[9497x4]
I've seen some email stuff somewhere.. here's the google calendar 
api


http://code.google.com/apis/calendar/data/1.0/developers_guide_php.html
Here's a Gmail notifier app for Firefox, so it must be doable.
libgmail is a Python binding to gmail

http://libgmail.sourceforge.net/
and php script via imap

http://php.net/manual/en/function.imap-open.php


Works with Gmail's new IMAP function for personal and for Google 
Apps.


$mbox = imap_open ("{imap.gmail.com:993/imap/ssl}INBOX", "[username-:-gmail-:-com]", 
"password")
     or die("can't connect: " . imap_last_error());
Graham
20-Jan-2010
[9501x2]
That's not an API ...
That's just imap
Terry
21-Jan-2010
[9503x2]
like, whatever
now that we have ssl in view (woot) can we access gmail's via IMAP?
Graham
21-Jan-2010
[9505]
sure if you modify the r2 imap protocol to use ssl
Terry
21-Jan-2010
[9506x2]
hmm.. sounds like hooking up to another PHP as proxy
can use a ws socket or whatever, and skip opening port 993 on the 
client as well.
Rebolek
21-Jan-2010
[9508]
Nick, then you use things like ImageMagick, there's a script to support 
it on rebol.org and I have an improved version somewhere on my HDD,if 
you're interested.
Maxim
21-Jan-2010
[9509]
I am actually.  :-)
Terry
22-Jan-2010
[9510x2]
Does 2.7.7.3.1 not have the /async argument for open?
Nevermind


The /async was removed a while ago. If you want to use async, you'll 
have to use Gabriele and others' async protocols
NickA
22-Jan-2010
[9512x2]
Rebolek, then we need 12 Megs insteac of 100k :(  ... but I am still 
interested in your improved version :)
insteac -> instead
Maxim
23-Jan-2010
[9514]
when using the REQUEST-FILE function anyone know how to prevent rebol 
from adding its own filters?


I'm specifying one, and it adds REBOL, *.*, and images... but its 
a stupid setup since I can't manage JPG or GIF images in REBOL.
ChristianE
24-Jan-2010
[9515]
request-file/filter "*.jpg"

seems to work fine for me on WinXP, show folders and jpgs only.
Maxim
24-Jan-2010
[9516]
yes it works, but if you look at the filter box, you will see that 
rebol adds 2 more filters  :-(

who cares about rebol files in an end-user application  >:-(
Gregg
24-Jan-2010
[9517]
I don't remember any tricks to do that Max.
Maxim
24-Jan-2010
[9518]
maybe we should make a wish for it in the next R2 release?
ChristianE
25-Jan-2010
[9519x2]
I see now what the problem is. Those REBOL types are hardcoded into 
view-request sources. 
But you can patch them away with

	remove find/only req-file/filter-list ["*.r" "*.reb" "*.rip"]

 remove skip find req-file/start-out/3 [fp: rty "Normal" "REBOL" "Text" 
 "Images"] 3

After that, request-file should come up without the REBOL types.
That at least seems to work on windows, I don't know what happens 
on other platforms.
Ashley
25-Jan-2010
[9521]
Or just use local-request-file directly.
ChristianE
25-Jan-2010
[9522]
Yes, http://www.mail-archive.com/[rebol-list-:-rebol-:-com]/msg12381.html 
gives some hints on how to do that, but it doesn't seem to be officially 
documented somewhere.
Josh
25-Jan-2010
[9523]
So if an 'area loses focus, the highlighting disappears.  Is that 
correct?
Henrik
25-Jan-2010
[9524]
yes
Josh
25-Jan-2010
[9525]
Is there a way to retain highlighting?
Henrik
25-Jan-2010
[9526x2]
that depends on how you unfocus
In standard VID, it's quite a pain to do anything before the unfocus 
action. You have to manipulate the field and area styles to allow 
an action before that.
Josh
25-Jan-2010
[9528]
I was introducing someone to REBOL, and he made a button that modifies 
the highlighted text.   It works fine with the intialized text, but 
if you type more in the 'area and then press the button, the highlight 
variables are set to none, and I can't figure out why there is a 
difference
Henrik
25-Jan-2010
[9529]
can you show the code? there are som parts of highlighting that can 
be tricky to use.
Josh
25-Jan-2010
[9530x3]
return-highlight: func [fac /a b la lb ans] [
	la: length? a: system/view/highlight-start
	lb: length? b: system/view/highlight-end
	either (la > lb)	[
		ans: replace a b ""				
	] [
		ans: replace b a ""
	]	
	return ans
]
view layout [
	size 600x460
	across
	choice "<w pos>" "N" "ADJ" "V" "PRO" "PREP" [
		t: return-highlight textfield
		before: rejoin [{<w pos="} value {">}]
		after: {</w>}
		textfield/text: rejoin [ before t after ]
		show textfield
	]
	
	below
	textfield: area 575x360 "try me out"
	btn "display selected text" [ 
		alert return-highlight textfield
	]
]
ignore the 'choice.  I should have taken that out
if you highlight some of the text, and press the button, the alert 
works, but if you type in the 'area and press the button, it doesn't
Henrik
25-Jan-2010
[9533x2]
I think part of the problem is that the index is not moving for the 
highlight, when you insert text into the string, so you would have 
to manually move the index for highlight start/end.
and of course when you start typing, there is no highlight anymore.
Josh
25-Jan-2010
[9535]
right, but if you type and then highlight
Henrik
25-Jan-2010
[9536]
if you click and hold the drop down, so that focus isn't lost, does 
it work?
Josh
25-Jan-2010
[9537]
the 'choice isn't what I was focusing on, but if you highlight part 
of the area, then use the choice, and press the button, the alert 
works, but if anything is typed, then highlighted, the system/view/highlight-start 
and end are set to none
Henrik
25-Jan-2010
[9538]
in the choice, you are copying a new string into the textfield. that 
destroys the relation to highlight-start and highlight-end
Josh
25-Jan-2010
[9539]
but what effect does typing have?   I type something, I highlight 
it, I would expect that highlight-start and highlight-end would be 
set when I actually do the action with the mouse
Henrik
25-Jan-2010
[9540x3]
oh! interesting.
sorry, but you are giving me a lot of ideas for the VID Extension 
Kit :-)
but I notice that the field is unfocused, before it crashes. that 
would be why.
Josh
25-Jan-2010
[9543]
how does it get unfocused?
Henrik
25-Jan-2010
[9544]
investigating
Josh
25-Jan-2010
[9545]
That's good! :)  Things need more extension.   I just hope that there 
is a easy enough solution so I don't scare my friend away from REBOL
Henrik
25-Jan-2010
[9546]
unfortunately, text editing is deeply broken and too simple in VID. 
I'm hoping to fix this.