World: r3wp
[View] discuss view related issues
older newer | first last |
Anton 26-Jul-2009 [9048] | (Complicated, huh? But I'm proud.) |
Henrik 26-Jul-2009 [9049] | Thanks |
Gregg 26-Jul-2009 [9050] | Graham, I worked on one a long time ago, with Ammon Johnson. We did it like Smalltalk, or the OS X Finder, rather than a tree. |
Graham 26-Jul-2009 [9051x3] | Gregg .. was it ever published? |
Anton .. no circular references | |
Basically these are XML files that are being turned into Rebol objects that I wish to browse. | |
Gregg 26-Jul-2009 [9054] | I think we put it out on one of the IOS servers, Developer maybe, but not sure where else. I can dust it off and send it to you if you want. |
Graham 26-Jul-2009 [9055] | Sure ... or post it to rebol.org ? |
Anton 27-Jul-2009 [9056x2] | I made something quite similar recently; an expanding/collapsing dir-tree viewer, like the dir panel of a file browser. Each directory/file has to be an object, because I store some state along with it, like collapsed/expanded, and other interesting attributes can be stored in there in future, when I get around to collecting the info. The purpose of the app is basically to create an image of a directory structure, which can be saved to disk, viewed magnified etc. to give an overview of directory structure. |
I'll clean it up to publish later. | |
Graham 27-Jul-2009 [9058] | So, you modify the object you're viewing to keep states? |
Anton 27-Jul-2009 [9059x6] | No, as I scan the filesystem, I build the dir/file structure and an "associated info" object alongside each one, so it looks like this: dir-attrs: context [...] ; <-- All associated directory info goes here. file-attrs: context [...] ; <-- All associated file info goes here. file-structure: [ (make dir-attrs [...]) %subdir/ [ (make file-attrs [...]) %bfile (make file-attrs [...]) %cfile ] (make file-attrs [...]) %afile ] |
So we can see the top level has one subdirectory and one file, and the subdirectory contains two more files. | |
I store info in the dir-attrs and file-attrs objects like collapse/expanded. | |
Actually, I think the real answer to your question is "yes", because I build a block/object structure, and I modify parts of it (the objects) to manage my additional states. | |
I think what you have in your situation, with objects built from XML, is different than mine. I take advantage of being able to use blocks in my structure which allows me to insert my additional associated info. With your object hierarchy, it's problematic to add your own extra fields for state because the XML, of course, might already have those field names as part of its data, so there's possibility for collision there. However, (as I see in my notes,) I was strongly considering for my purposes a structure like this: file-structure: [ %OHS/ [ %adir/ [ ] %afile ] ] associated-file-info: [ %OHS/ make object! [...] %OHS/adir/ make object! [...] %OHS/afile make object! [...] ] | |
(with duplication of all the paths as a negative consequence), but this idea could work better with XML objects. | |
Henrik 27-Jul-2009 [9065] | Anton, have you studied what POP-DETECT in SYSTEM/VIEW/WAKE-EVENT is about? The function for it exists in SYSTEM/VIEW/POP-FACE/FEEL. To me it looks like a workaround to get DETECT to work in INFORMs. |
Henrik 29-Jul-2009 [9066] | Maybe I've had too little coffee, but I can't figure out why no text is displayed here: view center-face make face [text: "test"] but 'size-text returns 22x15 |
Gabriele 29-Jul-2009 [9067] | the top level face is the window face. text is for the window title. |
Henrik 29-Jul-2009 [9068] | ah, that's right. I wonder then if that's what is causing problems with SIZE-TEXT for a specific face I'm making. SIZE-TEXT consistently returns pixel sizes that only fit if the font size is around 10 or 11. |
Henrik 2-Aug-2009 [9069] | where exactly are iterated faces evaluated? is that internal in view? |
Dockimbel 2-Aug-2009 [9070] | AFAIK, it's internal in View. |
Henrik 2-Aug-2009 [9071] | Thanks |
Henrik 3-Aug-2009 [9072] | When reading through the View Reference, it's not clear what happens, when you return an integer from the iteration function. I can see the iteration function is run again with that value as input, but I can't tell where it's run. I had hoped to redraw single lines in a list with a simple mouse over, but I guess you need to do something unknown to provoke the redraw. Using SHOW in the function causes an infinite loop. |
Anton 4-Aug-2009 [9073x2] | The answer to all these kinds of questions/problems with iterated pane functions, I, and beforehand others like Romano and Gabriele, discovered, after much investigation, is not to use a pane function at all, but instead, make real faces in your window and manage them yourself. It turns out to be simpler and easier to code, and with events, it is more powerful, reliable and has fewer limitations etc. |
So... the pane function may be interesting to investigate, but you may also just waste a lot of your time. | |
Henrik 4-Aug-2009 [9075x2] | Anton, yeah, I might drop it, although I figured out a solution to that problem there are many other problems. However right now I'm investigating SHOW-POPUP and HIDE-POPUP, trying to see if I can control many popups for a menu system. |
trying to figure out now when exactly it is that View displays a button for the window in the task bar and when it doesn't. | |
BenBran 5-Aug-2009 [9077] | I purchased the Rebol-Command and am trying to integrate it with my existing work. The 'Local' folder is pointing to 'c:\documents and settings\blah\blah.... My old version was pointing to c:\rebol\local thats where I want it to point. Is there a way to force it there? TIA |
Anton 5-Aug-2009 [9078] | Analyse: Put this in your user.r file: print ["system/options/home:" mold system/options/home] A probable fix for you (insert into user.r): system/options/home: %/c/rebol/ |
BenBran 5-Aug-2009 [9079] | Thank you. After a rest and some more digging I found a few ways to fix. The most obvious - which I overlooked - was a prompt during the installation. I like everything in one root folder. Much easier to sync between home/work/laptop etc. Just to be extra safe, I added the code you proposed. Thanks again. |
Anton 6-Aug-2009 [9080] | Actually, I only set system/options/home in my user.r because I'm on linux which doesn't have a registry. On Windows, you can find the registry key which sets system/options/home by searching for "rebol" in the registry. (I don't remember what it is exactly, but it's easy to find.) |
BenBran 7-Aug-2009 [9081] | Finally found it. For anyone else that would like to know where this key is located: It is HKEY_CURRENT_USER / SOFTWARE / REBOL / VIEW / SANDBOX There are two keys 'Home' and 'Sandbox' I found for now the best setting for my environment is to set them both to C:\rebol\bin I think that forces everything to run out of the bin and lower directories. The 'home' key I believe tells rebol where to find the 'desktop' parameters. |
Pekr 21-Aug-2009 [9082] | Is there an easy way of how to resize an image? I tried: i1: load %my-img.png i2: make image! 82x63 i1 but the image is black :-) |
Henrik 21-Aug-2009 [9083] | DRAW or use effect [fit] in view |
Dockimbel 21-Aug-2009 [9084] | Untested, but should work : i1: load %my-img.png i2: make image! 82x63 draw i2 [image i1 0x0 82x63] |
Pekr 21-Aug-2009 [9085] | thanks, will test ... |
Geomol 21-Aug-2009 [9086] | Pekr, if you use DRAW to resize it, the result will be anti-aliased, just using view and it won't. |
Pekr 21-Aug-2009 [9087x2] | works, thanks. I just wanted to test, how does REBOL resize. It is the same catastrophe as IE. Kudoz to FF ... |
Geomol - how do I do it using View? | |
Geomol 21-Aug-2009 [9089] | i2: to-image layout [image i1 82x63 effect [fit]] |
Henrik 21-Aug-2009 [9090] | DRAW allows upward bilinear filtering, but not downward. VIEW simply uses nearest neighbor. |
Pekr 21-Aug-2009 [9091] | What I need is smaller PNG, because SharePoint just sends original image to browser, instructing it to resize. IE is pretty much ugly, FF is OK. I tried in xnView, my friend in IrfanView, no matter what we do, we can't save so that it preserves transparent color ... |
Henrik 21-Aug-2009 [9092] | Forget using REBOL for that, if you want to preserve quality. |
Geomol 21-Aug-2009 [9093x3] | I'm not sure, if view preserves transparent!? |
I think, you can preseve transparent by making a separate image from the alpha channel, resizing rgb and alpha separately and combine them in the end to a final image. | |
(If it's a problem otherwize.) | |
amacleod 3-Sep-2009 [9096x2] | How much work is involved in getting linux view to work on the ARM processor? I see core running on ARM, Dec-Alfa, Sparc etc and even linux view runs on X86 and PPC. Does the graphics side of view need to deal with teh processor or does the OS its riding on take care of that part? I see some cheap UMPC's with touch screens that I would love to put my app on but they are ARM base and run CE or Linux.... |
It it just a matter of a recompile for that processor and OS? | |
older newer | first last |