• Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search
 

AltME groups: search

Help · search scripts · search articles · search mailing list

results summary

worldhits
r4wp93
r3wp1079
total:1172

results window for this page: [start: 801 end: 900]

world-name: r3wp

Group: Core ... Discuss core issues [web-public]
Henrik:
7-Jun-2009
I've used ALTER once for user selection in a list, and it was even 
a special case. I think having the ability to just conditionally 
append to a block if the value does not exist is more useful. I.e. 
an ALTER, split in two functions.
PeterWood:
16-Jun-2009
Perhaps not - 

>> stats
== 67680368

>> a: make object! [

[    b: make block!  1000000

[    c: make block!  1000000

[    d: make block!  1000000

[    e: make block!  1000000

[    f: make block!  1000000

[    ]

>> stats

== 167685587
>> a: none

== none
>> stats

== 167686079

>> recycle

>> stats

== 167685527
PeterWood:
16-Jun-2009
Which is probably to be expected as the values referenced by the 
fields in the blocks have not been de-referenced. Looks as though 
you'll have to do it yourself:

>> stats
== 167686051

>> a: make object! [                       
[    b: make block!  1000000                 

[    c: make block!  1000000                 

[    d: make block!  1000000                 

[    e: make block!  1000000                 

[    f: make block!  1000000                 

[    ]
>> stats

== 267690882
>> a/b: none

== none
>> a/c: none

== none
>> a/d: none

== none
>> a/e: none

== none

>> a/f: none

== none

>> recycle

>> stats
== 167687087
BrianH:
16-Jun-2009
Peter, here's some R3 fun. To do the initial block allocation in 
R3:
    a: make object! 5
    foreach w [b c d e f] [extend a w make block! 1000000]
or maybe this way:
    a: object [b: c: d: e: f:]
    foreach w a [set w make block! 1000000]
To clear your way:
    foreach w a [set w none]
Of course Steeve's method works too, and better :)
Janko:
3-Jul-2009
I was interested in erlang before it got popular .. but it's code 
always looked very ugly and complex .. then I got one e-book about 
it .. and in book where I knew what what I was looking it seemed 
very very clean in concepts
Graham:
15-Aug-2009
'funco i.e.
Sunanda:
28-Aug-2009
Is my understanding of find/part wrong, or is this a bug?
     series: ["a" "b" "c" "d" "e"]
     find/part series "c" at series 3  

     == none      ;; fails to match using the [at series 3] part of  'series
    print mold at series 3  
    == ["c" "d" "e"]  ;; but [at series3] does contain the match
Dockimbel:
28-Aug-2009
>> find/part series "c" 3
== ["c" "d" "e"]
>> find/part series "c" at series 3
== none
>> index? at series 3
== 3

This looks like an inconsistency to me.
Steeve:
28-Aug-2009
columns: [a b c d e f]
>> c1: use columns copy/deep reduce [columns]
== [a b c d e f]
>> c2: use columns copy/deep reduce [columns]
== [a b c d e f]
>> set c1 1
== 1
>> set c2 2
== 2
>> reduce c1
== [1 1 1 1 1 1]
>> reduce c2
== [2 2 2 2 2 2]
>> c1
== [a b c d e f]
>> c2
== [a b c d e f]

C1 and C2 are locals
Gregg:
28-Aug-2009
Graham, this should work.

o: make object! [
    page: "1"
    total: 4
    records: "22"
    rows: reduce [

        context [id: none cell: ["Quantum of Solace" "Marc Forster" "2008" 
        "Daniel Craig" "200"]]

        context [id: none cell: ["Casino Royale" "Martin Campbell" "2006" 
        "Daniel Craig" "150"]]

        context [id: none cell: ["Licence to Kill" "John Glen" "1989" "Timothy 
        Dalton" "36"]]
    ]
]


i.e. objects become objects and blocks become arrays. What exactly 
was breaking?
BrianH:
26-Oct-2009
>> a: [a a a b b c d e e] foreach x b: unique a [remove find a x] 
unique a
== [a b e]
BrianH:
26-Oct-2009
>> a: [a a a b b c d e e] remove-each x b: unique a [not find find/tail 
a x x] b
== [a b e]
Doesn't modify a :)
BrianH:
26-Oct-2009
>> a: [a a a b b c d e e] b: [] foreach x unique a [repend b [x 1 
+ offset? find a x find/last a x]] b
== [a 3 b 2 c 1 d 1 e 2]
Ladislav:
27-Oct-2009
not that I want to do nit-picking, but it should be noted, that the 
algorithms presented above are all O(n * n), while an O(n * log-e 
n) algorithm can be written, although such an algorithm is likely 
to be a bit more complicated
Henrik:
16-Nov-2009
well, that's actually better, because I can put several refinements 
on top of a path!, which is really what I want:

>> a: 'b/c
== b/c
>> join a 'e/d
== b/c/e/d

but that final bit about using refinements alone would be cool
Von:
12-Dec-2009
Hello! I'm receiving the following error when processing a cgi form 
to send an e-mail of the response.  I correctly can send from my 
laptop, Rebol/Core -- command line, with my set-net settings in user.r 
but when I do the same thing on my hosting account I get the following 
error:
Von:
12-Dec-2009
Hello!  I'm having trouble with my hosting account to send via e-mail 
a cgi form response.  I can get rebol to post the data to the page, 
I just can't get it to send the data to me via e-mail.   I'm able 
to send e-mails from my laptop but when I use the same set-net settings 
on my host account I get the following error: ** User Error: Server 
error: tcp connection failed
** Near: smtp-port: open [scheme: 'esmtp] 
either only
Von:
12-Dec-2009
Hello!  I'm having trouble with my hosting account to send via e-mail 
a cgi form response.  I can get rebol to post the data to the page, 
I just can't get it to send the data to me via e-mail.   I'm able 
to send e-mails from my laptop but when I use the same set-net settings 
on my host account I get the following error: ** User Error: Server 
error: tcp connection failed
** Near: smtp-port: open [scheme: 'esmtp] 
either only
Von:
12-Dec-2009
Even though I'm able to send e-mails from my home computer via rebol 
console using my host's SMTP Relay?
Von:
12-Dec-2009
It works when I send an e-mail from my home laptop but not on my 
hosting account.
Von:
12-Dec-2009
In the past I've always used /usr/sbin/sendmail to send e-mails via 
cgi but I'm lost on how to do it via Rebol.
Rebolek:
19-Dec-2009
Brian, Steeve's examp;e works, you just have to do >>secure none
WuJian:
14-Jan-2010
e
	)
Gregg:
15-Jan-2010
I think it was Gabriele, or maybe Ladislav that long ago posted an 
INDEX?? function that was "safe". i.e. it wouldn't crash given none. 
There's nothing stopping you from replacing LENGTH? with your own 
version, or creating a LENGTH?? func. 


There are tradeoffs of course. What may seem to make this particular 
piece of code cleaner may have a far reaching impact on other code. 
I don't always agree with Carl's design, but whenever I think he 
did something wrong, particularly early in my REBOL career, I later 
decided he was right. I still think he's wrong about a few things 
though. :-)
Gregg:
21-Jan-2010
I would still like to set up metrics to see what funcs are used most, 
for both development and production (i.e. profiling), and set up 
a rating system. There have been some ad hoc analyzers in the past, 
but no reference system.

Yes, Graham, I know. I should just do it. :-)
Henrik:
24-Jan-2010
Cyphre made this new FORM-DECIMAL function. I've been allowed to 
share it, so it can be tested:

form-decimal: func [
	num cifre
	/local m n o p result
][
	p: ""
	result: either find num: form num #"e" [
		parse num [
			any [copy m to "." skip] copy n to "E" skip o: (
				all [
					not m
					m: n
					n: ""
				]
				if m/1 = #"-" [
					m: copy next m
					p: "-"
				]
				z: (length? m) + to-integer o
				result: to-string reduce either negative? z [
					["0." (head insert/dup copy "" "0" abs z) m n]
				][
					o: join m n
					["" o (head insert/dup copy "" "0" (z - length? o))]
				]
			)
		]
		result
	][
		num
	]
	result: parse result "."
	o: result/1
	o: skip tail result/1 -3
	while [not head? o][insert o #"." o: skip o -3]
	all [
		not result/2
		insert tail result ""
	]
	result/2: copy/part result/2 cifre
	insert/dup tail result/2 "0" cifre - length? result/2
	all [cifre > 0 insert next result ","]
	all [result/1/1 = #"0" p: ""]
	join p result
]
Pekr:
25-Jan-2010
Some time ago, I did form-decimal function too. But I am really a 
coding lamer, so dunno, if it cover at least half the cases other 
versions do. Here it is:

form-decimal: func [num /local tmp main rest sign base][

     either found? find tmp: to-string num "E" [

              parse tmp [
                 [copy main to "." 
                  skip
                  copy rest to "E"
                  |
                  copy rest to "E"
                  (main: copy "")  
                  ]
             
                 skip
                 mark: (sign: copy/part mark 1)
                 skip
                 copy base to end
               ]


        either sign = "-" [

                tmp: copy "0."

                loop ((to-integer base) - 1) [insert tail tmp "0"]
                insert tail tmp rest
        ][
                tmp: copy ""

                insert tail tmp join main rest

                loop ((to-integer base) - (length? rest)) [insert tail tmp "0"]  
                    
                           
        ] 
     
      tmp                 

     ][num] 

]
Graham:
25-Jan-2010
form-decimal: func [   num     [number!]
        cifre   [integer!]

        /local sign str poscifre int frac pow
    ][   sign: either negative? num [#"-"] [""]
        str: make string! 16
        either zero? num
        [   insert str #"0"
            if cifre > 0
            [   insert/dup
                    insert
                        tail str
                        #","
                    #"0"
                    cifre
        ]   ]
        [   num: abs num
            num: form
                add
                    multiply
                        power 10 cifre
                        to-decimal num
                    0,5

                        ; mainly WINE bug workaround - might also work for larger numbers 
                        on Windows
                        if find num "E"

                        [       parse num [copy int to "." skip copy frac 15 to "E" skip 
                        copy pow to end]
                                pow: to integer! pow
                                either pow >= 0
                                [       insert/dup
                                                insert/part

                                                        insert clear num int
                                                        frac

                                                        skip frac pow
                                                #"0"

                                                pow - length? frac
                                ]
                                [       num: "0"]
                        ]
            clear any [find num "." ""]
            poscifre: skip  tail num  negate cifre
            insert/part insert str sign num
                num: skip num
                    1 + remainder
                        subtract
                            index? poscifre
                            2
                        3
            while [(index? poscifre) > (index? num)]
            [   insert/part
                    insert
                        tail str
                        #"'"
                    num
                    num: skip num 3
            ]
            if empty? str [insert str #"0"]
            if not tail? poscifre
            [   insert
                    insert/dup
                        insert
                            tail str
                            #","
                        #"0"
                        cifre - length? poscifre
                    poscifre
            ]
        ]
        str
    ]
Gregg:
27-Jan-2010
b: [a b c d e]

forskip+ b 1 [
    if first? [print 'first] 
    print b/1 
    if last? [print 'last]
]
Ladislav:
8-Feb-2010
ah, I stand corrected:

a: func ['a] [probe :a]
w: 1
a :w + 3
; 4
; == 4

, i.e. the get-word really triggers evaluation even in R2, so the 
only difference is, that paren! does not trigger evaluation in R2.
Steeve:
20-Feb-2010
Oldes, I have them but in R3.

the first one in an aternative way to make objects.

as-object: func [w d][set w: bind? use w reduce [:first w] d w]

>>as-object [a b c][1 2 3]
== make object! [
    a: 1
    b: 2
	c: 3
]

I named the second one Mixin, with a slightly different code too.

mixin: funco [a [series!] b [series!] /local v][
    parse a: copy a [some [skip if (v: first+ b) insert v] a:]]
    head clear a
]

>>mixin "12345" "abcdefgh"
=="1a2b3c4d5e"

>>mixin [1 2 3 4 5 ] "abcdefgh"
==[1 #"a" 2 #"b" 3 #"c" 4 #"d" 5 #"e"]
Steeve:
23-Feb-2010
i.e.
open [ 10.45.12.12    2450]
instead of
open [scheme: 'tcp host: 10.45.12.12 port-id: 2450]
Ladislav:
10-Apr-2010
Example: for any BLOCK and CONTEXT the

    bind block context


operation causes the BLOCK to be "in the context" in the above sense, 
i.e. any subsequent

    bind block context

operation becomes a no-op
Ladislav:
10-Apr-2010
Example: for any BLOCK and CONTEXT the

    bind block context


operation causes the BLOCK to be "in the context" in the above sense, 
i.e. any subsequent

    bind block context

operation becomes a no-op
Ladislav:
10-Apr-2010
Example: for any BLOCK and CONTEXT the

    bind block context


operation causes the BLOCK to be "in the context" in the above sense, 
i.e. any subsequent

    bind block context

operation becomes a no-op
Ladislav:
10-Apr-2010
Example: for any BLOCK and CONTEXT the

    bind block context


operation causes the BLOCK to be "in the context" in the above sense, 
i.e. any subsequent

    bind block context

operation becomes a no-op
Ladislav:
10-Apr-2010
Example: for any BLOCK and CONTEXT the

    bind block context


operation causes the BLOCK to be "in the context" in the above sense, 
i.e. any subsequent

    bind block context

operation becomes a no-op
Ladislav:
10-Apr-2010
Example: for any BLOCK and CONTEXT the

    bind block context


operation causes the BLOCK to be "in the context" in the above sense, 
i.e. any subsequent

    bind block context

operation becomes a no-op
Ladislav:
13-Apr-2010
, i.e. how would you write a string containing exactly the characters 
listed on the line below

    "^/"
Ladislav:
13-Apr-2010
, i.e. two "doublequote"s, one "hat", and one "slash"
Maxim:
7-May-2010
>> probe a
make map! [
    r 4
]
== make map! [
    r 4
]

>> foreach [key value] a [print key]
r
>> a/e: 5
== 5

>> foreach [key value] a [print key]
r
e
Maxim:
28-May-2010
I really don't know... its been a long while since i've done e-mailling 
in rebol... Graham can probably give you an answer, he's done a lot 
of email work.
Ladislav:
3-Jul-2010
You are getting the same results you got before, it was just your 
error, resulting from the fact, that auto-adjustment adjusts past-tail 
series to tail indices, i.e. to 2 in case Henrik posted
Ladislav:
3-Jul-2010
E.g. this modification works regardless of auto-adjustment: (i.e. 
even in R3)

past?: func [
	"Returns TRUE if a series is past its tail."
	series [series! gob! port!]
] [
	and~ greater-or-equal? index? :series index? tail :series
	    not same? :series tail :series
]
Sunanda:
5-Jul-2010
This is _a_ way in windows (but you need to be running in admin mode 
.... so not so usefu):
    capture-call: copy ""
    call/output/info "fsutil fsinfo drivetype e:" capture-call
    print capture-call
    == "e: - CD-ROM Drive^/"
Gregg:
6-Jul-2010
REBOL []

do %../library-dialect/lib-dialect.r

make-routines [
    lib %kernel32.dll
    def-rtn-type long
    ; returns available drive flags as a bitset (in a long)
    get-logical-drives "GetLogicalDrives"
    get-logical-drive-strings "GetLogicalDriveStringsA" [
        buff-len [integer!]
        buffer   [string!]
    ]
    get-drive-type [drive [string!]] "GetDriveTypeA"
]


drive-types: [
    Unknown     ; 0 We don't know what kind of drive it is
    NoRootDir   ; 1 Probably not a valid drive if there's no
                ;   root directory
    Removable   ; 2 It's a removable drive
    Fixed       ; 3 It's a fixed disk
    Remote      ; 4 It's out there on the network somewhere
    CDROM       ; 5 It's a CD ROM drive
    RAMDisk     ; 6 It's not a real drive, but a RAM drive.
]

drive-type?: func [drive /word /local res] [
    res: get-drive-type join first trim/with form drive "/" ":"
    either word [pick drive-types add res 1] [res]
]

get-drive-strings: func [
    /trim "Return only the drive letters, no extra chars"
    /local len buff res
][

    ; Call it once, with 0, to find out how much space we need in our 
    buffer
    len: get-logical-drive-strings 0 "^@"
    ; Init our buffer to the required length
    buff: head insert/dup copy "" #"^@" len
    ; Make the call for real, to get the data
    len: get-logical-drive-strings length? buff buff
    res: parse/all copy/part buff len "^@"
    if trim [foreach item res [clear at item 2]]
    res
]

;print enbase/base to binary! get-logical-drives 2
foreach id [a b "C" 'c "D" d: %E %F %/F] [
    print [mold :id tab drive-type? :id tab drive-type?/word :id]
]
print mold get-drive-strings
print mold get-drive-strings/trim
print read %/
Ladislav:
14-Jul-2010
i.e. everything LOAD accepts
Ladislav:
14-Jul-2010
Right, since it "unapproximates" all values, i.e. values, that aren't 
"approximated". Therefore, it either can be called a "broken unapproximation", 
or, more precisely, no unapproximation at all,since it actually is 
not "unapproximation"
Ladislav:
14-Jul-2010
(i.e. 64-bit)?
Ladislav:
25-Jul-2010
Notice, that even MAKE was made strictly binary (i.e. not variadic 
as in R2) in R3
Gregg:
26-Jul-2010
traverse [
    all blk-n
    each [a b] blk-a
    skip blk-x 2
    each e blk-e
][
    ;...
]
Oldes:
23-Sep-2010
When I talk about temp var usage, I mean this:
>> a: context [b: context [c: context [d: context [e: 1]]]]
>> tm 1 [loop 1000000 [a/b/c/d/e: a/b/c/d/e + 1]]
== 0:00:00.829
>> tm 1 [t: a/b/c/d loop 1000000 [t/e: t/e + 1]]
== 0:00:00.578
Gabriele:
24-Sep-2010
Oldes, if it's about speed, this is going to be even faster:

loop 1000000 bind [e: e + 1] a/b/c/d
Fork:
26-Sep-2010
I think that Rebol already has the "i before e but not after q and 
sometimes z" philosophy, in that there are forces driving it that 
are something of the nature of what drives natural language design. 
 Purely consistent  languages which have no special adaptations to 
the "messy" world don't really need to be designed, they exist mathematically 
already.  They are more discovered than made.
Anton:
27-Sep-2010
sforpath: func ["Evaluate a path similar to the builtin path evaluation, 
except number elements SELECT (rather than PICK)."
	path [path!] action [function! block!] /local e v c
][

 v: get path/1 ; The path is assumed to begin with a word, so get 
 its value.

 while [not tail? path: next path][ ; Step through the path to inspect 
 each of its elements.
		c: v ; Store the current value before SELECTing into it.
		e: pick path 1 ; The current element.
		;print [mold :e mold type? :e]
		if get-word? :e [e: get e]
		case [

   number? e [v: select v e] ; SELECT this number element. (Paths normally 
   PICK number elements.)

   word? e [v: select v e] ; SELECT this word element (as paths normally 
   do).
		]
	]
	;?? e ?? v ?? c
	; Process the last element.
	if block? :action [action: func [c e] action]
	action c e
]
; Test
values: [1 [dos [new 0]]]

sforpath 'values/1/dos/new [c/:e: c/:e + 1]  ; <- DideC's INC-COUNTER 
function could be implemented simply using this.
Ladislav:
6-Oct-2010
that is a problem, I need to touch the file, i.e. change the date, 
but, nevermind, I can make a work-around
Group: !RebGUI ... A lightweight alternative to VID [web-public]
Ashley:
5-Jul-2007
re: boundary issue. Is this the same "issue" as:

	display " [
		area "a^/b^/c^/d^/e^/f^/g^/h^/i^/j^/k"
	]


Then click on the first line to position the caret next to the "a". 
Now drag the scroller down and observe how the caret position changes 
to remain visible. Is this behaviour correct? (BTW, an answer of 
"No" raises a whole bunch of other issues).
Ashley:
5-Aug-2007
Uploaded area caret positioning fix to SVN. "Fix" was to comment 
out Anton's code in the area widget that kept the caret inside the 
visible part of the area. This changes the behavior of area and may 
have other unforeseen consequences (i.e. fixing one issue may have 
created another).
RobertS:
5-Aug-2007
my dual monitors are on dual nVidia cards, i.e., 2 identical cards: 
is there something I can help test?
Ashley:
25-Sep-2007
re: dbl-click problem. I can't reproduce this one. I assume this 
occurs on Windows? What is the dbl-click speed set to? (Control Panel|Mouse 
Properties|Buttons) Is it a mouse or pen (i.e. TabletPC) that generates 
the dbl-click in question?
Ashley:
11-Oct-2007
Sure.

display "" [

 t: table 60x40 #HW options ["ID" right .3 "Number" left .4 "Char" 
 center .3] data [
		1 "One"		a
		2 "Two"		b
		3 "Three"	c
		4 "Four"	d
		5 "Five"	e
		6 "Six"		f
		7 "Seven"	g
		8 "Eight"	h
		9 "Nine"	i
		10 "Ten"	j
	]
	button "ID" [t/pane/2/feel/engage t/pane/2 'down none]
	button "Number" [t/pane/4/feel/engage t/pane/4 'down none]
]

Not pretty, but it works.
Ashley:
11-Oct-2007
Build#101 uploaded with fix to caret problem. All widgets defined 
in behaviors/caret now focus on event/offset and only default to 
tail if focus change was not caused by a mouse click (i.e. tab or 
a manual set-focus).
Louis:
22-Oct-2007
In the following script I would like to be able to click on a row 
of the table to populate the data entry fields, so that I can edit 
the data for the record displayed in that row. How do I do that? 
 

rebol []
do %sqlite.r
do %rebgui.r
unless value? 'ctx-rebgui [

    either exists? %rebgui-ctx.r [do %rebgui-ctx.r] [do %rebgui.r]
]
set-colors
tab-size: 120x55

fonts: reduce [font-sans-serif font-fixed font-serif "Courier New"]
if not exists? %id.txt [write %id.txt 1]
either not exists? %indodex.db [
    CONNECT/create %indodex.db

    SQL "create table base (ID, Title, Nama, Alamat, Kota, Propinsi, 
    Telefon, Handfon, Fax, Email, URL, Tgl_Nikah, Nota)"

    SQL "create table birthdays (ID, Nama, Jenis, Hubungan, Tgl_Lahir, 
    Agama, Nota)"
][
    CONNECT/flat %indodex.db
]

do show-cc: make function! [] [
set-colors
(i: to-integer read %id.txt)
label-width: 19
f-width: 59
display "IndoDex Ver. 1.0.1" compose/only [
            button-size 16x8
            margin 1x1
            space 1x1
            ;image %roladex.jpg 
            ;return
            label 7 "ID:" id: text (to-string i) 7
            pad 17
            ;label 13 "Nama:" 

            title: drop-list 30 #W "Pak" data ["Pak" "Ibu" "Sdr." "Sdri." "Drs." 
            "Dr." "Tuan" "Nyonya" "Nona" "Pdt."] 17x5
            nama: field f-width
            label label-width "Telefon:" 
            telefon: field f-width
            label label-width "Handfon:" 
            handfon: field f-width
            return
            pad 31
            label label-width "Fax:" 
            fax: fax: field f-width
            label label-width "E-Mail:" 
            email: field f-width
            label label-width "URL:" 
            url: field f-width
            return
            pad 31
            label label-width "Alamat:" 
            alamat: field f-width
            label label-width "Kota:"
            kota: field f-width
            label label-width "Propinsi:"
            propinsi: field f-width
            return
            pad 31
            label label-width "TglNikah:" 
            tgl_nikah: field f-width
            label label-width "Nota:" 
            nota: field 139
            return
            return

            t: table options ["ID" left .03 "Title" left .04 "Nama" left .2 "Telefon" 
            left .16 "Handfon" left .14 "Fax" left .14 "E-mail" left .15 "URL" 
            left .15] data (sql "select id, title, nama, telefon, handfon, fax, 
            email, url from base") 270x150 
            return
            button "Add" [
                either all [nama/text <> "" nama/text <> none][

                    SQL reduce ["insert into base values (?, ?, ?, ?, ?, ?, ?, ?, ?, 
                    ?, ?, ?, ?)" id/text title/text nama/text alamat/text kota/text propinsi/text 
                    telefon/text handfon/text fax/text email/text URL/text tgl_nikah/text 
                    nota/text]

                    insert t/data SQL "select id title nama alamat kota propinsi telefon 
                    handfon fax email URL tgl_nikah nota from base"

                    ;a: sql/flat "select id/text title/text nama/text alamat/text kota/text 
                    propinsi/text telefon/text handfon/text fax/text email/text URL/text 
                    tgl_nikah/text nota/text from base"
                    ;sql reduce [insert table/data a]
                    id/text: form i: i + 1
                    save %id.txt i
                    clear-text nama
                    clear-text alamat
                    clear-text kota
                    clear-text propinsi
                    clear-text telefon
                    clear-text handfon
                    clear-text fax
                    clear-text email
                    clear-text url
                    clear-text tgl_nikah
                    clear-text nota
                    ;show id
                    t/redraw
                    return
                ][
                    alert {Cannot save if "Nama" field is empty.}
                ]
            ]
            button "Update" []
            button "GUI Info" [

                print [id/text " " title/text " " nama/text " " alamat/text newline]
            ]
            button "DB Info" [
                print [TABLES newline]
                SQLite/col-info?: true
                newline
                print [SQL "select * from base" newline]
                print [SQLite/columns newline]
                print [ROWS "base" newline]
            ]
            button "Halt" [
                halt
            ]
            button "Quit" [
                quit
            ]
]
]
do-events
Ashley:
14-Dec-2007
vid is shorter, also layout is a verb and could cause confusion. 
The other word I was thinking of using was 'style ... which has the 
side benefit of suggesting "insert a single VID style here" (i.e. 
'vid and 'layout encorage you to think in terms of a block of styles). 
Still open to opinion/suggestions on this one
Kai:
19-Dec-2007
How can I determine the type of a widget (i.e. field vs button) in 
code? I don't see a 'kind or 'type attribute...
Ashley:
31-Dec-2007
Providing keyboard support for inherently graphical controls (e.g. 
radio-group, spinner, etc) is IMHO a waste of time. All the main 
input widgets (field, edit-list, area, sheet, etc) should and do 
have proper keyboard support. If you're designing an application 
for fast data entry then you should confine your widgets to those 
that accept keyboard input (i.e. data entry forms). If you want a 
rich GUI with a full set of graphical widgets then I don't think 
it's too much to ask that users have a pointing device. I mean, you 
don't expect users to use Windows without a mouse? Or Office type 
applications?


But, list away as I'm currently doing major code fixes (better scroll-wheel 
support for one) anyway; if it's relatively straight-forward to do 
I'll do it.
RobertS:
17-Mar-2008
is there an option to set editor to a func which is rebgui compatible? 
 i.e. a rebgui text editor ?
amacleod:
28-Aug-2008
** Script Error: listview has no value
** Where: layout

** Near: listview 80x60 data [["Title 1" text "Title 2" check "Title 
3" image "Title 4" image "Title 5" text] ["Line 1:1" fals
e l...
Ashley:
3-Sep-2008
The culprit is the face-iterator function in %rebgui-widgets.r ... 
the engage function is doing a 'show *after* the on-click action 
is fired. I won't have access to my dev box until the weekend, but 
at first glance it looks like moving the show may be all that is 
required. Other widgets, such as button, typically have an engage 
function like:

	...

 upÊ Ê Ê Ê Ê Ê Ê Ê Ê Ê Ê [set-color face colors/theme-dark face/action/on-click 
 face]
	...


for this very reason (i.e. always perform the action last to avoid 
focus loss).
Ashley:
27-Apr-2009
a print statement after this confirms the layout function is called 
twice on a double click

 ... as per documentation ( http://www.dobeash.com/RebGUI/user-guide.html#section-3.2.3
 ) "Every on-dbl-click event is preceded by an on-click event, as 
 shown in the following example: ..." But, the real problem here (as 
 you've discovered) is that the method for checking window uniqueness 
 relies upon a [title] string that only manifests *after* a layout 
 is substantiated. I suppose RebGUI could manage its own window title 
 cache, but then you introduce another point of failure (if the cache 
 gets out of sync with view*/screen-face/pane). I wonder if putting 
 a small wait value *before* the current title string test would "fix" 
 the problem (i.e. give the preceeding layout sufficient time to substantiate)?
Ashley:
10-May-2009
The problem with the grid widget was that it relied on custom changes 
in rebgui-edit.r (i.e. it wasn't self-contained) and it was just 
too big to easily "grok" (and hence port). A good grid widget should 
have as few features/options as possible IMHO (i.e. get something 
that handles the text-only 80% case before worrying about more complex 
sub-widget support).
Ashley:
31-Jul-2009
changed from single color web like look to some W9x look, was there 
any reason?
 ... commercial reality ;)
where would I have changed the font?
 ... ctx-rebgui/effects/font
request-char somehow misbehaves here
 ... bug, noted
fonts must be handled differently in w7s

 ... I don't have access to W7 at home, but will check this Monday 
 at work
where do I set my UI options?

 Design time with ctx-rebgui/effects, /colors /behaviors and /sizes

 Adding request-ui back so you can alter these values from a GUI is 
 trivial ... what I've removed is the rebind logic that enabled you 
 to dynamically change values (i.e. you would have to re-do %rebgui.r 
 to see any UI changes take effect ... not very practical for an SDK 
 app)
they look like W9x

 ... the color scheme (with the colors/page change noted above) is 
 taken straight from W7
don't like gradiented buttons/tab
 ... based on W7 and Mac
I thought Ashley wanted to go more web way, not desktop app way

 ... I've actually gone for something halfway (simpler than OS, more 
 complex than Web)
is it using a smaller font?

 ... 12pt by default as always (maybe W7 renders it differently than 
 XP?)
everything seems much smaller
 ... bigger screen? ;)
I would welcome tour.r would fit 1280x800 notebook

 ... RC1 is about getting the basic functionality right, %tour.r and 
 %RebDOC.r will both be made to run 1024x768
used to fit
 ... they havn't been reworked yet
Windows XP with 1366 x 768 ...
 ... will be fixed with above
Ashley:
25-Aug-2009
hence no further ability to mix VID with RebGUI
 ... correct.
promise of 

much lower" memory requirements, but the opposite is true" ... not 
quite. A lot has been added, in particular 4 inline images, without 
noticeably increasing memory. Also remember that many of the improvements 
(reduced dependency on View/VID mezz code) will only be apparent 
when using RebGUI with enface/rebface (tour.r uses 13,817Kb under 
rebview here, and 11,223Kb under rebface). Lastly, reduced memory 
usage is not apparent with tour.r as it doesn't reuse a lot of the 
same widgets (i.e. tour.r is a good reflection of "base" memory usage 
not runtime memory usage). If I find the time I'll knock up an example 
that demonstrate runtime memory differences.
Ashley:
25-Aug-2009
there were somethings I could not do in rebgui so I would switch 
to using ViD in the same application

 ... there shouldn't be any. Both VID are RebGUI are just "face factories" 
 ... feed them a spec and they produce a face object. All other functionality 
 is neither VID nor RebGUI specific. I get a lot of emails asking 
 "how do I do x in RebGUI", but 99% of them are really "how do I do 
 x in REBOL", or, "how do I use the SDK to do x" type questions.

I use VID to do a print preview ... using a draw dialect

 ...RebGUI's use of the effect facet (and hence draw) is no different 
 to VID's. Also note that 'draw is available as a native from the 
 console (i.e. you don't event need VID or RebGUI to use it).
Ashley:
17-Sep-2009
UI question. What's the "standard" way to deselect a selected table/text-list 
row. I've seen:

	a) click the selected row (i.e. toggle mode)

 b) click outside the parent widget (i.e. deselect on focus change)
	c) don't allow it (the current RebGUI behavior)


I can see problems with each approach, but c) requires another widget 
(typically a button) to produce the desired behavior.
Steeve:
6-Oct-2009
I never used RebGui, but if you can get the object constructed like 
with VID:
b: box red 10x10 on-click [print face/feel/pos]

then you can patch b with something like:

b/feel: make b/feel [
	pos: 0x0 
	engage: func [f a e] compose [
		pos: e/offset 
		(get in b/feel 'engage) f a e
	]
]


That overloads the engage function wihout losing her actual content.
Ashley:
7-Oct-2009
In VID you specify the feel directly, in RebGUI you let the widget 
worry about these low-level implementation details. None of the default 
widgets need to pass mouse offsets back to the application, so if 
you need to do this then creating a new widget is the way to go. 
Having said that, I could always add another action handler (on-anything 
face action event) which would fire instead of the above case statement 
(i.e. handle the event as in VID or let RebGUI delegate it to the 
appropriate handler).
Awi:
13-Jan-2011
REBOL []

do %rebgui.r
seat-layout: copy []

loop 16 [
	insert tail seat-layout compose/deep [panel 50 data []]
	for row 1 15 1 [
		foreach col [A B - D E] [

   insert tail last seat-layout compose/deep [button 7x5 blue (rejoin 
   [row col]) [alert face/text]]
		]
		insert tail last seat-layout [return]
	]
]

display "test scroll panel" compose/deep [
	calendar 
	scroll-panel 152x100 #HW data [after 4 (seat-layout)]
	calendar
]
do-events
Awi:
14-Jan-2011
REBOL []

do %rebgui.r
seat-layout: copy []

for slot 1 16 1[
	insert tail seat-layout compose/deep [panel 50 data []]
	for row 1 15 1 [
		foreach col [A B - D E] [

   insert tail last seat-layout compose/deep [button 7x5 blue (rejoin 
   [row col]) [display "test" [text "see me?"]]]
		]
		insert tail last seat-layout [return]
	]
]

display "test scroll panel" compose/deep [

 table options ["id" left .2 "name" right .8] data [1x2 "A to B" 3x4 
 "C to D" 5x5 "E to F"] return 
	calendar 
	scroll-panel 152x100 #HW data [after 4 (seat-layout)]
]
do-events
Awi:
15-Jan-2011
do %rebgui.r

display "test scroll panel" [
	tl-rute: text-list data [ "a"  "b"  "c"  "d"  "e"  "f"]
	button  red "-" [
		if tl-rute/selected [
			remove find tl-rute/data tl-rute/selected
			tl-rute/redraw
		]
	]
]
do-events
Awi:
6-Feb-2011
Found another bug in b218: when using rate and feel, Ok button in 
alerts no longer working, the same with Yes/No buttons in confirm. 
Here is a code sample:
do %rebgui.r

display "rate feel test" [
	lbl: label "label with rate feel" 
		rate 1 
		feel [
			engage: func [f a e] [if a = 'time [print "awi"]]
		]
	btn "test alert" [alert "can you close me?"]
	btn "?" [? lbl]
	btn "unset lbl/rate" [lbl/rate: none show lbl]
	btn "set lbl/rate" [lbl/rate: 1 show lbl]
]
do-events
Group: !REBOL3-OLD1 ... [web-public]
Oldes:
27-May-2009
Steeve, it's not working..
>> str: to-string #{C49BC5A1C48DC599C5BEC3BDC3A1C3ADC3A9313278}
== "ešcržýáíé12x"

>> parse str [some [copy tmp 1 skip (probe tmp)]]
c
ž
á
é
2
x
== true
Ladislav:
10-Jun-2009
Hi all. A percent! datatype question. What are your preferences with 
respect to the full IEEE754 64-bit range?


1) Current state: the whole range is used for percent, except for 
the fact, that LOAD and MOLD cause error when encountering results 
such as: 10% + 10% + 10% - 30% (not exactly zero)

2) Use the complete range and correct both LOAD and MOLD to be able 
to show any value from the range - this means, that the E notation, 
like 1E-15%, or 1E20% may be needed.

3) Change the %arithmetic limiting it to a subrange of IEEE754 (may 
be complicated - every operation needs bound checking and slow)
Gregg:
10-Jun-2009
My percent! preference is the same as for other decimal values: always 
be correct. :-)


In that regard, what are the chances, and ramifications, of percent! 
using the new bignum internals that money! uses? 

Please don't make it use scientific (E) notation.
Ladislav:
11-Jun-2009
Please don't make it use scientific (E) notation.
 - so, what do you want to get from:
10% + 10% + 10% - 30%
Ladislav:
11-Jun-2009
(exactly since the E notation was banned)
Ladislav:
11-Jun-2009
aha, you want to use the money! datatype! yes, that is an alternative, 
but does not ban the E notation anyway
Gregg:
11-Jun-2009
I don't want to ban E notation entirely, but using it should be by 
choice if at all possible.


It's always struck me as odd that anyone would *ever* choose FP, 
assuming they want correct results. :-)
Ladislav:
13-Jun-2009
(but it may be "expensive", i.e. time-consuming)
Ladislav:
2-Jul-2009
no, the hits are expected to be uniformly distributed, i.e. the same 
number of hits for 0.0 as for any interior point is expected
Ladislav:
4-Jul-2009
(i.e. UTC is compared)
Ladislav:
6-Jul-2009
to the other code: so, it looks, that it is difficult for you to 
test the actual implementation, i.e. the random x function, where 
x is decimal. No wonder, but I have and idea how to do that.
Pekr:
15-Aug-2009
Tried R2 vs R3 call (R2 used using /output refinement):


1) "icacls c:\windows" - R3 call returns output, but you have to 
press enter to get back to console prompt - why?

2) "dir c:\windows" - R2 works, R3 returns following error - why?

>> call "dir c:\windows"

** Access error: external process failed: "Systém nemùže nalézt uvedený 
soubor.^
M^/"
** Where: call
** Near: call "dir c:\windows"
Pekr:
15-Aug-2009
>> call "cmd dir"
== none

>> Microsoft Windows [Verze 6.0.6001]

Copyright (c) 2006 Microsoft Corporation. Všechna práva vyhrazena.

c:\!rebol\altme\worlds\r3-gui\files\rebdev>dir
** Script error: dir has no value


>> dir
 Svazek v jednotce C nemá žádnou jmenovku.
 Sériové èíslo svazku je 0054-60D0.

 Výpis adresáøe c:\!rebol\altme\worlds\r3-gui\files\rebdev

13.08.2009  12:12    <DIR>          .
13.08.2009  12:12    <DIR>          ..
02.07.2009  15:38    <DIR>          base
BrianH:
15-Aug-2009
As for your other question, look at this:

>> call "cmd.exe /c dir"
== none

>>  Volume in drive E is APPS
 Volume Serial Number is 7845-7730

 Directory of E:\REBOL\2.100

01/14/2009  03:17 PM    <DIR>          .
01/14/2009  03:17 PM    <DIR>          ..
01/14/2009  03:24 PM    <DIR>          base
01/15/2009  12:17 PM    <DIR>          updates
07/12/2009  03:08 PM                56 blah.txt
02/25/2009  08:09 PM               492 user.r
03/02/2009  10:22 PM    <DIR>          work
04/09/2009  08:41 PM                66 test.r
06/13/2009  12:09 AM                28 mod1.r
06/13/2009  12:09 AM                28 mod2.r
06/13/2009  12:10 AM                47 mod.r
08/10/2009  08:39 PM    <DIR>          plugin
08/13/2009  03:35 PM           613,376 r3.exe
08/13/2009  07:08 PM    <DIR>          extension
08/13/2009  08:46 PM            20,480 ext-test.dll
               8 File(s)        634,573 bytes
               7 Dir(s)   4,893,769,728 bytes free
1 + 1
== 2


I did that 1 + 1 to show that I didn't have to hit enter to get back 
to REBOL. You only have to hit enter to see the prompt. The extra 
>> above the dir outpt is the result prompt that you aren't seeing 
below. This is because CALL on Windows returns immediately, rather 
than waiting for the called process to finish its work, including 
its console output.
Geomol:
25-Aug-2009
Or a range datatype:

>> blk: [a b c d e f g]
>> blk/3-5
== [c d e]
Maxim:
26-Aug-2009
maybe with R4, after all of the goodies this opening will have brought, 
he will be able to contemplate opening up a bit more.  There is always 
a risk that letting go of *total* control can warp your creation 
to something you don't like.  But my experience in a decade of REBOL 
shows that stuff which isn't "sanctified" by RT have a lot of difficulty 
picking-up speed.


When you (i.e. Carl) spend 10 years on a project and it doesn't take 
off in-part because the responsability of keeping control stymies 
its growth, to a slower pace than that of the industry, IMHO you 
realize that the possible upside to *total* control definitely is 
dwarfed by having a mass of like-minded peers who move along with 
you.  


obviously no one sings exactly the same tune, but you need to try 
out stuff in order to know if its really a good or a bad idea... 
I'd rather have 100 people doing this, and then selecting the obvious 
clear winners than trying to muse about it, try a single idea and 
finally realize it wasn't a good idea.


Plus, what is good philosophy for RT isn't good for everyone... the 
proof is that the PITS model isn't enough for everyone.  Even RT 
had to acknoledge this.
Dockimbel:
11-Sep-2009
11/9-16:01:10.375-[uniserve] Output =>
{C^@o^@n^@t^@e^@n^@t^@-^@t^@y^@p^@e^@
G^@E
n^@o^@
1^@2^@7^@.^@0


}
amacleod:
15-Sep-2009
Call it R as in R3...we'll always know what it means....


It worked for C and there was also an E script language on the Amiga
Pekr:
22-Sep-2009
Hmm, so good proposals are down the list ... e.g. of (I would call 
it any-of), do, reverse. Brian - what you think we get for the parse 
update for 3.0? Carl mentioned, that some proposals would require 
some big changes to underlying parse function. I was surprised,e 
.g. 'of being one of them ....
801 / 117212345678[9] 101112