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

World: r3wp

[View] discuss view related issues

Allen
1-May-2006
[4950]
Graham, you could use the link style to popup an option list when 
clicked. Though that will be tedious for data entry. alternately 
use the autofill style for text boxes when you want both free text 
and or a standard list.
Graham
1-May-2006
[4951]
I was thinking of the link style .. something unobtrusive.
Henrik
2-May-2006
[4952]
>> get first [help.gif]
== make image! .....

how do I get the size of the image this way?
Gabriele
2-May-2006
[4953x2]
hmm, i guess you don't. you'll need a temp var.
>> img-size: func [img] [img/size]
>> img-size logo.gif
== 100x24
Henrik
2-May-2006
[4955]
something that should be RAMBO'ed?
Anton
2-May-2006
[4956x2]
I don't think it's that important. It's a small inconvenience isn't 
it ?
But for some fun, you might be able to do something like this:
>> do to-path [help.gif size]
== 48x48
Gabriele
2-May-2006
[4958]
there probably are other cases like this.
Henrik
2-May-2006
[4959]
well, sure. I just thought that there would be a way, like using 
first, second and third on objects
Gabriele
2-May-2006
[4960x2]
yes, but first etc have a different meaning already
what i really want, is the abilty to list the available refinements 
of a datatype.
Anton
2-May-2006
[4962]
Mmm.. in which context do you want that ? Autodocumentation ? Just 
quick console help ?
Gabriele
2-May-2006
[4963x4]
it should be part of reflexivity. you can access the components of 
an object; you should be able to access the components of everything.
(security and modules aside)
maybe the select action could be overloaded to do what Henrik wants. 
i'm not too much in favor of overloading functions though.
(that is, select something 'word would be always equivalent to something/word)
Anton
2-May-2006
[4967]
I think a separate function such as ACCESS should do that. SELECT 
should be left alone to do its series operations as usual.
Chris
2-May-2006
[4968]
How about expanding 'in to cover more than just objects?
Anton
2-May-2006
[4969x2]
I imagine:
	access help.gif 'size ; == 48x48
I think that might slow down IN... not sure.
Gabriele
2-May-2006
[4971x2]
i don't propose changing select. i propose enabling it for more datatypes.
in: you can't have a word bound to an image :)
Anton
2-May-2006
[4973]
(ie. same as Gabriele's comment about overloading.)
Gabriele
2-May-2006
[4974]
select is an action, so a method to the datatype. in is a native.
Anton
2-May-2006
[4975]
What I mean is, every time IN is used, it would then have to check 
if the argument is an image, right ?
Gabriele
2-May-2006
[4976]
yes, and it would behave like a completely different function in 
that case, which is bad imho
Anton
2-May-2006
[4977]
Ok, so we agree on IN.
Gabriele
2-May-2006
[4978]
select instead is already dispatched because it's an action, and 
it would not change its behaviour (returns a value)
Chris
2-May-2006
[4979]
A: From a tech pov, yes.
Anton
2-May-2006
[4980]
I can't think of an example where select is dispatched differently...
Gabriele
2-May-2006
[4981x2]
actually, select currently doesn't need being an action, afaik. as 
it is basically second find
so maybe it was made an action to allow things like this in the future 
:)
Anton
2-May-2006
[4983]
Ah ok.. yes.. mmm...
Gabriele
2-May-2006
[4984]
(though, there is an action that already does this: PATH. but it's 
not exposed.)
Anton
2-May-2006
[4985]
Ah yes, maybe that could be used.
Gabriele
2-May-2006
[4986]
i'd guess path is going to stay this way for speed (internal only), 
but select could be a good interface to it.
Anton
2-May-2006
[4987]
I guess so. :)
Geomol
2-May-2006
[4988x3]
>> copy/part skip mold get first [help.gif] 13 5
== "48x48"
(Only works for sizes taking up 5 chars, but it's a start.)
But why the heck do you wanna do it? help.gif/size is so easy.
Maybe size? could be changed to work on images too!?
Henrik
2-May-2006
[4991x2]
I don't know the name of the image
you'll see soon where it's used :-)
Geomol
2-May-2006
[4993]
SIZE? is a function using INFO?

INFO? is a funciton working on ports. It's easy to do the same for 
images.
image-size?: func [img] [img/size]
Henrik
2-May-2006
[4994]
anyway, problem was solved by gabriele's function. thanks, by the 
way
Geomol
2-May-2006
[4995]
>> image-size? get first [help.gif]
== 48x48
Henrik
2-May-2006
[4996]
precisely what I'm using now
Geomol
2-May-2006
[4997x2]
oki
ops, I skipped Gabriele's post. There it was! :)
Henrik
2-May-2006
[4999]
I'm not sure this is ready for announcement as it's still a prototype, 
so I'll put it here: http://www.hmkdesign.dk/rebol/toolbar/toolbar-demo.r