World: r3wp
[View] discuss view related issues
older newer | first last |
TomBon 16-Jul-2010 [10058x3] | and if I have more than one windows open? how can I select the right resize to the right window? |
the insert-event-func is global, so mit will fire up also when other windows doing messaging or not? | |
or can't I see the forrest with all these trees :-))) | |
Maxim 16-Jul-2010 [10061] | I'm building a little working example... give me 2 minutes |
TomBon 16-Jul-2010 [10062] | cool.. that would be great max. |
Maxim 16-Jul-2010 [10063] | there are MANY ways to do this, and depending on the surrounding code you have this may or may not be optimal, but this should give you an idea of what is going on. rebol [ title: "resizing example" ] insert-event-func [ switch event/type [ resize [ if in event/face 'on-resize [ event/face/on-resize ] ] down [ ; always a window title, even if clicking on a button. probe event/face/text ] ] event ] view/new/options layout [button "nope"] 'resize win: layout [ button "ok" ] win: make win [ on-resize: func [ /local subface ][ ; window size is already set at this point. subface: pane/1 subface/offset: (size / 2) - (subface/size / 2) show self ] offset/x: 200 ] view/new/options win 'resize do-events |
TomBon 16-Jul-2010 [10064] | hey max cool, you are lighning fast! muchas gracias...!! |
Endo 21-Jul-2010 [10065x2] | I have a weird question, decode-url function uses parse-url function. But there is no parse-url at all?? even if I copy & paste decode-url function and create another function it gives error "** Script Error: parse-url has no value". any idea? |
I use R2.7.7 | |
Henrik 21-Jul-2010 [10067x2] | Endo, decode-url uses parse-url from a different context. That's why you can't see the parse-url function. |
context [ invisible-func: does [print "moo"] set 'my-func does [invisible-func] ; this is how decode-url was written ] >> my-func moo >> invisible-func ** Script Error: invisible-func has no value ** Where: forever ** Near: invisible-func | |
Endo 21-Jul-2010 [10069] | Ohh. I see. Thanks a lot. |
Henrik 21-Jul-2010 [10070] | I can't remember where parse-url is, though. Possibly somewhere inside the system object. |
Endo 21-Jul-2010 [10071] | any simple way to get the source of parse-url? or other hidden functions? |
Ladislav 21-Jul-2010 [10072] | print mold get first second :my-func |
Endo 21-Jul-2010 [10073] | Thanks, this works for parse-url (it is not the first word in function) print mold get probe first fourth second :decode-url |
Henrik 21-Jul-2010 [10074] | yes, it will help you see the source, although it won't help you find where it is. if source is all you need, then that's good. |
Endo 21-Jul-2010 [10075x2] | yes right. oh god, there is url-rules block in parse-url function which is also hidden :) I think I should write a function to get the source of a word! inside the context of the word. |
but it is difficult to make it deep. | |
Ladislav 21-Jul-2010 [10077x2] | where it is: print mold bind? first second :my-func |
where it is: print mold bind? first second :my-func | |
Endo 21-Jul-2010 [10079] | great. thanks. |
Gregg 21-Jul-2010 [10080] | And for this case you can look in net-utils/URL-parser. |
Maxim 21-Jul-2010 [10081] | guys.... why not try the function called.... source :-) source decode-url |
Ladislav 21-Jul-2010 [10082] | Maybe because that is not what was needed? |
Maxim 21-Jul-2010 [10083] | ok seems I missed a detail in reading the thread. |
sqlab 22-Jul-2010 [10084] | A simple alternative editor form system |
Nicolas 4-Aug-2010 [10085] | Should letters be gobs? |
Anton 4-Aug-2010 [10086] | What do you mean by "letter" ? |
Nicolas 4-Aug-2010 [10087x2] | a letter on the screen. Should it be accessible as a gob? Having a size, offset, color, etc... |
It's probably a stupid idea, but I remember that gobs were intended to be used in the thousands on the screen for games and the like. | |
Henrik 4-Aug-2010 [10089] | that depends on what you need it for. in principle you can treat a single letter as a gob, by having one char in the text body. |
Nicolas 4-Aug-2010 [10090] | that's true |
Anton 4-Aug-2010 [10091x2] | You mean rendered text characters. |
I don't think it's a stupid idea. | |
Nicolas 4-Aug-2010 [10093] | Yes, but rendered text cannot be edited. |
Henrik 4-Aug-2010 [10094] | useful if you need chars flying around the screen, or special typography, but rich text should be otherwise able to handle most other cases. |
Anton 4-Aug-2010 [10095] | With supporting code, it can, of course it can. |
Nicolas 4-Aug-2010 [10096x2] | I've been told that it's really hard to create such code. |
I'm just thinking that if an application such as ms word is to be created then rendered text needs to be edited. | |
Anton 4-Aug-2010 [10098] | Well, it's not easy, of course, to make an editing system with all the features we've come to expect. |
Nicolas 4-Aug-2010 [10099] | Would a character per gob simplify things? |
Henrik 4-Aug-2010 [10100] | are we talking R2 now? |
Nicolas 4-Aug-2010 [10101] | r2 doesn't have gobs |
Henrik 4-Aug-2010 [10102x2] | in R3 that will be part of rich text. due to "bugs" in the rich text system, you can in fact already edit rich text in R3, you can just not yet move the caret between or select across multiple styles. |
only with a single gob, though. if you really need to edit across multiple gobs, I don't see why the gob text bodies can't be chained together somehow. | |
Nicolas 4-Aug-2010 [10104x3] | Selecting across multiple styles. That's the kicker, isn't it. |
In fact, I don't even know how selection works. Is it mezzanine? | |
It would be a draw block wouldn't it? | |
Anton 4-Aug-2010 [10107] | One char per gob: that is simple, but maybe you can increase rendering speed by creating one gob per section of text which has a consistent font-size and style etc. |
older newer | first last |