Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
  • Dec 03 2017 05:53
    @PeterWAWood banned @matrixbot
  • Sep 28 2016 12:19
    @PeterWAWood banned @TimeSeriesLord
  • Aug 13 2016 03:23
    @PeterWAWood banned @Vexercizer
Toomas Vooglaid
@toomasv
@lepinekong_twitter Depends how convoluted you want to make it. Will there be other braces within the braces and semibraces within ...?
viayuve
@viayuve
any-string! worked cool
Rudolf Meijer
@meijeru
@viayuve Mind you, in Red an empty string is different from "null" which would be none in Red.
Gregg Irwin
@greggirwin

@9214, the inversion not advancing note will be in your parse article, right? :^)

Also, comparing to/thru to heroin is...brilliant.

Gregg Irwin
@greggirwin
@laturk, if you probe get-style 'field, you can see the colors facet. From that, you can deduce that the second color given is the background when selected. So just spec another color.
view layout [m-fld: field 400x20 black red font-color yellow edge [size: 1x1 color: gray effect: none] middle]
laturk
@laturk
@greggirwin Thanks! You made me happy today.
Gregg Irwin
@greggirwin
Happy to help.
nedzadarek
@nedzadarek
@viayuve there are different types in the any-string!. For example website: http://www.a.b website/foo - this is ok, but str: "something" str/foo is not.
laturk
@laturk

I'm working on a second program using Nenad's pgsql-protocol.r, this time a front end to enter and edit data in a database. I've finished a nice VID GUI, and have the data from the database feeding into the program. But I don't know how to feed the data into the fields of the GUI. Has anyone already done something like this, and can share some code, or guide me to pertinent documentation?

Louis

Vladimir Vasilyev
@9214
Official VID / View documentation might be a good place to start.
Ungaretti
@Ungaretti
@laturk , take a look here and here. I hope it helps.
laturk
@laturk
@Ungaretti Thanks for the links. They did not help with my problem, but did provide useful information.
I now have the data flowing into the fields, but I have to click on the fields for it to show. I have to click twice in order for it to show the way I want. How do I make it show without clicking?
Boleslav Březovský
@rebolek
use show function
laturk
@laturk
@rebolek Where do I put show?
Boleslav Březovský
@rebolek
@laturk after you set your data to widgets. Something like widget/text: "bla bla bla" show widget
lepinekong
@lepinekong_twitter
@toomasv anything that makes a valid red header, I was supposing sub-rule2 encompasses that as I had just cloned from sub-rule1 :)
Ungaretti
@Ungaretti
@laturk Interesting. @rebolek Shouldn't the update of a view be automatic unless you set system/view/auto-sync??
Boleslav Březovský
@rebolek
@Ungaretti @laturk is using R2, there's no auto update.
lepinekong
@lepinekong_twitter
@nedzadarek gettho was just an example, but thanks will try again with not keyword.
Ungaretti
@Ungaretti
@rebolek @laturk Ok, I didn't realize it was Rebol.
laturk
@laturk
@rebolek I've been trying to use show for over an hour, but I always get an error message. But I have to go to bed. It's 4:05 AM here. I'll work on it tomorrow. Thanks for the help. At least I know I'm on the right track now.
Boleslav Březovský
@rebolek
@laturk OK. post the error message then, so I can tell you what is going wrong.
laturk
@laturk
All I needed was some sleep. I had it working within 5 minutes after getting some sleep.
laturk
@laturk
view gui: layout [
btn1: btn "Button 1"
btn2: btn "Remove all widgets from window" [
foreach item system/view/screen-face/pane/1/pane [
remove find system/view/screen-face/pane/1/pane item
]
show gui
]
]
How are you guys displaying the code on a black background?
Vladimir Vasilyev
@9214
@laturk press Ctrl + Shift + M and learn about Markdown support.
Alexander Baggett
@AlexanderBaggett
is there a way to convert a string! to a variable name? I have some code I would like to simplify if it helps to add context.
I would like to eliminate this switch statement
        switch  lowercase t [
            "generate" [ p/pane: layout/only generate]
            "filter"   [ p/pane: layout/only  filter]
            "transform"[ p/pane: layout/only transform]
            "combine"  [ p/pane: layout/only combine]
            "color"    [ p/pane: layout/only  color]
            "maps"      [ p/pane: layout/only  maps]
            "labs"     [ p/pane: layout/only  labs]
        ]
so it could be something like this p/pane: layout/only lowercase t ;some command here
Vladimir Vasilyev
@9214
@AlexanderBaggett read up on datatype conversions. What you want is to convert string! to word!, or to use load.
Semseddin Moldibi
@endo64
@AlexanderBaggett p/pane: layout/only get load t would work.
Greg T
@gltewalt
And maybe compose if you want to call external functions
nedzadarek
@nedzadarek
@AlexanderBaggett or you can pack your layouts into map (my-layouts: #() my-layouts/("generate"): layouts/only [...]) and in your code just return it from the map (p/pane: my-layouts/("generate")).
ps. it seems that set-path! syntax is case insensitive.
laturk
@laturk

? tenth
USAGE:
TENTH series

DESCRIPTION:
Returns the tenth value of a series.
TENTH is an action value.

ARGUMENTS:
series -- (Type: series port tuple)

? eleventh
No information on eleventh (word has no value)
? 11th
Syntax Error: Invalid integer -- 11th Near: (line 1) ? 11th

What do you do when you need more than ten values? (This is rebol 2)

laturk
@laturk
I'll try using pick
laturk
@laturk
Is pick limited to a series length of 24 values?
Boleslav Březovský
@rebolek
no
laturk
@laturk
@rebolek here is the error message I'm receiving:
>> do %cp.r
1
[9411 false false false none none none "m" none false "Blessed Hope Baptist Church" "PO Box 334" "606 Union St" "Oskaloosa" "KS" "66066" "USA" "785-863-2039" "blessed_hope_baptist@msn.com" none none none "BBF" "2018-12-03 22:01:40.841347-06" "Sunday Morning Jan. 6, 2019 at 9:30 AM" none "09:30:00" "10:30:00" "18:30:00" none none none "18:30:00" none none none none 9403 9411 "2018-11-11 15:05:26.78669-06" "Pastor" "Eldon" "R." "Schuler" none none none none none none none "(785) 331-9501" none none none none]
The length of record is >>>=================>:  56
** Script Error: Invalid path value: text
** Where: func [face value][zipcode: request-text/title "Enter the zipcode" 
    query: copy rejoin [{select id,c,l,fp,pc,k,w,sc,sl,cut,ch,m_add,s_add,city,st,zip,country,ch_ph,email,r_email,website,facebook,affil,updated,d_r_cet,d_r_lat,sss,smw,seb,sew,mon,tue,wed,thu,fri,sat,notes,p_id,ch_id,p_updated,title,f_name,m_name,l_name,suffix,p_add,p_city,p_st,p_zip,p_country,p_email,h_ph,c_ph,b_day,anni,p_notes from churches inner join pastors on (churches.id = pastors.ch_id) where zip = } "'" zipcode "';"] 
    db: copy read to-url join "pgsql://lat:t@localhost/churches?" query 
    print length? db 
    record: first db 
    probe record 
    print ["The length of record is >>>=================>: " (length? record)] 
    id/text: pick record 1 
    c/text: pick record 2 
    l/text: pick record 3 
    fp/text: pick record 4 
    pc/text: pick record 5 
    k/text: pick record 6 
    w/text: pick record 7 
    sc/text: pick record 8 
    sl/text: pick record 9 
    cut/text: pick record 10 
    ch/text: pick re
** Near: d_r_cet/text: pick record 25 
d_r_lat/text:
laturk
@laturk
I see nothing different about value 25 except that it contains a comma and the word at. Could that be the problem?
Vladimir Vasilyev
@9214
@laturk you're chasing the wrong rabbit. Error message explicitly says what the culprit is.
laturk
@laturk
@9214 I see the error message, but I don't see anything wrong with the path. Do you?
Vladimir Vasilyev
@9214
I don't, because I have no idea what d_r_lat / d_r_cet is.
laturk
@laturk
I'll post the error message again with word wrap on so that you can see the value.
do %cp.r
1
[9411 false false false none none none "m" none false "Blessed Hope Baptist Church" "PO Box 334" "606 Union St" "Oskaloosa" "KS" "66066" "USA" "785-863-2039" "blessed_hope_baptist@msn.com" none none none "BBF" "2018-12-03 22:01:40.841347-06" "Sunday Morning Jan. 6, 2019 at 9:30 AM" none "09:30:00" "10:30:00" "18:30:00" none none none "18:30:00" none none none none 9403 9411 "2018-11-11 15:05:26.78669-06" "Pastor" "Eldon" "R." "Schuler" none none none none none none none "(785) 331-9501" none none none none]
The length of record is >>>=================>: 56
Script Error: Invalid path value: text Where: func [face value][zipcode: request-text/title "Enter the zipcode"
query: copy rejoin [{select id,c,l,fp,pc,k,w,sc,sl,cut,ch,m_add,s_add,city,st,zip,country,ch_ph,email,r_email,website,facebook,affil,updated,d_r_cet,d_r_lat,sss,smw,seb,sew,mon,tue,wed,thu,fri,sat,notes,p_id,ch_id,p_updated,title,f_name,m_name,l_name,suffix,p_add,p_city,p_st,p_zip,p_country,p_email,h_ph,c_ph,b_day,anni,p_notes from churches inner join pastors on (churches.id = pastors.ch_id) where zip = } "'" zipcode "';"]
db: copy read to-url join "pgsql://lat:t@localhost/churches?" query
print length? db
record: first db
probe record
print ["The length of record is >>>=================>: " (length? record)]
id/text: pick record 1
c/text: pick record 2
l/text: pick record 3
fp/text: pick record 4
pc/text: pick record 5
k/text: pick record 6
w/text: pick record 7
sc/text: pick record 8
sl/text: pick record 9
cut/text: pick record 10
ch/text: pick re
** Near: d_r_cet/text: pick record 25
d_r_lat/text:
d_r_cet = "Sunday Morning Jan. 6, 2019 at 9:30 AM"
Vladimir Vasilyev
@9214
So d_r_cet is a string?
laturk
@laturk
@9214 Yes.
Vladimir Vasilyev
@9214
Mmkay. Do you see where the error is?
laturk
@laturk
d_r_lat = none