« first day (1037 days earlier)      last day (2743 days later) » 

2:40 AM
@onetom I've used the prototype/new pattern. It's still a little awkward, seems a little better than make prototype [init]. Perhaps if there were a 'new function that looked for a 'new block/function value within 'prototype, it'd be better yet: new prototype
Although that might not work so well if you wanted to pass args...
new prototype [@onetom onetom.rebol.info]
 
3:35 AM
Might look like NEW (for Rebols 2 & 3).
@RebolBot do do reb4.me/r3/new obj: context [one: two: none new: [one: args/1 two: args/2]] new obj [1 2]
 
; Brought to you by: tryrebol.esperconsultancy.nl
>> do reb4.me/r3/new obj: context [one: two: none new: [one: args/1 two: args/2]] new obj [1 2]
== RESULT is an object of value:
   one             integer!  1
   two             integer!  2
   new             block!    length: 4
 
 
2 hours later…
5:14 AM
@rgchris thanks! i did a lot of "programming in the small" i guess, that's why i haven't hit this problem before reallt.
@rgchris why are you still using 'FUNC ? havent we settled on 'FUNCT ?
 
@onetom I believe FUNCT will disappear, no? FUNC is the locals explicit version, if I were to use locals implicit (FUNCT/FUNCTION), then one: two: would be bound to the function, not the object. Then we'd have to use self/one: self/two:, not my idea of fun(c).
 
@rgchris i was not following this topic
 
@onetom @HostileFork doesn't like FUNC or FUNCT as words but has acquiesced on the need for two separate constructors. With FUNC, you have to explicitly include a word for it to be local: func [arg /local iamlocal] whereas with FUNCTION (proposed—still FUNCT for now) locals are defined by set-words in the function body: function [arg][iamlocal: #someval]. You can see with the latter why that might be a problem when you're trying to set words in the same context as the function...
 
 
3 hours later…
 
6 hours later…
1:57 PM
0
Q: How to get radio button selection in Rebol 3?

SoleSoulHow do I get the value a user selects in a radio button group? Here is a simple code, what should I add in order to be able to retrieve the user selection? I couldn't find it in the docs. view [ radio "First" radio "Second" radio "Third" ]

 
 
1 hour later…
3:03 PM
0
A: How to get radio button selection in Rebol 3?

sqlabprobably not the only way, but you can set an external variable, as in x: 0 view [ radio "First" on-action [set 'x 1] radio "Second" on-action [set 'x 2] radio "Third" on-action [set 'x 3] ] print x

 
3:16 PM
Looks like a duplicate question:
2
Q: How do I get the radio button value in Rebol?

Rebol TutorialI tried this but colors is unknown (I searched all over internet amazingly not one single person has documented it !): V: view layout [ across label "Colours:" r: radio of 'colours l: label "Red" radio of 'colours label "Green" radio of 'colours label "Blue" return ...

 
3:41 PM
Never mind, Rebol 2 vs Rebol 3...
 
0
A: How to get radio button selection in Rebol 3?

sqlabAn other way view [ r1: radio "First" r2: radio "Second" r3: radio "Third" ] print r1/state/value print r2/state/value print r3/state/value

 
 
2 hours later…
5:42 PM
Hi
@sqlab Thank you
I'm testing your answers now
 
posted on September 02, 2013 by ladislav

Improves accuracy and compatibility of LOAD DECIMAL! across platforms. Improves accuracy and compatibility of MONEY! to DECIMAL! conversions across platforms. Tested in Windows (0.3.1) with the following log diff: [equal? to binary! 2.2250738585072007e-308 #{000FFFFFFFFFFFFF}] progression, succeeded [equal? to binary! 2.2250738585072012e-308 #{0010000000000000}] progression, succeeded Summ

 
6:02 PM
@rgchris I have read your answer before submitting my question. I hoped that Rebol 3 has a simpler way of getting the value, and I think it has.
 
6:12 PM
@SoleSoul Although my WALK-VID answer may appear convoluted, I still feel it's quite a clean/data-driven way to get such values (no need for external words to store the value). I do hope the Rebol 3 way is as clean...
 
Doesn't get-face work on radio style?
 
@rgchris The script I'm writing is going to be a proof from me to my coworker that his python script can be rewritten in Rebol in one page and be more maintainable. I don't think it would be a good idea to show him your answer :)
 
@SoleSoul Perhaps, but a walker should be an integral part of the GUI model short of a more holistic api.
 
@rgchris What do you mean by "I do hope the Rebol 3 way is as clean..."? Do you hope that there would be another way beside what's in sqlab's answer?
 
On the other hand, to include demonstrates that even something as complex as a GUI is in Rebol nothing more than an elementary data structure...
 
6:21 PM
I was expecting something like r: [radio "first" 1 radio "second" 2 radio "third" 3] and r would be the value 1, 2 or 3.
 
@SoleSoul Yes.
 
By the way, I was thinking today, does Rebol's GUI support themes?
(So the buttons, text color and border styles could be changed easily)
 
6:43 PM
@SoleSoul I like systems that are data-driven. The need to explicitly assign each element to a word in order to be able to get that element's value works against that. In Rebol 2 View, we were moving away from that: view layout [myform: panel [field "First Field" field "Second Field"] btn "Probe" [probe get-face myform]] — I'd hope this is the direction R3GUI is taking: it's cleaner and reflects more common UI patterns. But that'd only be the beginning...
I'd prefer a system where we define our UI object my-ui: view [radio 'color "Red" radio 'color "Green" radio 'color "Blue" and have MY-UI return an api to that object: my-ui/get 'color
 
@rgchris This is very close to what I was expecting (see my before previous message). I agree.
 
my-ui: view [field 'name "Name" field 'city "City" field 'zip "ZIP" is 5 digit] my-ui/values
@SoleSoul Whether this is close to how R3GUI works, I'm not sure...
For the purposes of showing off though, @sqlab's answers should do the trick...
 
7:02 PM
Would settle for a WALK function in the interim though: my-ui/walk [if all [face/name = 'color face/selected?][break/return get-face face]]
 
7:15 PM
@RebolBot alive?
 
Howdy mysterious @user2740048 — may take a short while before your SO reputation syncs to SO Chat, after that you should be able to join us...
 
7:57 PM
Well I went to best buy and poked at the laptops. The surface pro with the pressable keys was the only thing I found interesting. I didn't find it 1k interesting.
 
@HostileFork Perhaps MS will drop the price again?
 
If I got a nexus 10 and used a Bluetooth keyboard I could do most stuff I needed...do some kind of screen remoting to the desktop. Chatting and such on my phone sucks though
 
@HostileFork What about a Surface RT then?
 
I just can't bring myself to buy a device I can't override and put my own programs on. IIRC a surface rt only runs things from the ms store
 
I was thinking of getting one for spouse since all she does is surf and answer email.
 
8:20 PM
0
A: How to get radio button selection in Rebol 3?

Graham ChiuIn R3GUI radio buttons are grouped by proximity, and you can get their values by naming each button. view [ r1: radio "one" r2: radio "two" r3: radio "three" button "show" on-action [ print get-face reduce [ r1 r2 r3 ]] ] You should use get-face and avoid looking at the internals ...

 
Welcome Nick, by tomorrow sure you will be able to chat here too!
@HostileFork If I am not mistaken you are looking for a big lightweight screen and big lightweight keyboard. To save the weight from all the RAMs it must use, both ideally should be like bluetooth connected to a real computer hidden in your nighttable or under your pillow. Sounds like a business idea Bo could use to build a nice device and software for? @Respectech
 
 
2 hours later…
10:33 PM
Typing on an ipad. It is annoying but not as annoying as the phone. Does the nexus 10 do the split keyboard type with your thumbs thing by default.
 
 
1 hour later…
11:58 PM
@HostileFork i doubt so...
 

« first day (1037 days earlier)      last day (2743 days later) »