[REBOL] Re: Changing VID Styles

2001-12-13 Thread Sanghabum
Thanks for all the useful input on my question. Here's a couple of comments and clarifications. Colin >>The solution is to display the layout as an image when read only. The crude code... Brett > That's a sneaky idea. I like it :). I'll have to keep it > in the back of my mind. Though normall

[REBOL] Re: Changing VID Styles

2001-12-11 Thread Sanghabum
Hi Volker, > > > > I have a layout with a load of entry fields (VID style Field). I need to > > occassionaly display this with all entry fields disabled. > i expect you should change the complete feel, since this defines how > a face reacts. > > for fields it should be: ctx-text/swi

[REBOL] Changing VID Styles

2001-12-11 Thread Sanghabum
Hi all, I have a layout with a load of entry fields (VID style Field). I need to occassionaly display this with all entry fields disabled. So (I think) I need a way of running through the layout and changing all 'field style faces to 'info style (and vice versa to make it enterable again). Bu

[REBOL] Debugging console

2001-12-05 Thread Sanghabum
Here's a simple idea, and a simple script to go with it. With View, you are either running your Layouts, and wondering why Things Aren't Right, or you've stopped the application and are Printing away at the console to see what's up. So why not have a debug window that lets you type commands as

[REBOL] Re: cgi weirdness

2001-12-04 Thread Sanghabum
> Just yesterady I had similar problem. Even detab was not > enough. I cut and pasted first line from another script > (#!/usr/bin/rebolcmd -cs), detabbed the script, manually > pressed enter at the end of the line, deleted empty > lines, entered new ones, etc. - no success. I simply > deleted lin

[REBOL] Re: Load of trouble?

2001-12-01 Thread Sanghabum
Hi Gabrielle, > When handling dates, I'd suggest to use TO-DATE instead: it handles > much more formats than LOAD and just gives an error if the input > is not a date. < snip> > Romano's suggestion is useful if the user could input values of > different datatypes (imagine accepting a file o

[REBOL] Re: Rebol and databases

2001-11-30 Thread Sanghabum
Hi Brock, > I'm trying to determine if it would be at all practical to code a large-ish > database app or if it would be best to stick with Oracle or MySQL for the > database with the interface written with /View? A couple of issues you'd want to think about The Official Guide creates a sin

[REBOL] Re: Load of trouble?

2001-11-30 Thread Sanghabum
Thanks to Brett and Romano for the (as usual) insightful explanations. to-block is a great discover (thanks Romano). I doubt if I would have come across or, or have worked out that it corrects the flaws in Load (while adding some other issues about contexts). And that to some extent sums up t

[REBOL] Re: To do or not to do?

2001-11-29 Thread Sanghabum
Hi Romano, Thanks for the detailed response... > A string is like source code for Rebol. It must be compiled (loaded) and > then > run (interpreted). A block is like compiled code: it must only be run > (interpreted). > If the overhead is not a problem, you can compile your C code every time

[REBOL] Load of trouble?

2001-11-29 Thread Sanghabum
Hi all. Romano, in his response to me about strings and blocks reminded me of some pain I'd had trying to use 'load as a validation tool. Can I lay out what I see as then problems, and maybe the gurus can tell me what I'm missing? Thanks I have a raw string entered by a user: raw-inp

[REBOL] Re: To do or not to do?

2001-11-29 Thread Sanghabum
Thanks again Romano, > things are more simple of what you think. I have only removed the string and > the function and (almost) everything works as you want. > The only differences are: I appreciate the effort you and all the others have taken to show me the error of my ways. I've reworked

[REBOL] Re: To do or not to do?

2001-11-29 Thread Sanghabum
Andrew Martin writes: > This way you avoid Rebol having to repeatedly parse the string. Instead you > work directly with Rebol values, and avoid having to use special syntax in > your rules. > > I hope that helps! > It does indeed. Thanks again to everyone for the education and training, C

[REBOL] Re: To do or not to do?

2001-11-28 Thread Sanghabum
Thanks to Romano, Sterling, and Joel for the instant enlightenment Sterling writes: > NOO > There is always a way not to do strings. :) > I hope this has helped you out. If you have any more questions about > it, please ask... we all cringe here at REBOL HQ when we see the > u

[REBOL] To do or not to do?

2001-11-28 Thread Sanghabum
Hi all, It may just be my irredeemably old-fashioned mindset, but everywhere I turn in Rebol I see the need to 'DO strings. I've been ticked off before on the list about it and -- these days -- I can normally see better approaches. But this little example has got me stumped. So I'm interested in

[REBOL] Re: From string to object

2001-11-26 Thread Sanghabum
[EMAIL PROTECTED] writes: > I'm having a bit of trouble getting from a string to the > contents of the object that the string names. I've tried > an embarrassing combinations of 'set and 'load and > wotnot, without finding the right magi Thanks to everyone who replied. I'd gone word blind lat

[REBOL] From string to object

2001-11-25 Thread Sanghabum
Hi all, I'm having a bit of trouble getting from a string to the contents of the object that the string names. I've tried an embarrassing combinations of 'set and 'load and wotnot, without finding the right magic. Can anyone help, please? An example to try to make sense of what I am asking

[REBOL] Re: FYI: Once was lost but now is found (Editor window in view)

2001-11-21 Thread Sanghabum
[EMAIL PROTECTED] writes: > Turns out a setting called "OFFSET" in edit-prefs.r got screwed up somehow. > It had a setting of -3 something for the x and y parts of the pair - > which is off in never never land. Thus the editor was working I just > couldn't see it :) For what it's worth: i

[REBOL] Re: copy/clipboard ??

2001-11-16 Thread Sanghabum
In a message dated 16/11/2001 14:17:50 GMT Standard Time, [EMAIL PROTECTED] writes: > re: http://www.escribe.com/internet/rebol/m13057.html > > Any update to copying binary data via clipboard.. where is this on RT's > radar? > I did email feedback, and this is their reply (17Sep2001). So n

[REBOL] Re: Daylight saving (Was: RE: Re: Swatch time)

2001-10-08 Thread Sanghabum
[EMAIL PROTECTED] writes: > The timezones/daylight handling makes me crazy, I am never > sure windows gives the right time, it looks like the BIOS and > windows use two different clocks... If this sort of thing doesn't drive you crazy, then there must be something wrong with you. The rules

[REBOL] Re: opening a file...

2001-10-07 Thread Sanghabum
[EMAIL PROTECTED] writes: > A file on the C directory can easily be opened with rebol e.g. > print read %frunlog.txt > How will I open a file located in a different directory, for example in my > briefcase? print read %/c/my%20briefcase/frunlog.txt Note use of forward slashes where you (as

[REBOL] Re: Q: Functions and the visibility of words

2001-04-27 Thread Sanghabum
>From: [EMAIL PROTECTED] (Ingo Hohmann) >.. on default global variables [EMAIL PROTECTED] spoketh thus: >> The disadvantages are so major, that something needs >> to be done. >And here are two things I've come up with ... >From: [EMAIL PROTECTED] (Andrew Martin) >> 2. I've gotten into the hab

[REBOL] Re: local cgi

2001-04-27 Thread Sanghabum
[EMAIL PROTECTED] writes: > Hi. i was wondering if anyone knows how or where i > might find documentation on testing rebol cgi scripts > locally. Both "The Official Guide" and "Rebol for Dummies" have short sections on this...and they are both worth having for other reasons too. But it's not r

[REBOL] Re: Q: Functions and the visibility of words

2001-04-26 Thread Sanghabum
[EMAIL PROTECTED]: > When a word is definied inside a function it is visible also outside the > function (after the invication of the function) unless explicitly specified > local. This seems to be a different approach to most of the other > programming languages (at least that I know :). > >

[REBOL] Re: Troubles in CGI land

2001-04-25 Thread Sanghabum
I had a similar problem last week. My script ran fine if browsed from Internet Explorer or Opera. But it downloaded as a text file if browsed from Lynx. I spent a long-time banging my head against a click wall trying to fix it. In the end I put it to one side. Strange thing is, Lynx works fine

[REBOL] Re: How can I do what Launch does?

2001-04-17 Thread Sanghabum
Carl: > This should do it for you: > > top-level?: does [none? system/script/parent] > > -Carl Thanks! Not quite, but enough of a clue to find something that does do what I want. Your top-level? means "Am I being typed at the Command Prompt?" My a.r is already one level down from your

[REBOL] Re: Find on a nested structure

2001-04-15 Thread Sanghabum
Thanks to everyone who replied to this. I've adopted Scott's approach. I guess my problem was twofold: expecting FIND to do more than it does; and being unable to fathom SORT. Thanks again, Colin. -- To unsubscribe from this list, please send an email to [EMAIL PROTECTED] with "unsubscribe" in t

[REBOL] How can I do what Launch does?

2001-04-15 Thread Sanghabum
In another thread, Carl S. writes: > Launch has a rule: you can only launch from the main REBOL process. > This prevents launch loops. That touches precisely on something I was trying to figger out the other day. I've got a set of scripts (a.r, b.r, c.r). a.r uses DO to call b.r and c.r. But

[REBOL] Find on a nested structure

2001-04-11 Thread Sanghabum
Can you guys help me on this one? I've got a structure like this: MyStructure: [ [key1 data1] [key2 data2] [key3 data3] ... ] where each Key is a single string, but the Data is another block. Example: MyStructure: [ ["US" ["USA" "English" "Spanish"] ] ["DE" ["Germany

[REBOL] Re: Clunky-looking code

2001-04-03 Thread Sanghabum
Thanks Renaud, MultiplyBlocks: func [ Block1 Block2 /local sum ][ sum: 0 repeat i min length? Block1 length? Block2 [ sum: sum + (Block1/:i * Block2/:i) ] return sum ] What was missing from my knowledge was how to reference a block usi

[REBOL] Clunky-looking code

2001-04-02 Thread Sanghabum
I'm trying to multiply respective elements of two blocks and get a single sum: e.g. [a b c] * [d e f] = a*d + b*e + c*f I have no problem writing the code There are two versions of the function listed below. But it looks irredeemably inelegant compared to almost any other language I kno

[REBOL] Re: Tupleware

2001-02-23 Thread Sanghabum
Hi Holger, > If you need value sequences of arbitrary length then you have to use some > type > of series, probably a block of integers or a binary. IPv6 addresses will > probably > be a type by themselves, both because of the tuple limitation and because > having > a separate type allow

[REBOL] Re: Big number calculations

2001-02-22 Thread Sanghabum
[EMAIL PROTECTED] wrote: > Ok obviously REBOL has limitation with very big numbers. However, > with the kind of calculations I want to make alot of software will > have limitations. I'm looking to pick some brains for an alternative > to scientific notation. I like scientific notation as it

[REBOL] Tupleware

2001-02-22 Thread Sanghabum
In a previous thread, [EMAIL PROTECTED] writes re tuples > They're used for IP addresses and colors, or anything similar. If > you need a generic "array of integers" you can use a block of > integers (integer! is 32 bit); or you can use strings as Rexx > does. Thanks for the information. I sti

[REBOL] Re: Design by contract

2001-02-22 Thread Sanghabum
Gisle Dankel wrote: > Here's a Design By Contract script that I hacked together yesterday. > For those who don't know, Design By Contract is a software pattern used to > enforce preconditions and postconditions of a function. > Thanks for this script. Tools for validating parameters are som

[REBOL] Re: Arithmetic precision

2001-02-03 Thread Sanghabum
In a message dated 02/02/2001 18:32:44 GMT Standard Time, [EMAIL PROTECTED] writes: > Arithmetic precision in REBOL is only 64 bits long including the exponent > for a decimal! value according to some IEEE standard. I think REXX relies > heavily on so called Math of numbers. For instance, most

[REBOL] Arithmetic precision

2001-02-02 Thread Sanghabum
Is there any way in Rebol that I can extend the number of significant digits when doing arithmetic? I'm trying (as a Rebol-learning exercise) to convert some old Rexx code. In Rexx, the problem is trivial: /* rexx */ a = 11 b = 71 say " default=" a / b numeric digits 25 say " 25 digi